[all-commits] [llvm/llvm-project] 7cec4d: [mlir][sparse] Change the quick sort pivot selection.

Bixia Zheng via All-commits all-commits at lists.llvm.org
Sun Jan 29 17:57:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7cec4d169d2c5261b484bb7dab276cfd7a4090db
      https://github.com/llvm/llvm-project/commit/7cec4d169d2c5261b484bb7dab276cfd7a4090db
  Author: bixia1 <bixia at google.com>
  Date:   2023-01-29 (Sun, 29 Jan 2023)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_rewrite_sort.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_rewrite_sort_coo.mlir

  Log Message:
  -----------
  [mlir][sparse] Change the quick sort pivot selection.

Previously, we choose the value at (lo + hi)/2 as a pivot for partitioning the
data in [lo, hi). We now choose the median for the three values at lo, (lo +
hi)/2, and (hi-1) as a pivot to match the std::qsort implementation.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D142679




More information about the All-commits mailing list