Skip to content

Commit 03cba0f

Browse files
committed
Correcting usage of USE_ROCM
1 parent 1b8d352 commit 03cba0f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

aten/src/ATen/native/cuda/linalg/BatchLinearAlgebraLibBlas.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,12 @@ void triangular_solve_batched_cublas(const Tensor& A, const Tensor& B, bool left
239239

240240
template <typename scalar_t>
241241
inline void apply_gels_batched(const Tensor& A, Tensor& B, Tensor& infos) {
242-
#if not defined(ROCM_VERSION)
243-
auto trans = CUBLAS_OP_N;
244-
#endif
245-
#if defined(ROCM_VERSION) && (ROCM_VERSION >= 50400)
242+
#if defined(USE_ROCM) && (ROCM_VERSION >= 50400)
246243
auto trans = HIPBLAS_OP_N;
247-
#endif
248-
#if defined(ROCM_VERSION) && (ROCM_VERSION < 50400)
244+
#elif defined(USE_ROCM) && (ROCM_VERSION < 50400)
249245
auto trans = rocblas_operation_none;
246+
#else
247+
auto trans = CUBLAS_OP_N;
250248
#endif
251249
auto m = cuda_int_cast(A.size(-2), "m");
252250
auto n = cuda_int_cast(A.size(-1), "n");

0 commit comments

Comments
 (0)