TensorRT转化代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
417B

  1. #ifndef TRTX_CUDA_UTILS_H_
  2. #define TRTX_CUDA_UTILS_H_
  3. #include <cuda_runtime_api.h>
  4. #ifndef CUDA_CHECK
  5. #define CUDA_CHECK(callstr)\
  6. {\
  7. cudaError_t error_code = callstr;\
  8. if (error_code != cudaSuccess) {\
  9. std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\
  10. assert(0);\
  11. }\
  12. }
  13. #endif // CUDA_CHECK
  14. #endif // TRTX_CUDA_UTILS_H_