Skip to content

Commit 749be34

Browse files
committed
Remove gfx940 and gfx941
1 parent 3136d10 commit 749be34

File tree

12 files changed

+17
-25
lines changed

12 files changed

+17
-25
lines changed

tensorflow/core/grappler/optimizers/auto_mixed_precision.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool HasFastFP16Support(const DeviceProperties& props) {
115115
return GetDeviceGPUArch(props) >= kMinGPUArch;
116116
#elif TENSORFLOW_USE_ROCM
117117
absl::flat_hash_set<std::string> FP16SupportedDevices = {
118-
{"gfx906"}, {"gfx908"}, {"gfx90a"}, {"gfx910"}, {"gfx940"}, {"gfx941"},
118+
{"gfx906"}, {"gfx908"}, {"gfx90a"}, {"gfx910"},
119119
{"gfx942"}, {"gfx1010"}, {"gfx1012"}, {"gfx1030"},
120120
{"gfx1100"}, {"gfx1101"}, {"gfx1102"},
121121
{"gfx1200"}, {"gfx1201"}

tensorflow/core/grappler/optimizers/generic_layout_optimizer.cc

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ inline GpuStats GetNumGPUs(const Cluster& cluster) {
7070
bool is_enabled = se::gpu::UseNhwcLayoutForRocm();
7171
if ((compute_capability_it->second == "gfx908" ||
7272
compute_capability_it->second == "gfx90a" ||
73-
compute_capability_it->second == "gfx940" ||
74-
compute_capability_it->second == "gfx941" ||
7573
compute_capability_it->second == "gfx942" ||
7674
compute_capability_it->second == "gfx1101" ||
7775
compute_capability_it->second == "gfx1102" ||

tensorflow/core/util/gpu_device_functions.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ __device__ inline double GpuAtomicAdd(double* ptr, double value) {
743743
}
744744
#endif
745745

746-
#if __gfx908__ || __gfx90a__ || __gfx940__ || __gfx941__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
746+
#if __gfx908__ || __gfx90a__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
747747

748748
#define ADDRSP1 __attribute__((address_space(1)))
749749
__device__ float
@@ -963,7 +963,7 @@ __device__ inline int64_t GpuAtomicMin(int64_t* ptr, int64_t value) {
963963
}
964964
#endif
965965

966-
#if __gfx908__ || __gfx90a__ || __gfx940__ || __gfx941__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
966+
#if __gfx908__ || __gfx90a__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
967967
// Low level instructions don't return. For now, assume that return value
968968
// is always unused.
969969
__device__ float GpuAtomicAdd(float* dst, float val) {
@@ -978,7 +978,7 @@ __device__ inline T GpuAtomicAddShared(T* ptr, T value) {
978978
return GpuAtomicAdd(ptr, value);
979979
}
980980

981-
#if __gfx908__ || __gfx90a__ || __gfx940__ || __gfx941__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
981+
#if __gfx908__ || __gfx90a__ || __gfx942__ || __gfx1101__ || __gfx1102__ || __gfx1200__ || __gfx1201__
982982
__device__ float GpuAtomicAddShared(float* dst, float val) {
983983
atomicAdd(dst, val);
984984
return val;

tensorflow/tools/ci_build/Dockerfile.rocm

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG ROCM_DEB_REPO=https://repo.radeon.com/rocm/apt/6.2/
77
ARG ROCM_BUILD_NAME=ubuntu
88
ARG ROCM_BUILD_NUM=main
99
ARG ROCM_PATH=/opt/rocm/
10-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
10+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
1111

1212
ARG DEBIAN_FRONTEND=noninteractive
1313
ENV TF_NEED_ROCM 1

tensorflow/tools/tf_sig_build_dockerfiles/Dockerfile.rocm.manylinux2014

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY setup.packages.rocm.cs7.sh setup.packages.rocm.cs7.sh
88
COPY builder.packages.rocm.cs7.txt builder.packages.rocm.cs7.txt
99
RUN /setup.packages.rocm.cs7.sh /builder.packages.rocm.cs7.txt
1010

11-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
11+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
1212
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}
1313

1414
# Install ROCM

tensorflow/tools/tf_sig_build_dockerfiles/Dockerfile.rocm.manylinux_2_28

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ COPY setup.packages.rocm.el8.sh setup.packages.rocm.el8.sh
1717
COPY builder.packages.rocm.el8.txt builder.packages.rocm.el8.txt
1818
RUN /setup.packages.rocm.el8.sh /builder.packages.rocm.el8.txt
1919

20-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
20+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
2121
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}
2222

2323
# Install ROCM

tensorflow/tools/tf_sig_build_dockerfiles/Dockerfile.rocm.ub20

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:20.04
33
################################################################################
44

5-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
5+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
66
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}
77

88
# Install build dependencies

tensorflow/tools/tf_sig_build_dockerfiles/Dockerfile.rocm.ub22

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:22.04
33
################################################################################
44

5-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
5+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
66
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}
77

88
# Install build dependencies

tensorflow/tools/tf_sig_build_dockerfiles/Dockerfile.rocm.ub24

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:24.04
33
################################################################################
44

5-
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
5+
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
66
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}
77

88
# Install build dependencies

tensorflow/tools/tf_sig_build_dockerfiles/setup.rocm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ then
145145
echo "build:rocm_base --copt=-fclang-abi-compat=17" >> /etc/bazel.bazelrc
146146
fi
147147

148-
GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100"}
148+
GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx908 gfx90a gfx942 gfx1030 gfx1100"}
149149

150150
echo $ROCM_VERSION
151151
echo $ROCM_REPO

third_party/xla/xla/service/gpu/llvm_gpu_backend/amdgpu_backend.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@ std::string MapGCNArchNameTokenToFeatureStr(const std::string& token,
339339
if (token == "sramecc+") {
340340
return "+sramecc";
341341
} else if (token == "sramecc-") {
342-
if (gfx == "gfx90a" || gfx == "gfx940" || gfx == "gfx941" ||
343-
gfx == "gfx942" || gfx == "gfx1101" || gfx == "gfx1102" ||
344-
gfx == "gfx1200" || gfx == "gfx1201")
342+
if (gfx == "gfx90a" || gfx == "gfx942" || gfx == "gfx1101" ||
343+
gfx == "gfx1102" || gfx == "gfx1200" || gfx == "gfx1201")
345344
return "";
346345
return "-sramecc";
347346
} else if (token == "xnack+") {

third_party/xla/xla/stream_executor/device_description.h

+4-9
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,15 @@ class RocmComputeCapability {
7171

7272
bool gfx9_mi200() const { return gfx_version() == "gfx90a"; }
7373

74-
bool gfx9_mi300() const {
75-
static constexpr absl::string_view kList[] = {"gfx940", "gfx941", "gfx942"};
76-
return absl::c_count(kList, gfx_version()) != 0;
77-
}
74+
bool gfx9_mi300() const { return gfx_version() == "gfx942"; }
7875

7976
bool gfx9_mi100_or_later() const {
80-
static constexpr absl::string_view kList[] = {"gfx908", "gfx90a", "gfx940",
81-
"gfx941", "gfx942"};
77+
static constexpr absl::string_view kList[] = {"gfx908", "gfx90a", "gfx942"};
8278
return absl::c_count(kList, gfx_version()) != 0;
8379
}
8480

8581
bool gfx9_mi200_or_later() const {
86-
static constexpr absl::string_view kList[] = {"gfx90a", "gfx940", "gfx941",
87-
"gfx942"};
82+
static constexpr absl::string_view kList[] = {"gfx90a", "gfx942"};
8883
return absl::c_count(kList, gfx_version()) != 0;
8984
}
9085

@@ -156,7 +151,7 @@ class RocmComputeCapability {
156151
"gfx906", // MI50 / MI60
157152
"gfx908", // MI100
158153
"gfx90a", // MI200
159-
"gfx940", "gfx941", "gfx942", // MI300
154+
"gfx942", // MI300
160155
"gfx1030", // RX68xx / RX69xx
161156
"gfx1100", "gfx1101", "gfx1102", // RX7900
162157
"gfx1200", "gfx1201", // RX8900

0 commit comments

Comments
 (0)