Skip to content

Commit da57849

Browse files
jeffdailynaromero77amd
authored andcommitted
[ROCm] enable gfx110x for hipblaslt (pytorch#137317)
Fixes pytorch#136347. Pull Request resolved: pytorch#137317 Approved by: https://github.com/Skylion007, https://github.com/jithunnair-amd Co-authored-by: Nichols A. Romero <[email protected]>
1 parent 41ccfc8 commit da57849

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

aten/src/ATen/Context.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,12 @@ at::BlasBackend Context::blasPreferredBackend() {
290290
#ifdef USE_ROCM
291291
if (blas_preferred_backend == at::BlasBackend::Cublaslt) {
292292
static const bool hipblaslt_unsupported = []() {
293-
static const std::vector<std::string> archs = {"gfx90a", "gfx940", "gfx941", "gfx942"};
293+
static const std::vector<std::string> archs = {
294+
"gfx90a", "gfx940", "gfx941", "gfx942",
295+
#if ROCM_VERSION >= 60300
296+
"gfx1100", "gfx1101"
297+
#endif
298+
};
294299
for (auto index: c10::irange(getNumGPUs())) {
295300
if (!detail::getCUDAHooks().isGPUArch(index, archs)) {
296301
TORCH_WARN_ONCE(

aten/src/ATen/native/cuda/Blas.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ static bool getDisableAddmmCudaLt() {
201201
static bool isSupportedHipLtROCmArch(int index) {
202202
hipDeviceProp_t* prop = at::cuda::getDeviceProperties(index);
203203
std::string device_arch = prop->gcnArchName;
204-
static const std::vector<std::string> archs = {"gfx90a", "gfx940", "gfx941", "gfx942"};
204+
static const std::vector<std::string> archs = {
205+
"gfx90a", "gfx940", "gfx941", "gfx942",
206+
#if ROCM_VERSION >= 60300
207+
"gfx1100", "gfx1101"
208+
#endif
209+
};
205210
for (std::string arch : archs) {
206211
size_t substring = device_arch.find(arch);
207212
if (substring != std::string::npos) {

0 commit comments

Comments
 (0)