From 8869b543e85c46e84778b0449d9f0c485a852011 Mon Sep 17 00:00:00 2001 From: Xiaodong Wang Date: Fri, 19 Apr 2024 19:00:31 +0000 Subject: [PATCH] [AMD] Remove deprecated macro from COnvUtils (#124158) Summary: This is not great, but our ATen-cpu is not completely GPU agnostic. Previously we have worked on D54453492 (https://github.com/pytorch/pytorch/pull/121082) and D54528255, but there are a few things we haven't resolved, and it's exploding here. So we'll continue to fix them until all are gone. This ROCm block is for 4.3 which is very old. I don't think it should be supported any more. So let's just kill this macro Test Plan: CI Differential Revision: D56172660 Pull Request resolved: https://github.com/pytorch/pytorch/pull/124158 Approved by: https://github.com/jeffdaily, https://github.com/nmacchioni --- .lintrunner.toml | 1 - aten/src/ATen/native/ConvUtils.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 6bd56ba7ac69..3a161851e370 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -2269,7 +2269,6 @@ exclude_patterns = [ "aten/src/ATen/Context.cpp", "aten/src/ATen/DLConvertor.cpp", "aten/src/ATen/core/Array.h", - "aten/src/ATen/native/ConvUtils.h", "aten/src/ATen/native/quantized/ConvUtils.h", "aten/src/ATen/native/sparse/SparseBlasImpl.cpp", # triton implementation "aten/src/ATen/native/transformers/attention.cpp", diff --git a/aten/src/ATen/native/ConvUtils.h b/aten/src/ATen/native/ConvUtils.h index 5d2691b9761e..4b814f3e442c 100644 --- a/aten/src/ATen/native/ConvUtils.h +++ b/aten/src/ATen/native/ConvUtils.h @@ -358,7 +358,6 @@ static inline bool miopen_conv_use_channels_last(const at::Tensor& input, const } bool can_use_miopen_channels_last_2d = false; -#if defined(USE_ROCM) && (ROCM_VERSION >= 40300) // TODO: Remove PYTORCH_MIOPEN_SUGGEST_NHWC once ROCm officially supports NHWC in MIOpen // See #64427 static c10::optional PYTORCH_MIOPEN_SUGGEST_NHWC = c10::utils::check_env("PYTORCH_MIOPEN_SUGGEST_NHWC"); @@ -370,7 +369,6 @@ static inline bool miopen_conv_use_channels_last(const at::Tensor& input, const ( (input_memory_format == at::MemoryFormat::ChannelsLast) || (weight_memory_format == at::MemoryFormat::ChannelsLast) ) ); -#endif bool can_use_miopen_channels_last_3d = false;