Skip to content

Commit

Permalink
PR #21901: Ci add rocm6.1 deps for ubuntu 20.04
Browse files Browse the repository at this point in the history
Imported from GitHub PR openxla/xla#21901

Add rocm 6.1.0 dependency for ubuntu 20.04
Copybara import of the project:

--
0acf028eeca5923c7f2aa5762297686836eda310 by Alexandros Theodoridis <[email protected]>:

Add rocm6.1 deps for ubuntu 20.04

--
fc88c83061d6efff2482599489d622ab3114b9a7 by Alexandros Theodoridis <[email protected]>:

Fix hermetic build for 6.0

--
73ace5591f4731e1b95b6d3e6a349b528977c580 by Alexandros Theodoridis <[email protected]>:

Add ci config for hermetic build

--
bbc048bcffd9d35bfad76ff816ed22f3e3f761f8 by Alexandros Theodoridis <[email protected]>:

Introduce rocm 6.1.0 dependency for 22.04

--
9776f398c2711ba37333d29b934d6ba67c55dbef by Alexandros Theodoridis <[email protected]>:

Add missing 24.04 redist

--
acf275d57cc185b9c2122d5930d8cf54e473ad95 by Alexandros Theodoridis <[email protected]>:

Fix test

--
3e49285b0f55597ab5f44c1d0a422bf931d72cda by Alexandros Theodoridis <[email protected]>:

Add comment explaining the reason for a new target

--
35838bf8d6e678717e9b1c551f840918b00a91f8 by Alexandros Theodoridis <[email protected]>:

Rever force verbose in the compiler wrapper

--
2952e115b044e1a8ac8aadc7eac7802e8d79cf91 by Alexandros Theodoridis <[email protected]>:

Add explanation comment for the new target

Merging this change closes #21901

PiperOrigin-RevId: 721043735
  • Loading branch information
alekstheod authored and copybara-github committed Jan 29, 2025
1 parent 5192699 commit 62a9164
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ build:rocm_clang_official --linkopt="-fuse-ld=lld"
build:rocm_clang_official --host_linkopt="-fuse-ld=lld"

build:rocm_ci --config=rocm_clang_official
build:rocm_ci_hermetic --config=rocm_clang_official
build:rocm_ci_hermetic --repo_env="OS=ubuntu_22.04"
build:rocm_ci_hermetic --repo_env="ROCM_VERSION=6.2.0"
build:rocm_ci_hermetic --@local_config_rocm//rocm:use_rocm_hermetic_rpath=True

build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
build:sycl --define=using_sycl=true
Expand Down
25 changes: 17 additions & 8 deletions third_party/gpus/rocm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,31 @@ cc_library(
}),
)

# This target is required to
# add includes that are used by rocm headers themself
# through the virtual includes
# cleaner solution would be to adjust the xla code
# and remove include prefix that is used to include rocm headers.
cc_library(
name = "rocm_headers_includes",
hdrs = glob([
"%{rocm_root}/include/**",
]),
strip_include_prefix = "%{rocm_root}/include",
)

cc_library(
name = "rocm_headers",
hdrs = glob([
"%{rocm_root}/include/**",
"%{rocm_root}/lib/llvm/lib/**/*.h",
]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
"%{rocm_root}/include/rocrand",
"%{rocm_root}/include/roctracer",
],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [
":rocm_rpath",
":rocm_headers_includes",
],
)

Expand All @@ -91,8 +100,8 @@ cc_library(
":rocm_config",
":rocprofiler_register",
":rocsolver",
":roctracer",
":rocsparse",
":roctracer",
] + select_threshold(
above_or_eq = [":hipfft"],
below = [":rocfft"],
Expand Down Expand Up @@ -138,7 +147,7 @@ cc_library(

cc_library(
name = "rocm_hip",
srcs = glob(["%{rocm_root}/lib/libamdhip*.so*"]),
srcs = glob(["%{rocm_root}/lib/libamdhip*.so"]),
hdrs = glob(["%{rocm_root}/include/hip/**"]),
include_prefix = "rocm",
includes = [
Expand Down Expand Up @@ -214,7 +223,7 @@ cc_library(

cc_library(
name = "miopen",
hdrs = glob(["%{rocm_root}/include/rccl/**"]),
hdrs = glob(["%{rocm_root}/include/miopen/**"]),
data = glob([
"%{rocm_root}/lib/libMIOpen*.so*",
"%{rocm_root}/share/miopen/**",
Expand Down
181 changes: 181 additions & 0 deletions third_party/gpus/rocm/rocm_redist_ubuntu_20_04.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,185 @@ rocm_redist_ubuntu_20_04 = {
],
"rocm_root": "opt/rocm-6.2.0",
},
"6.1.0": {
"archives": [
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/c/comgr6.1.0/comgr6.1.0_2.7.0.60100-82~20.04_amd64.deb",
sha256 = "8d2e99edf6d42ddcfa5269165ebfdb05476188478c2fe0ff4ad5c6a6f4c4bc43",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hip-runtime-amd/hip-runtime-amd_6.1.40091.60100-82~20.04_amd64.deb",
sha256 = "c9a1e9d88e22d94022eb8e7297d687cd28bce7122a0448ac3a9856593799d632",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hip-dev6.1.0/hip-dev6.1.0_6.1.40091.60100-82~20.04_amd64.deb",
sha256 = "0eef319439a66a317b29a8966896a3aee9d234ceddb7561458f96699c8dc5e6c",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipblas6.1.0/hipblas6.1.0_2.1.0.60100-82~20.04_amd64.deb",
sha256 = "71c247d7bc0d91b738b2ada4e44fc54e74d6cd86598827b1002207c9a4553151",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipblas-dev6.1.0/hipblas-dev6.1.0_2.1.0.60100-82~20.04_amd64.deb",
sha256 = "6280d93934d9d91c6ab1ddda2494bc3f8acb6eb2fc056c7e62cfbf9cac963e32",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipcc6.1.0/hipcc6.1.0_1.0.0.60100-82~20.04_amd64.deb",
sha256 = "a79627c50fbf88f63935004cb3e7f88a8bcf315bb11aabfd3d55fd7d6c65723b",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipcub-dev6.1.0/hipcub-dev6.1.0_3.1.0.60100-82~20.04_amd64.deb",
sha256 = "1f6e7b113687f8d2389f6681dc8f0da8b6208debd00af860025ffaf605e37090",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipfft6.1.0/hipfft6.1.0_1.0.14.60100-82~20.04_amd64.deb",
sha256 = "77e234ad957b75801516d7e201328126067a410eb0179b4c0cf66200dca51579",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipfft-dev6.1.0/hipfft-dev6.1.0_1.0.14.60100-82~20.04_amd64.deb",
sha256 = "9897ae1bcd8f09d8736570787caf42fcf9480de33a7cc26384fbbd1a59a37ee5",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipsolver6.1.0/hipsolver6.1.0_2.1.0.60100-82~20.04_amd64.deb",
sha256 = "5d75bcc5490bee4fc83290792c553e1447aa4a4bd8581263d8c0530eaff8e84c",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipsolver-dev6.1.0/hipsolver-dev6.1.0_2.1.0.60100-82~20.04_amd64.deb",
sha256 = "3cf5007fe92ecfc6aaf61f0b2fd01de10f3650c83f5dc1f927379f89326b9c88",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipsparse6.1.0/hipsparse6.1.0_3.0.1.60100-82~20.04_amd64.deb",
sha256 = "ec7d5084d7bb468b6333f486670a17f9fe2e50b725701e7d1c6507960fe7165d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hipsparse-dev6.1.0/hipsparse-dev6.1.0_3.0.1.60100-82~20.04_amd64.deb",
sha256 = "16bb3224eecd4bef18618cddaf6d39be5604b1657a530e859ee2d58e291583c9",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hiprand6.1.0/hiprand6.1.0_2.10.16.60100-82~20.04_amd64.deb",
sha256 = "26e2d7207c520346aee45feada559c534f891c05a42aeaae9eb088f438b02882",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hiprand-dev6.1.0/hiprand-dev6.1.0_2.10.16.60100-82~20.04_amd64.deb",
sha256 = "f5bc772653bcdb2dd175843a290c55c2365e6d14f2ed10cd6416af27196662d8",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hsa-rocr6.1.0/hsa-rocr6.1.0_1.13.0.60100-82~20.04_amd64.deb",
sha256 = "54101ca7659857065a1fb1310e1ca676d65b10f099d2d32779c6e63fff365b9d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/m/miopen-hip6.1.0/miopen-hip6.1.0_3.1.0.60100-82~20.04_amd64.deb",
sha256 = "16badbf9ac54e6d3e98155ec8d79b40c05b757c0ff2e8561ee6a141b87f19084",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/m/miopen-hip-dev6.1.0/miopen-hip-dev6.1.0_3.1.0.60100-82~20.04_amd64.deb",
sha256 = "9de62c9775ff18a4043cdc01b67fb7f3fa3416964d111faf80ddaae467b3e73a",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rccl6.1.0/rccl6.1.0_2.18.6.60100-82~20.04_amd64.deb",
sha256 = "78816c8f233b202f82c38b8ea271bec488606f64d8ec626f27a3fc0df85b2785",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rccl-dev6.1.0/rccl-dev6.1.0_2.18.6.60100-82~20.04_amd64.deb",
sha256 = "8e6e2a1e3378e2ef3322a636d713133fb7380fbeb6e564976623801cb7200aea",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocblas6.1.0/rocblas6.1.0_4.1.0.60100-82~20.04_amd64.deb",
sha256 = "214f600887472639bcb3462ea5aa79583f4f6748c9eaa8bec2d343c1fb6bb9e4",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocblas-dev/rocblas-dev_4.1.0.60100-82~20.04_amd64.deb",
sha256 = "32d9d16eda1e94a8d5af14e1bbe94d48bada4846f52b75c4b82f7b81abeaef9e",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocfft6.1.0/rocfft6.1.0_1.0.27.60100-82~20.04_amd64.deb",
sha256 = "634cba977370d3959d05de9df70cf624dc4fcf533ce91e7a5dc90e64a16e80de",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocfft-dev6.1.0/rocfft-dev6.1.0_1.0.27.60100-82~20.04_amd64.deb",
sha256 = "cf1ba42d0e456bbf55e51aae75990425874699273be64445d3b80ead7a8e74fb",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-core6.1.0/rocm-core6.1.0_6.1.0.60100-82~20.04_amd64.deb",
sha256 = "f3ada47a42dcafb981cc2c05720c0f74a70a07d3c41dc48b250d292538097a0d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-hip-libraries/rocm-hip-libraries_6.1.0.60100-82~20.04_amd64.deb",
sha256 = "dbfec580eed58da19481931278846e70306125725dd64c9f60e5e1aa9718aa45",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hip-dev6.1.0/hip-dev6.1.0_6.1.40091.60100-82~20.04_amd64.deb",
sha256 = "0eef319439a66a317b29a8966896a3aee9d234ceddb7561458f96699c8dc5e6c",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-device-libs/rocm-device-libs_1.0.0.60100-82~20.04_amd64.deb",
sha256 = "e9c346e49703eed446c741384f84feb1ee710fd7039702ab3d92e62ad7f87a30",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocminfo/rocminfo_1.0.0.60100-82~20.04_amd64.deb",
sha256 = "e364070bb7ef21a5a8cac39ca30b75f20e373ca2043f68caac0fa44b2e0349bf",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-llvm/rocm-llvm_17.0.0.24103.60100-82~20.04_amd64.deb",
sha256 = "24811a2baed22cd54c359b3e9d7260ea47112da13d32a08fefc6d2cc6ff1d3ee",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-llvm-dev6.1.0/rocm-llvm-dev6.1.0_17.0.0.24103.60100-82~20.04_amd64.deb",
sha256 = "96013f2ca73a6d4883b12edddaaaeeb388f1c47e88d1b47ccb55c25725eb5574",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocm-smi-lib6.1.0/rocm-smi-lib6.1.0_7.0.0.60100-82~20.04_amd64.deb",
sha256 = "bba0a1dbd2a109990a5d3df8d7038b39074578858530388cb054d8c997fa6207",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocprim-dev6.1.0/rocprim-dev6.1.0_3.1.0.60100-82~20.04_amd64.deb",
sha256 = "b4bd7250279a21c07692d4254ba8c033a6bb41f6a7f72ebec09abdc34de025f2",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocprofiler-register6.1.0/rocprofiler-register6.1.0_0.3.0.60100-82~20.04_amd64.deb",
sha256 = "1b4501a42a5bab66cbfb9396c0e681a382fce48a1f62c1dc6adeb0e4ef565fcc",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocrand-dev6.1.0/rocrand-dev6.1.0_3.0.1.60100-82~20.04_amd64.deb",
sha256 = "3e4dbb60ef3ba15cd1fd2ca8a3927b65689f4e9fdc808c8e431ba9254f53345d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/roctracer6.1.0/roctracer6.1.0_4.1.60100.60100-82~20.04_amd64.deb",
sha256 = "77fd92577f5f09d518fde94c5ba652e0ad06f117bbc9f0cd280ee3bd8c2c44d5",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/roctracer-dev6.1.0/roctracer-dev6.1.0_4.1.60100.60100-82~20.04_amd64.deb",
sha256 = "7ae9a9864204298bd04d41526cecb071bbc40b998f906cfef30abb40750cd834",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocsolver6.1.0/rocsolver6.1.0_3.25.0.60100-82~20.04_amd64.deb",
sha256 = "a2b6ecf01b2a701b899abfd0429b354ed3af7a878ee5db19698f7cc831ee0829",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocsolver-dev6.1.0/rocsolver-dev6.1.0_3.25.0.60100-82~20.04_amd64.deb",
sha256 = "12685a77b9fab6919accead417657237f755cbb91ae96a7b052edf73fee5f5ce",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.1/pool/main/r/rocsparse6.1.0/rocsparse6.1.0_3.1.2.60100-82~20.04_amd64.deb",
sha256 = "1e2fca5caf1cabcc84a114a3865e0aaf518f01babe6cfa56bcda907b5d86ea17",
),
struct(
url = "https://mirror.bazel.build/github.com/alekstheod/rocm-deps/releases/download/rocm-6.2.0/libdrm2_2.4.101-2_amd64.deb",
sha256 = "4cd2e10f9486456a2782487f8bfd39f330f35a4d5bd6d693412b9e4ca2a6acbd",
),
struct(
url = "https://mirror.bazel.build/github.com/alekstheod/rocm-deps/releases/download/rocm-6.2.0/libdrm-amdgpu1_2.4.101-2_amd64.deb",
sha256 = "d4567a30f7d68b4dcf794f8677b96e89083693c94e88279fecf577ceba8b9774",
),
struct(
url = "https://mirror.bazel.build/github.com/alekstheod/rocm-deps/releases/download/rocm-6.2.0/libelf1_0.176-1.1build1_amd64.deb",
sha256 = "78a8761227efc04a1e37527f2f33ba608c6fb5d6c911616346ada5d7b9b72ee3",
),
struct(
url = "https://mirror.bazel.build/github.com/alekstheod/rocm-deps/releases/download/rocm-6.2.0/libnuma1_2.0.12-1_amd64.deb",
sha256 = "0b1edf08cf9befecd21fe94e298ac25e476f87fd876ddd4adf42ef713449e637",
),
],
"rocm_root": "opt/rocm-6.1.0",
},
}
Loading

0 comments on commit 62a9164

Please sign in to comment.