mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[ROCm][Windows] Fix ROCm/HIP version header (#148560)
On Windows, ROCm libraries do not have a `<rocm-core/rocm_version.h>` header, which causes the compilation to fail. This PR resolves this problem by utilising `<hip/hip_version.h>` from HIP SDK. Pull Request resolved: https://github.com/pytorch/pytorch/pull/148560 Approved by: https://github.com/jeffdaily
This commit is contained in:
parent
00199acdb8
commit
74da76f67c
|
|
@ -31,7 +31,11 @@
|
|||
|
||||
// for validators
|
||||
#ifdef USE_ROCM
|
||||
#ifdef _WIN32
|
||||
#include <hip/hip_version.h>
|
||||
#else
|
||||
#include <rocm-core/rocm_version.h>
|
||||
#endif
|
||||
#define ROCBLAS_BETA_FEATURES_API
|
||||
#include <rocblas/rocblas.h>
|
||||
#include <hipblaslt/hipblaslt.h>
|
||||
|
|
@ -218,7 +222,11 @@ TuningResultsValidator::TuningResultsValidator() {
|
|||
#ifdef USE_ROCM
|
||||
// rocm
|
||||
{
|
||||
#ifdef _WIN32
|
||||
std::string rocm_version = HIP_VERSION_BUILD_NAME;
|
||||
#else
|
||||
std::string rocm_version = ROCM_BUILD_INFO;
|
||||
#endif
|
||||
RegisterValidator(
|
||||
"ROCM_VERSION",
|
||||
[rocm_version]() { return rocm_version; },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user