|
7 | 7 | #include "tensorflow/core/framework/shape_inference.h" |
8 | 8 |
|
9 | 9 | using namespace tensorflow; // NOLINT(build/namespaces) |
10 | | -#define MAGIC_NUMBER 256 |
11 | 10 |
|
12 | 11 | #ifdef HIGH_PREC |
13 | 12 | typedef double VALUETYPE ; |
@@ -159,7 +158,8 @@ class DescrptSeAOp : public OpKernel { |
159 | 158 |
|
160 | 159 | OP_REQUIRES (context, (ntypes == int(sel_a.size())), errors::InvalidArgument ("number of types should match the length of sel array")); |
161 | 160 | OP_REQUIRES (context, (ntypes == int(sel_r.size())), errors::InvalidArgument ("number of types should match the length of sel array")); |
162 | | - |
| 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.")); |
| 162 | + |
163 | 163 | // Create output tensors |
164 | 164 | TensorShape descrpt_shape ; |
165 | 165 | descrpt_shape.AddDim (nsamples); |
@@ -201,7 +201,6 @@ class DescrptSeAOp : public OpKernel { |
201 | 201 | cudaErrcheck(cudaMemcpy(&(array_longlong), 20 + mesh_tensor.flat<int>().data(), sizeof(unsigned long long *), cudaMemcpyDeviceToHost)); |
202 | 202 | cudaErrcheck(cudaMemcpy(&(array_double), 24 + mesh_tensor.flat<int>().data(), sizeof(compute_t *), cudaMemcpyDeviceToHost)); |
203 | 203 |
|
204 | | - // cudaErrcheck(cudaMemcpy(jlist, host_jlist, sizeof(int) * nloc * MAGIC_NUMBER, cudaMemcpyHostToDevice)); |
205 | 204 | // Launch computation |
206 | 205 | for (int II = 0; II < nsamples; II++) { |
207 | 206 | DescrptSeALauncher(coord_tensor.matrix<VALUETYPE>().data() + II * (nall * 3), // related to the kk argument |
|
0 commit comments