From 34b4d2bdd7013dacd6b9558f1b50b16dd84c74e3 Mon Sep 17 00:00:00 2001 From: Jagadish Krishnamoorthy Date: Tue, 20 May 2025 13:20:42 -0700 Subject: [PATCH] ROCm: Add trailing comma for consistency in gfx architecture Ported from upstream https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/150250.patch and fixed patch error Signed-off-by: Jagadish Krishnamoorthy --- aten/src/ATen/Context.cpp | 2 +- aten/src/ATen/native/cuda/Blas.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aten/src/ATen/Context.cpp b/aten/src/ATen/Context.cpp index 43875d938e1f5..c0a05f82f9ea8 100644 --- a/aten/src/ATen/Context.cpp +++ b/aten/src/ATen/Context.cpp @@ -362,7 +362,7 @@ at::BlasBackend Context::blasPreferredBackend() { static const std::vector archs = { "gfx90a", "gfx942", #if ROCM_VERSION >= 60300 - "gfx1100", "gfx1101", "gfx1200", "gfx1201" + "gfx1100", "gfx1101", "gfx1200", "gfx1201", #endif #if ROCM_VERSION >= 60500 "gfx950" diff --git a/aten/src/ATen/native/cuda/Blas.cpp b/aten/src/ATen/native/cuda/Blas.cpp index 72c60082ee59c..66bb1c5ec285c 100644 --- a/aten/src/ATen/native/cuda/Blas.cpp +++ b/aten/src/ATen/native/cuda/Blas.cpp @@ -257,9 +257,9 @@ static bool isSupportedHipLtROCmArch(int index) { hipDeviceProp_t* prop = at::cuda::getDeviceProperties(index); std::string device_arch = prop->gcnArchName; static const std::vector archs = { - "gfx90a", "gfx942" + "gfx90a", "gfx942", #if ROCM_VERSION >= 60300 - , "gfx1200", "gfx1201" + "gfx1200", "gfx1201", #endif #if ROCM_VERSION >= 60500 "gfx950" @@ -934,7 +934,7 @@ static bool _scaled_mm_allowed_device() { static const std::vector archs = { "gfx942", #if ROCM_VERSION >= 60300 - "gfx1200", "gfx1201" + "gfx1200", "gfx1201", #endif #if ROCM_VERSION >= 60500 "gfx950"