Skip to content

Commit 7ff6048

Browse files
authored
Merge pull request #2500 from ROCm/r2.15-rocm-enhanced-nohipblaslt
protected code by TF_HIPBLASLT macro to make sure code builds without hipblas-lt
2 parents 5286d1d + e601db9 commit 7ff6048

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

third_party/xla/xla/stream_executor/rocm/hip_blas_utils.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ limitations under the License.
1919
#include "xla/stream_executor/blas.h"
2020
#include "rocm/rocm_config.h"
2121

22+
#if TF_HIPBLASLT
23+
2224
namespace stream_executor {
2325
namespace rocm {
2426

@@ -78,3 +80,5 @@ hipblasOperation_t AsHipblasOperation(blas::Transpose trans) {
7880

7981
} // namespace rocm
8082
} // namespace stream_executor
83+
84+
#endif // #TF_HIPBLASLT

third_party/xla/xla/stream_executor/rocm/hip_blas_utils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ limitations under the License.
2222
#include "xla/stream_executor/rocm/hipblaslt_wrapper.h"
2323
#include "tsl/platform/errors.h"
2424
#include "tsl/platform/status.h"
25+
#if TF_HIPBLASLT
26+
2527

2628
#include "rocm/rocm_config.h"
2729
#if TF_ROCM_VERSION < 60000
@@ -56,4 +58,6 @@ hipblasOperation_t AsHipblasOperation(blas::Transpose trans);
5658
} // namespace rocm
5759
} // namespace stream_executor
5860

61+
#endif // TF_HIPBLASLT
62+
5963
#endif // XLA_STREAM_EXECUTOR_ROCM_HIP_BLAS_UTILS_H_

third_party/xla/xla/stream_executor/rocm/hipblaslt_wrapper.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ limitations under the License.
2020
#define __HIP_DISABLE_CPP_FUNCTIONS__
2121

2222
#include "rocm/rocm_config.h"
23+
#if TF_HIPBLASLT
24+
2325
#if TF_ROCM_VERSION >= 50500
2426
#include "rocm/include/hipblaslt/hipblaslt.h"
2527
#else
@@ -94,5 +96,6 @@ FOREACH_HIPBLASLT_API(HIPBLASLT_API_WRAPPER)
9496

9597
} // namespace wrap
9698
} // namespace stream_executor
99+
#endif // TF_HIPBLASLT
97100

98101
#endif // XLA_STREAM_EXECUTOR_ROCM_HIPBLASLT_WRAPPER_H_

0 commit comments

Comments
 (0)