diff --git a/c10/cuda/CUDAException.cpp b/c10/cuda/CUDAException.cpp index 457d35f020b..4e4419b4369 100644 --- a/c10/cuda/CUDAException.cpp +++ b/c10/cuda/CUDAException.cpp @@ -10,9 +10,9 @@ namespace c10::cuda { void c10_cuda_check_implementation( const int32_t err, - const char* /*filename*/, - const char* /*function_name*/, - const int /*line_number*/, + const char* filename, + const char* function_name, + const uint32_t line_number, const bool include_device_assertions) { const auto cuda_error = static_cast(err); const auto cuda_kernel_failure = include_device_assertions @@ -41,7 +41,7 @@ void c10_cuda_check_implementation( } #endif throw c10::AcceleratorError( - {__func__, __FILE__, int32_t(__LINE__)}, err, check_message); + {function_name, filename, line_number}, err, check_message); } } // namespace c10::cuda diff --git a/c10/cuda/CUDAException.h b/c10/cuda/CUDAException.h index 899d85e8a73..2503b22e476 100644 --- a/c10/cuda/CUDAException.h +++ b/c10/cuda/CUDAException.h @@ -91,7 +91,7 @@ C10_CUDA_API void c10_cuda_check_implementation( const int32_t err, const char* filename, const char* function_name, - const int line_number, + const uint32_t line_number, const bool include_device_assertions); } // namespace c10::cuda