Skip to content

Commit

Permalink
Cast cudaError_t to int to make logging messages work.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Nov 22, 2023
1 parent e29057e commit bd5077e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cpp/src/io/utilities/datasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ class memory_mapped_source : public file_source {
if (result == cudaSuccess) {
_is_map_registered = true;
} else {
CUDF_LOG_WARN("cudaHostRegister failed with {} ({})", result, cudaGetErrorString(result));
CUDF_LOG_WARN("cudaHostRegister failed with {} ({})",
static_cast<int>(result),
cudaGetErrorString(result));
}
}

Expand All @@ -207,7 +209,9 @@ class memory_mapped_source : public file_source {

auto const result = cudaHostUnregister(_map_addr);
if (result != cudaSuccess) {
CUDF_LOG_WARN("cudaHostUnregister failed with {} ({})", result, cudaGetErrorString(result));
CUDF_LOG_WARN("cudaHostUnregister failed with {} ({})",
static_cast<int>(result),
cudaGetErrorString(result));
}
}

Expand Down

0 comments on commit bd5077e

Please sign in to comment.