diff --git a/.bazelrc b/.bazelrc index 864daf76feed..000619d838f1 100644 --- a/.bazelrc +++ b/.bazelrc @@ -158,7 +158,7 @@ build:win_clang --compiler=clang-cl build:rocm_base --crosstool_top=@local_config_rocm//crosstool:toolchain build:rocm_base --define=using_rocm=true --define=using_rocm_hipcc=true build:rocm_base --repo_env TF_NEED_ROCM=1 -build:rocm_base --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100" +build:rocm_base --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100,gfx1200,gfx1201" # Build with hipcc for ROCm and clang for the host. build:rocm --config=rocm_base diff --git a/build/build.py b/build/build.py index 7d4783f01670..d2f68f80efc6 100755 --- a/build/build.py +++ b/build/build.py @@ -241,7 +241,7 @@ def add_artifact_subcommand_arguments(parser: argparse.ArgumentParser): rocm_group.add_argument( "--rocm_amdgpu_targets", type=str, - default="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100", + default="gfx900,gfx906,gfx908,gfx90a,gfx940,gfx941,gfx942,gfx1030,gfx1100,gfx1200,gfx1201", help="A comma-separated list of ROCm amdgpu targets to support.", ) diff --git a/build/rocm/Dockerfile.ms b/build/rocm/Dockerfile.ms index 575dce87664e..a084045256de 100644 --- a/build/rocm/Dockerfile.ms +++ b/build/rocm/Dockerfile.ms @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Add target file to help determine which device(s) to build for -ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100" +ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201" ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS} # Install ROCm diff --git a/build/rocm/build_wheels/Dockerfile.manylinux_2_28_x86_64.rocm b/build/rocm/build_wheels/Dockerfile.manylinux_2_28_x86_64.rocm index 6e610e711c77..b0bc8500341b 100644 --- a/build/rocm/build_wheels/Dockerfile.manylinux_2_28_x86_64.rocm +++ b/build/rocm/build_wheels/Dockerfile.manylinux_2_28_x86_64.rocm @@ -11,7 +11,7 @@ RUN --mount=type=cache,target=/var/cache/dnf \ --mount=type=bind,source=build/rocm/tools/get_rocm.py,target=get_rocm.py \ python3 get_rocm.py --rocm-version=$ROCM_VERSION --job-name=$ROCM_BUILD_JOB --build-num=$ROCM_BUILD_NUM -ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100" +ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201" RUN printf '%s\n' > /opt/rocm/bin/target.lst ${GPU_DEVICE_TARGETS} # Install LLVM 18 and dependencies. diff --git a/build/rocm/docker/Dockerfile.jax-ubu22 b/build/rocm/docker/Dockerfile.jax-ubu22 index eb971482f708..70b16f9e9677 100644 --- a/build/rocm/docker/Dockerfile.jax-ubu22 +++ b/build/rocm/docker/Dockerfile.jax-ubu22 @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Add target file to help determine which device(s) to build for -ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100" +ARG GPU_DEVICE_TARGETS="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201" ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS} # Install ROCM diff --git a/build/rocm/docker/Dockerfile.jax-ubu24 b/build/rocm/docker/Dockerfile.jax-ubu24 index da714542e5f8..866536539840 100644 --- a/build/rocm/docker/Dockerfile.jax-ubu24 +++ b/build/rocm/docker/Dockerfile.jax-ubu24 @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Add target file to help determine which device(s) to build for -ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100" +ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201" ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS} # Install ROCM diff --git a/build/rocm/setup.rocm.sh b/build/rocm/setup.rocm.sh index 35c8f4c5166c..3893d817e3a8 100755 --- a/build/rocm/setup.rocm.sh +++ b/build/rocm/setup.rocm.sh @@ -95,6 +95,6 @@ echo $ROCM_PATH echo $GPU_DEVICE_TARGETS # Ensure the ROCm target list is set up -GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100"} +GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS:-"gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201"} printf '%s\n' ${GPU_DEVICE_TARGETS} | tee -a "$ROCM_PATH/bin/target.lst" touch "${ROCM_PATH}/.info/version" diff --git a/build/rocm/tools/build_wheels.py b/build/rocm/tools/build_wheels.py index 33f2e100de61..5fd24725b95c 100644 --- a/build/rocm/tools/build_wheels.py +++ b/build/rocm/tools/build_wheels.py @@ -35,7 +35,7 @@ LOG = logging.getLogger(__name__) -GPU_DEVICE_TARGETS = "gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100" +GPU_DEVICE_TARGETS = "gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1200 gfx1201" def build_rocm_path(rocm_version_str):