Skip to content

Commit

Permalink
[ROCm] Fixed linker issues with rocblas_get_version_string_size and r…
Browse files Browse the repository at this point in the history
…ocblas_get_version_string (#51)
  • Loading branch information
zoranjovanovic-ns authored Oct 9, 2024
1 parent d669cbf commit f002ae4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion xla/stream_executor/rocm/rocblas_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ using stream_executor::internal::CachedDsoLoader::GetRocblasDsoHandle;
__macro(rocblas_destroy_handle) \
__macro(rocblas_get_stream) \
__macro(rocblas_set_stream) \
__macro(rocblas_set_atomics_mode)
__macro(rocblas_set_atomics_mode) \
__macro(rocblas_get_version_string_size) \
__macro(rocblas_get_version_string)

// clang-format on

Expand Down
8 changes: 2 additions & 6 deletions xla/stream_executor/rocm/rocm_blas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1206,25 +1206,21 @@ IMPL_DoBlasGemmBatched(float, wrap::rocblas_sgemm_strided_batched)
}

absl::Status ROCMBlas::GetVersion(string *version) {
#if TF_ROCM_VERSION >= 60300 // Not yet available in ROCM-6.1
absl::MutexLock lock{&mu_};
size_t len = 0;
if (auto res = rocblas_get_version_string_size(&len);
if (auto res = wrap::rocblas_get_version_string_size(&len);
res != rocblas_status_success) {
return absl::InternalError(
absl::StrCat("GetVersion failed with: ", ToString(res)));
}
std::vector<char> buf(len + 1);
if (auto res = rocblas_get_version_string(buf.data(), len);
if (auto res = wrap::rocblas_get_version_string(buf.data(), len);
res != rocblas_status_success) {
return absl::InternalError(
absl::StrCat("GetVersion failed with: ", ToString(res)));
}
*version = string(buf.begin(), buf.end());
return absl::OkStatus();
#else
return absl::UnimplementedError("");
#endif
}

} // namespace gpu
Expand Down

0 comments on commit f002ae4

Please sign in to comment.