spack/var/spack/repos/builtin/packages/magma/0001-fix-magma-build-error-with-rocm-6.0.0.patch
renjithravindrankannath c673979fee
Bump up the version for ROCm-6.0.0 (#42026)
* Bump up the version for ROCm-6.0.0
* Adding patch files
* Style check failure fix
* Style check fixes
* Style check error fixes
* Patch to remove hipblas client file installation in 6.0
* Patch need to be applied on all 5.7 relases
* 6.0 update for math libs and other packages, new github url etc
* Correct package-audit failures
* Correcting shasum for rocfft patch and limiting patch in rocblas
* Reverting updates in rocprofiler-dev due to ci-gitlab failure
* Fixes for ci-gitlab failure due to disabling hip backward compatibilit
* Adding patch file to Change HIP_PLATFORM from HCC to AMD and NVCC to NVIDIA
* Use the gcnArchName inplace of gcnArch as gcnArch is deprecated from rocm-6.0.0
* Patches to fix magma and blaspp build error with rocm 6.0.0
* Patch for mfem and arborx for rocm 6.0
* Style check error fix
* Correcting style check errors
* Uodating dependent version
* Update for petsc to build with rocm 6.0
  Need reverting-operator-mixup-fix-for-slate.patch for rocm 6.0
* Reverting the change in url for 2.7.4-rocm-enhanced
* hip-tensor 6.0.0 update
2024-01-22 10:19:28 -08:00

100 lines
3.9 KiB
Diff

From 4f7d9ff22996ba3000ee344a0f84f73c27257f47 Mon Sep 17 00:00:00 2001
From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
Date: Wed, 17 Jan 2024 11:44:32 +0000
Subject: [PATCH] Fix Build Failure with rocm-6.0.0 . Add extra parameter for
hipblasZtrmm(),hipblasCtrmm()etc
---
interface_hip/blas_c_v2.cpp | 3 ++-
interface_hip/blas_d_v2.cpp | 3 ++-
interface_hip/blas_s_v2.cpp | 3 ++-
interface_hip/blas_z_v2.cpp | 3 ++-
interface_hip/interface.cpp | 5 ++---
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/interface_hip/blas_c_v2.cpp b/interface_hip/blas_c_v2.cpp
index 6147857..a406faf 100644
--- a/interface_hip/blas_c_v2.cpp
+++ b/interface_hip/blas_c_v2.cpp
@@ -1858,7 +1858,8 @@ magma_ctrmm(
hipblas_diag_const( diag ),
int(m), int(n),
(hipblasComplex*)&alpha, (const hipblasComplex*)dA, int(ldda),
- (hipblasComplex*)dB, int(lddb) );
+ (hipblasComplex*)dB, int(lddb),
+ (hipblasComplex*)dB, int(lddb) ); /* C same as B; less efficient */
#else
hipblasCtrmm(
queue->hipblas_handle(),
diff --git a/interface_hip/blas_d_v2.cpp b/interface_hip/blas_d_v2.cpp
index 340f0b2..8c1ecd4 100644
--- a/interface_hip/blas_d_v2.cpp
+++ b/interface_hip/blas_d_v2.cpp
@@ -1858,7 +1858,8 @@ magma_dtrmm(
hipblas_diag_const( diag ),
int(m), int(n),
(double*)&alpha, (const double*)dA, int(ldda),
- (double*)dB, int(lddb) );
+ (double*)dB, int(lddb),
+ (double*)dB, int(lddb) ); /* C same as B; less efficient */
#else
hipblasDtrmm(
queue->hipblas_handle(),
diff --git a/interface_hip/blas_s_v2.cpp b/interface_hip/blas_s_v2.cpp
index 87aeba3..a2cfc02 100644
--- a/interface_hip/blas_s_v2.cpp
+++ b/interface_hip/blas_s_v2.cpp
@@ -1858,7 +1858,8 @@ magma_strmm(
hipblas_diag_const( diag ),
int(m), int(n),
(float*)&alpha, (const float*)dA, int(ldda),
- (float*)dB, int(lddb) );
+ (float*)dB, int(lddb),
+ (float*)dB, int(lddb) ); /* C same as B; less efficient */
#else
hipblasStrmm(
queue->hipblas_handle(),
diff --git a/interface_hip/blas_z_v2.cpp b/interface_hip/blas_z_v2.cpp
index 3c7e87a..eb9e2e6 100644
--- a/interface_hip/blas_z_v2.cpp
+++ b/interface_hip/blas_z_v2.cpp
@@ -1858,7 +1858,8 @@ magma_ztrmm(
hipblas_diag_const( diag ),
int(m), int(n),
(hipblasDoubleComplex*)&alpha, (const hipblasDoubleComplex*)dA, int(ldda),
- (hipblasDoubleComplex*)dB, int(lddb) );
+ (hipblasDoubleComplex*)dB, int(lddb),
+ (hipblasDoubleComplex*)dB, int(lddb) ); /* C same as B; less efficient */
#else
hipblasZtrmm(
queue->hipblas_handle(),
diff --git a/interface_hip/interface.cpp b/interface_hip/interface.cpp
index 2b35b34..7c76426 100644
--- a/interface_hip/interface.cpp
+++ b/interface_hip/interface.cpp
@@ -209,11 +209,10 @@ magma_init()
else {
g_magma_devices[dev].memory = prop.totalGlobalMem;
g_magma_devices[dev].shmem_block = prop.sharedMemPerBlock;
- #ifdef MAGMA_HAVE_CUDA
g_magma_devices[dev].cuda_arch = prop.major*100 + prop.minor*10;
+ #ifdef MAGMA_HAVE_CUDA
g_magma_devices[dev].shmem_multiproc = prop.sharedMemPerMultiprocessor;
#elif defined(MAGMA_HAVE_HIP)
- g_magma_devices[dev].cuda_arch = prop.gcnArch;
g_magma_devices[dev].shmem_multiproc = prop.maxSharedMemoryPerMultiProcessor;
#endif
@@ -464,7 +463,7 @@ magma_print_environment()
prop.name,
prop.clockRate / 1000.,
prop.totalGlobalMem / (1024.*1024.),
- prop.gcnArch );
+ prop.gcnArchName );
#endif
}
--
2.39.3