!46808 ArgminWithValue输入bigshape的tensor时index偶现负值

Merge pull request !46808 from 李良灿/fix-minus
This commit is contained in:
i-robot 2022-12-23 02:51:15 +00:00 committed by Gitee
commit b899f1441c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ const int kMaxGroupLoop = kGroupSize * 3; // 128 * 3 =
template <typename T, typename S>
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 gt(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) && j >= 0)); }
};
template <typename T>