Skip to content

Commit

Permalink
Merge pull request #23891 from ROCm:build-fixes-rollup
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681448694
  • Loading branch information
Google-ML-Automation committed Oct 2, 2024
2 parents b8a066a + 9ff891d commit e212c77
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
9 changes: 2 additions & 7 deletions build/rocm/Dockerfile.ms
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN --mount=type=cache,target=/var/cache/apt \
ARG GPU_DEVICE_TARGETS="gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100"
ENV GPU_DEVICE_TARGETS=${GPU_DEVICE_TARGETS}

# Install ROCM
# Install ROCm
ARG ROCM_VERSION=6.0.0
ARG ROCM_PATH=/opt/rocm-${ROCM_VERSION}
ENV ROCM_PATH=${ROCM_PATH}
Expand All @@ -19,13 +19,8 @@ RUN --mount=type=bind,source=build/rocm/tools/get_rocm.py,target=get_rocm.py \
--mount=type=cache,target=/var/cache/apt \
python3 get_rocm.py --rocm-version=$ROCM_VERSION --job-name=$ROCM_BUILD_JOB --build-num=$ROCM_BUILD_NUM

# Set up paths
ENV HCC_HOME=$ROCM_PATH/hcc
ENV HIP_PATH=$ROCM_PATH/
ENV OPENCL_ROOT=$ROCM_PATH/opencl
ENV PATH="$HCC_HOME/bin:$HIP_PATH/bin:${PATH}"
# add ROCm bins to PATH
ENV PATH="$ROCM_PATH/bin:${PATH}"
ENV PATH="$OPENCL_ROOT/bin:${PATH}"
ENV PATH="/root/bin:/root/.local/bin:$PATH"

# install pyenv and python build dependencies
Expand Down
10 changes: 7 additions & 3 deletions build/rocm/ci_build
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ def image_by_name(name):


def dist_wheels(
rocm_version, python_versions, xla_path, rocm_build_job="", rocm_build_num="",
compiler="gcc"
rocm_version,
python_versions,
xla_path,
rocm_build_job="",
rocm_build_num="",
compiler="gcc",
):
if xla_path:
xla_path = os.path.abspath(xla_path)
Expand Down Expand Up @@ -260,7 +264,7 @@ def parse_args():
p.add_argument(
"--compiler",
choices=["gcc", "clang"],
help="Compiler backend to use when compiling jax/jaxlib"
help="Compiler backend to use when compiling jax/jaxlib",
)

subp = p.add_subparsers(dest="action", required=True)
Expand Down
4 changes: 3 additions & 1 deletion build/rocm/tools/build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def update_rocm_targets(rocm_path, targets):
open(version_fp, "a").close()


def build_jaxlib_wheel(jax_path, rocm_path, python_version, xla_path=None, compiler="gcc"):
def build_jaxlib_wheel(
jax_path, rocm_path, python_version, xla_path=None, compiler="gcc"
):
use_clang = "true" if compiler == "clang" else "false"
cmd = [
"python",
Expand Down
3 changes: 2 additions & 1 deletion build/rocm/tools/get_rocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,12 @@ def setup_repos_el8(rocm_version_str):
"""
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/latest/rhel/8.8/main/x86_64/
baseurl=https://repo.radeon.com/amdgpu/%s/rhel/8.8/main/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
"""
% rocm_version_str
)


Expand Down

0 comments on commit e212c77

Please sign in to comment.