Skip to content

Commit

Permalink
compat api
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanmines committed Jan 10, 2024
1 parent 3752ebf commit c7cb061
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xla/stream_executor/gpu/gpu_cudamallocasync_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ namespace stream_executor {
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
static std::string GetCudaErrorMessage(gpu::GpuStatus result) {
const char* error;
GpuGetErrorString(result, &error);
const char* name;
#if GOOGLE_CUDA
GpuGetErrorString(result, &error);
GpuGetErrorName(result, &name);
#elif
error = GpuGetErrorString(result);
name = GpuGetErrorName(result);
#endif
return absl::StrCat("CUDA error: ", error ? error : "<unknown>", " (",
name ? name : "Unknown", ")");
}
Expand Down

0 comments on commit c7cb061

Please sign in to comment.