forked from mindspore-Ecosystem/mindspore
!46808 ArgminWithValue输入bigshape的tensor时index偶现负值
Merge pull request !46808 from 李良灿/fix-minus
This commit is contained in:
commit
b899f1441c
|
@ -33,8 +33,8 @@ const int kMaxGroupLoop = kGroupSize * 3; // 128 * 3 =
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
struct Cmp {
|
struct Cmp {
|
||||||
__device__ static inline bool lt(T a, T b, S i, S j) { return (a < b) || ((a == b) && (i < 0 || j < i)); }
|
__device__ static inline bool lt(T a, T b, S i, S j) { return (a < b) || ((a == b) && ((i < 0 || j < i) && j >= 0)); }
|
||||||
__device__ static inline bool gt(T a, T b, S i, S j) { return (a > b) || ((a == b) && (i < 0 || j < i)); }
|
__device__ static inline bool gt(T a, T b, S i, S j) { return (a > b) || ((a == b) && ((i < 0 || j < i) && j >= 0)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in New Issue