Skip to content

Commit 3a38dc4

Browse files
LuLu
authored andcommitted
Add boundary check if nnei is larger than 1024
1 parent 62cc79a commit 3a38dc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/op/descrpt_se_a_gpu.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class DescrptSeAOp : public OpKernel {
158158

159159
OP_REQUIRES (context, (ntypes == int(sel_a.size())), errors::InvalidArgument ("number of types should match the length of sel array"));
160160
OP_REQUIRES (context, (ntypes == int(sel_r.size())), errors::InvalidArgument ("number of types should match the length of sel array"));
161-
OP_REQUIRES (context, (nnei > 1024), errors::InvalidArgument ("Assert failed, max neighbor size of atom(nnei) " + std::to_string(nnei) + " is larger than 1024!, which currently is not supported by deepmd-kit."));
161+
OP_REQUIRES (context, (nnei <= 1024), errors::InvalidArgument ("Assert failed, max neighbor size of atom(nnei) " + std::to_string(nnei) + " is larger than 1024!, which currently is not supported by deepmd-kit."));
162162

163163
// Create output tensors
164164
TensorShape descrpt_shape ;

0 commit comments

Comments
 (0)