Skip to content

Commit 46e4741

Browse files
Allow all RDNA2 archs to use sdot4 intrinsic (#8629)
The check gating the use of `__builtin_amdgc_sdot4` specifically checks for gfx1030. This causes a severe perf regression for anything gfx103? that's not gfx1030 and not using `HSA_OVERRIDE_GFX_VERSION` (if you've built ROCm to support it). We already have a generic RDNA2 define, let's use it.
1 parent e7e6487 commit 46e4741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cuda/common.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static __device__ __forceinline__ uint32_t __hgt2_mask(const half2 a, const half
459459

460460
static __device__ __forceinline__ int ggml_cuda_dp4a(const int a, const int b, int c) {
461461
#if defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)
462-
#if defined(__gfx906__) || defined(__gfx908__) || defined(__gfx90a__) || defined(__gfx1030__)
462+
#if defined(__gfx906__) || defined(__gfx908__) || defined(__gfx90a__) || defined(RDNA2)
463463
c = __builtin_amdgcn_sdot4(a, b, c, false);
464464
#elif defined(RDNA3)
465465
c = __builtin_amdgcn_sudot4( true, a, true, b, c, false);

0 commit comments

Comments
 (0)