Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several Status in OPs are not checked #2513

Closed
njzjz opened this issue May 8, 2023 · 0 comments · Fixed by #2782
Closed

several Status in OPs are not checked #2513

njzjz opened this issue May 8, 2023 · 0 comments · Fixed by #2782
Labels

Comments

@njzjz
Copy link
Member

njzjz commented May 8, 2023

Summary

The compilation warnings are raised.

They have the risk of segment fault due to not being checked.

DeePMD-kit Version

devel

TensorFlow Version

2.12.0

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

No response

Details

/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc: In instantiation of 'int _norm_copy_coord_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, FPTYPE*&, int*&, int*&, int&, int&, const FPTYPE*, const FPTYPE*, const int*, const int&, const int&, const float&) [with FPTYPE = double]':
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1644:41:   required from 'void _prepare_coord_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, const FPTYPE**, FPTYPE*&, const int**, int*&, int*&, deepmd::InputNlist&, int*&, int*&, int**&, int*&, int*&, int&, int&, int&, int&, const FPTYPE*, const int*, int, const int&, const int&, const float&, const int&, const int&) [with FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1182:41:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::_Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1005:59:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1003:8:   required from here
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1481:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1481 |   context->allocate_temp(DataTypeToEnum<FPTYPE>::value, FPTYPE_shape,
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1499:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1499 |   context->allocate_temp(DataTypeToEnum<FPTYPE>::value, double_shape,
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1523:5: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1523 |     context->allocate_temp(DataTypeToEnum<FPTYPE>::value, cpy_shape,
      |     ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc: In instantiation of 'int _build_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, int*&, int*&, int**&, int*&, int&, int&, const FPTYPE*, const int&, const int&, const int&, const float&) [with FPTYPE = double]':
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1654:25:   required from 'void _prepare_coord_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, const FPTYPE**, FPTYPE*&, const int**, int*&, int*&, deepmd::InputNlist&, int*&, int*&, int**&, int*&, int*&, int&, int&, int&, int&, const FPTYPE*, const int*, int, const int&, const int&, const float&, const int&, const int&) [with FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1182:41:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::_Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1005:59:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = double]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1003:8:   required from here
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1563:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1563 |   context->allocate_temp(DT_INT32, nlist_shape, tensor_list);
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1574:5: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1574 |     context->allocate_temp(DT_INT32, jlist_shape, tensor_list + 1);
      |     ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc: In instantiation of 'int _norm_copy_coord_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, FPTYPE*&, int*&, int*&, int&, int&, const FPTYPE*, const FPTYPE*, const int*, const int&, const int&, const float&) [with FPTYPE = float]':
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1644:41:   required from 'void _prepare_coord_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, const FPTYPE**, FPTYPE*&, const int**, int*&, int*&, deepmd::InputNlist&, int*&, int*&, int**&, int*&, int*&, int&, int&, int&, int&, const FPTYPE*, const int*, int, const int&, const int&, const float&, const int&, const int&) [with FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1182:41:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::_Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1005:59:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1003:8:   required from here
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1481:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1481 |   context->allocate_temp(DataTypeToEnum<FPTYPE>::value, FPTYPE_shape,
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1499:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1499 |   context->allocate_temp(DataTypeToEnum<FPTYPE>::value, double_shape,
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1523:5: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1523 |     context->allocate_temp(DataTypeToEnum<FPTYPE>::value, cpy_shape,
      |     ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc: In instantiation of 'int _build_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, int*&, int*&, int**&, int*&, int&, int&, const FPTYPE*, const int&, const int&, const int&, const float&) [with FPTYPE = float]':
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1654:25:   required from 'void _prepare_coord_nlist_gpu(tensorflow::OpKernelContext*, tensorflow::Tensor*, const FPTYPE**, FPTYPE*&, const int**, int*&, int*&, deepmd::InputNlist&, int*&, int*&, int**&, int*&, int*&, int&, int&, int&, int&, const FPTYPE*, const int*, int, const int&, const int&, const float&, const int&, const int&) [with FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1182:41:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::_Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1005:59:   required from 'void ProdEnvMatAMixOp<Device, FPTYPE>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::GpuDevice; FPTYPE = float]'
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1003:8:   required from here
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1563:3: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1563 |   context->allocate_temp(DT_INT32, nlist_shape, tensor_list);
      |   ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
/root/deepmd-kit/source/op/prod_env_mat_multi_device.cc:1574:5: warning: ignoring returned value of type 'tsl::Status', declared with attribute nodiscard [-Wunused-result]
 1574 |     context->allocate_temp(DT_INT32, jlist_shape, tensor_list + 1);
      |     ^~~~~~~
In file included from /root/deepmd-kit/source/op/custom_op.h:8,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1006:10: note: in call to 'tsl::Status tensorflow::OpKernelContext::allocate_temp(tensorflow::DataType, const tensorflow::TensorShape&, tensorflow::Tensor*)', declared here
 1006 |   Status allocate_temp(DataType type, const TensorShape& shape,
      |          ^~~~~~~~~~~~~
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/platform/status.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/lib/core/status.h:19,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_base.h:20,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/resource_handle.h:21,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:27,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:23,
                 from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
                 from /root/deepmd-kit/source/op/custom_op.h:7,
                 from /root/deepmd-kit/source/build_c/op/CMakeFiles/deepmd_op.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/tsl/platform/status.h:63:7: note: 'tsl::Status' declared here
   63 | class Status {
      |       ^~~~~~
@njzjz njzjz added the bug label May 8, 2023
njzjz added a commit to njzjz/deepmd-kit that referenced this issue Sep 4, 2023
Fix deepmodeling#2513.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz linked a pull request Sep 4, 2023 that will close this issue
wanghan-iapcm pushed a commit that referenced this issue Sep 4, 2023
Fix #2513.

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant