mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 08:57:43 +08:00
[mlir][sparse] using stable_sort to make sure the compiled code are consistent between different builds configuration
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D153074
This commit is contained in:
@@ -528,7 +528,7 @@ void LoopEmitter::categorizeLoopCondition(
|
||||
makeLoopCondKind(isSparse, isSlice, isAffine, isUnRedu));
|
||||
}
|
||||
|
||||
std::sort(spConds.begin(), spConds.end(), [](auto lhs, auto rhs) {
|
||||
std::stable_sort(spConds.begin(), spConds.end(), [](auto lhs, auto rhs) {
|
||||
// AffineUnRed > Affine > Slice > Trivial
|
||||
return static_cast<uint8_t>(lhs.second) > static_cast<uint8_t>(rhs.second);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user