Skip to content

[develop-upstream-QA-rocm65] Add gfx950 #2937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop-upstream-QA-rocm65
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_rocm_python3
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ shift "$((OPTIND-1))"

# This is not a release branch, so force a nightly build
# TODO remove this when branching for release
nightly=true
#nightly=true

# First positional argument (if any) specifies the ROCM_INSTALL_DIR
ROCM_INSTALL_DIR=/opt/rocm/
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/grappler/optimizers/auto_mixed_precision.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ bool HasFastFP16Support(const DeviceProperties& props) {
#elif TENSORFLOW_USE_ROCM
absl::flat_hash_set<std::string> FP16SupportedDevices = {
{"gfx906"}, {"gfx908"}, {"gfx90a"}, {"gfx910"},
{"gfx942"}, {"gfx1010"}, {"gfx1012"}, {"gfx1030"},
{"gfx1100"}, {"gfx1101"}, {"gfx1102"},
{"gfx942"}, {"gfx950"}, {"gfx1010"}, {"gfx1012"},
{"gfx1030"}, {"gfx1100"}, {"gfx1101"}, {"gfx1102"},
{"gfx1200"}, {"gfx1201"}
};
std::string gcnArchName = props.environment().at("architecture");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ inline GpuStats GetNumGPUs(const Cluster& cluster) {
if ((compute_capability_it->second == "gfx908" ||
compute_capability_it->second == "gfx90a" ||
compute_capability_it->second == "gfx942" ||
compute_capability_it->second == "gfx950" ||
compute_capability_it->second == "gfx1101" ||
compute_capability_it->second == "gfx1102" ||
compute_capability_it->second == "gfx1200" ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY setup.packages.rocm.cs7.sh setup.packages.rocm.cs7.sh
COPY builder.packages.rocm.cs7.txt builder.packages.rocm.cs7.txt
RUN /setup.packages.rocm.cs7.sh /builder.packages.rocm.cs7.txt

ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install ROCM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY setup.packages.rocm.el8.sh setup.packages.rocm.el8.sh
COPY builder.packages.rocm.el8.txt builder.packages.rocm.el8.txt
RUN /setup.packages.rocm.el8.sh /builder.packages.rocm.el8.txt

ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install ROCM
Expand Down Expand Up @@ -68,6 +68,7 @@ ENV TF_NEED_ROCM=1
ENV TF_ROCM_GCC=1
ENV ROCM_TOOLKIT_PATH=${ROCM_PATH}

RUN touch /etc/sudoers.d/sudo-nopasswd
RUN echo 'ALL ALL=NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd

# Almalinux 8 does not have the default /usr/bin/python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM ubuntu:20.04
################################################################################

ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install build dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM ubuntu:22.04
################################################################################

ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install build dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM ubuntu:24.04
################################################################################

ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install build dependencies
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/tf_sig_build_dockerfiles/setup.rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ then
echo "build:rocm_base --copt=-fclang-abi-compat=17" >> /etc/bazel.bazelrc
fi

GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx908 gfx90a gfx942 gfx1030 gfx1100"}
GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx908 gfx90a gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201"}

echo $ROCM_VERSION
echo $ROCM_REPO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ std::string MapGCNArchNameTokenToFeatureStr(const std::string& token,
if (token == "sramecc+") {
return "+sramecc";
} else if (token == "sramecc-") {
if (gfx == "gfx90a" || gfx == "gfx942" || gfx == "gfx1101" ||
gfx == "gfx1102" || gfx == "gfx1200" || gfx == "gfx1201")
if (gfx == "gfx90a" || gfx == "gfx942" || gfx == "gfx950" ||
gfx == "gfx1101" || gfx == "gfx1102" || gfx == "gfx1200" ||
gfx == "gfx1201")
return "";
return "-sramecc";
} else if (token == "xnack+") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,12 @@ TEST_F(ConvRewriterTest, TestInvalidTypes) {
::testing::HasSubstr(
"FP8 convolutions are only supported on CUDA GPUs")));

s = ConvRewriter(se::RocmComputeCapability{"gfx950"}).Run(m.get()).status();
EXPECT_THAT(s, tsl::testing::StatusIs(
absl::StatusCode::kUnimplemented,
::testing::HasSubstr(
"FP8 convolutions are only supported on CUDA GPUs")));

// Test unsupported FP8 type
module_with_type = absl::StrReplaceAll(module_str, {{"TYPE", "f8e4m3fnuz"}});
TF_ASSERT_OK_AND_ASSIGN(m, ParseAndReturnVerifiedModule(module_with_type));
Expand Down
18 changes: 9 additions & 9 deletions third_party/xla/xla/stream_executor/device_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ class RocmComputeCapability {
std::string gcn_arch_name_ = "gfx000"; // default to invalid arch.

static constexpr absl::string_view kSupportedGfxVersions[]{
"gfx900", // MI25
"gfx906", // MI50 / MI60
"gfx908", // MI100
"gfx90a", // MI200
"gfx942", // MI300
"gfx950", // MI355
"gfx1030", // RX68xx / RX69xx
"gfx1100", "gfx1101", "gfx1102", // RX7900
"gfx1200", "gfx1201", // RX8900
"gfx900",
"gfx906",
"gfx908"
"gfx90a"
"gfx942",
"gfx950",
"gfx1030",
"gfx1100", "gfx1101", "gfx1102",
"gfx1200", "gfx1201",
};
};

Expand Down