Skip to content

Commit

Permalink
Add ubuntu22.04 support
Browse files Browse the repository at this point in the history
  • Loading branch information
alekstheod committed Nov 13, 2024
1 parent 9a46f4f commit f743561
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 59 deletions.
48 changes: 24 additions & 24 deletions third_party/tsl/third_party/gpus/rocm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cc_library(

cc_library(
name = "rocblas",
srcs = glob(["%{rocm_root}/lib/librocblas*.so"]),
srcs = glob(["%{rocm_root}/lib/librocblas*.so*"]),
hdrs = glob(["%{rocm_root}/include/rocblas/**"]),
data = glob([
"%{rocm_root}/lib/librocblas*.so",
Expand All @@ -72,8 +72,8 @@ cc_library(

cc_library(
name = "rocfft",
srcs = glob(["%{rocm_root}/lib/librocfft*.so"]),
data = glob(["%{rocm_root}/lib/librocfft*.so"]),
srcs = glob(["%{rocm_root}/lib/librocfft*.so*"]),
data = glob(["%{rocm_root}/lib/librocfft*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -84,8 +84,8 @@ cc_library(

cc_library(
name = "hipfft",
srcs = glob(["%{rocm_root}/lib/libhipfft*.so"]),
data = glob(["%{rocm_root}/lib/libhipfft*.so"]),
srcs = glob(["%{rocm_root}/lib/libhipfft*.so*"]),
data = glob(["%{rocm_root}/lib/libhipfft*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -96,9 +96,9 @@ cc_library(

cc_library(
name = "hiprand",
srcs = glob(["%{rocm_root}/lib/libhiprand*.so"]),
srcs = glob(["%{rocm_root}/lib/libhiprand*.so*"]),
hdrs = glob(["%{rocm_root}/include/hiprand/**"]),
data = glob(["%{rocm_root}/lib/libhiprand*.so"]),
data = glob(["%{rocm_root}/lib/libhiprand*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -112,9 +112,9 @@ cc_library(

cc_library(
name = "miopen",
srcs = glob(["%{rocm_root}/lib/libMIOpen*.so"]),
srcs = glob(["%{rocm_root}/lib/libMIOpen*.so*"]),
hdrs = glob(["%{rocm_root}/include/rccl/**"]),
data = glob(["%{rocm_root}/lib/libMIOpen*.so"]),
data = glob(["%{rocm_root}/lib/libMIOpen*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -127,9 +127,9 @@ cc_library(

cc_library(
name = "rccl",
srcs = glob(["%{rocm_root}/lib/librccl*.so"]),
srcs = glob(["%{rocm_root}/lib/librccl*.so*"]),
hdrs = glob(["%{rocm_root}/include/rccl/**"]),
data = glob(["%{rocm_root}/lib/librccl*.so"]),
data = glob(["%{rocm_root}/lib/librccl*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand Down Expand Up @@ -198,9 +198,9 @@ cc_library(

cc_library(
name = "hipsparse",
srcs = glob(["%{rocm_root}/lib/libhipsparse*.so"]),
srcs = glob(["%{rocm_root}/lib/libhipsparse*.so*"]),
hdrs = glob(["%{rocm_root}/include/hipsparse/**"]),
data = glob(["%{rocm_root}/lib/libhipsparse*.so"]),
data = glob(["%{rocm_root}/lib/libhipsparse*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include/",
Expand All @@ -213,7 +213,7 @@ cc_library(
cc_library(
name = "roctracer",
hdrs = glob(["%{rocm_root}/include/roctracer/**"]),
data = glob(["%{rocm_root}/lib/libroctracer*.so"]),
data = glob(["%{rocm_root}/lib/libroctracer*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include/",
Expand All @@ -225,9 +225,9 @@ cc_library(

cc_library(
name = "rocsolver",
srcs = glob(["%{rocm_root}/lib/librocsolver*.so"]),
srcs = glob(["%{rocm_root}/lib/librocsolver*.so*"]),
hdrs = glob(["%{rocm_root}/include/rocsolver/**"]),
data = glob(["%{rocm_root}/lib/librocsolver*.so"]),
data = glob(["%{rocm_root}/lib/librocsolver*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include/",
Expand All @@ -239,9 +239,9 @@ cc_library(

cc_library(
name = "hipsolver",
srcs = glob(["%{rocm_root}/lib/libhipsolver*.so"]),
srcs = glob(["%{rocm_root}/lib/libhipsolver*.so*"]),
hdrs = glob(["%{rocm_root}/include/hipsolver/**"]),
data = glob(["%{rocm_root}/lib/libhipsolver*.so"]),
data = glob(["%{rocm_root}/lib/libhipsolver*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include/",
Expand All @@ -253,9 +253,9 @@ cc_library(

cc_library(
name = "hipblas",
srcs = glob(["%{rocm_root}/lib/libhipblas*.so"]),
srcs = glob(["%{rocm_root}/lib/libhipblas*.so*"]),
hdrs = glob(["%{rocm_root}/include/hipblas/**"]),
data = glob(["%{rocm_root}/lib/libhipblas*.so"]),
data = glob(["%{rocm_root}/lib/libhipblas*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include/",
Expand All @@ -267,7 +267,7 @@ cc_library(

cc_library(
name = "rocrand",
srcs = glob(["%{rocm_root}/lib/librocrand*.so"]),
srcs = glob(["%{rocm_root}/lib/librocrand*.so*"]),
hdrs = glob(["%{rocm_root}/include/rocrand/**"]),
include_prefix = "rocm",
includes = [
Expand All @@ -281,9 +281,9 @@ cc_library(
cc_library(
name = "llvm",
srcs = select({
"@platforms//cpu:x86_64": glob(["%{rocm_root}/lib/llvm/lib/**/*x86_64.so"]),
"@platforms//cpu:x86_32": glob(["%{rocm_root}/lib/llvm/lib/**/*i386.so"]),
"//conditions:default": glob(["%{rocm_root}/lib/llvm/lib/**/*x86_64.so"]),
"@platforms//cpu:x86_64": glob(["%{rocm_root}/lib/llvm/lib/**/*x86_64.so*"]),
"@platforms//cpu:x86_32": glob(["%{rocm_root}/lib/llvm/lib/**/*i386.so*"]),
"//conditions:default": glob(["%{rocm_root}/lib/llvm/lib/**/*x86_64.so*"]),
}),
hdrs = glob(["%{rocm_root}/lib/llvm/lib/**/*.h"]),
data = glob(["%{rocm_root}/lib/llvm/**"]),
Expand Down
5 changes: 5 additions & 0 deletions third_party/tsl/third_party/gpus/rocm/rocm_redist.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_20_04.bzl",
"rocm_redist_ubuntu_20_04",
)
load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_22_04.bzl",
"rocm_redist_ubuntu_22_04",
)
load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_24_04.bzl",
"rocm_redist_ubuntu_24_04",
)

rocm_redist = {
"ubuntu_20.04": rocm_redist_ubuntu_20_04,
"ubuntu_22.04": rocm_redist_ubuntu_22_04,
"ubuntu_24.04": rocm_redist_ubuntu_24_04,
}
35 changes: 0 additions & 35 deletions third_party/tsl/third_party/gpus/rocm/rocm_redist_ubuntu_20_04.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,177 +2,142 @@ rocm_redist_ubuntu_20_04 = {
"6.2.0": {
"archives": [
struct(
name = "hip-runtime-amd-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hip-runtime-amd6.2.0/hip-runtime-amd6.2.0_6.2.41133.60200-66~20.04_amd64.deb",
sha256 = "215fae8759742bc048699feaacd6256a3ac2138771b69731dab7779325bb1b41",
),
struct(
name = "hip-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hip-dev6.2.0/hip-dev6.2.0_6.2.41133.60200-66~20.04_amd64.deb",
sha256 = "e901d66275b3b520ee73250caa4a1836be142823083528b4db6cc31a18bfb94d",
),
struct(
name = "hipblas",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblas6.2.0/hipblas6.2.0_2.2.0.60200-66~20.04_amd64.deb",
sha256 = "f8a20128b5c26198bd9ecec894f8a4c74fa28ee668e4ef1bf73d0c3edff8c144",
),
struct(
name = "hipblas-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblas-dev6.2.0/hipblas-dev6.2.0_2.2.0.60200-66~20.04_amd64.deb",
sha256 = "ab3ee54b33eba013fbf3d9aefe64b54e1918b9fb72790ca0b57fb391cb662cf0",
),
struct(
name = "hipcc",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipcc6.2.0/hipcc6.2.0_1.1.1.60200-66~20.04_amd64.deb",
sha256 = "a68123c046b8c913705262014463a8a30768167a1b68a78d8455deaf85a802d7",
),
struct(
name = "hipcub-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipcub-dev6.2.0/hipcub-dev6.2.0_3.2.0.60200-66~20.04_amd64.deb",
sha256 = "c71fab59f62ad9d4b60aa4217f4db42c6996d83d5ad7ba29e127cc13bda59afc",
),
struct(
name = "hipfft",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipfft6.2.0/hipfft6.2.0_1.0.14.60200-66~20.04_amd64.deb",
sha256 = "25887526ea2e955d4c0afa4749f8db55a49e399a349d43ccf66e0ad99ff78b2a",
),
struct(
name = "hipfft-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipfft-dev6.2.0/hipfft-dev6.2.0_1.0.14.60200-66~20.04_amd64.deb",
sha256 = "3cfec840c79c6bce4e83bf6e056e241cc13ff572352b040a952c7642b61d45aa",
),
struct(
name = "hipsolver",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipsolver6.2.0/hipsolver6.2.0_2.2.0.60200-66~20.04_amd64.deb",
sha256 = "cb56dd79ff52eaddfed379831023484d9ec32b9538bc3d02ee34c328457cd20e",
),
struct(
name = "hipsolver-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipsolver-dev6.2.0/hipsolver-dev6.2.0_2.2.0.60200-66~20.04_amd64.deb",
sha256 = "1e968f9405c8b90fbb58dff09d8bab08cf31c8386880fff95e1cb8932320bc37",
),
struct(
name = "hipsparse",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipsparse6.2.0/hipsparse6.2.0_3.1.1.60200-66~20.04_amd64.deb",
sha256 = "f08ba25b6b950754b5a2bb64c125a01b9f44280f227ff19eeb78e188f0b17320",
),
struct(
name = "hipsparse-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipsparse-dev6.2.0/hipsparse-dev6.2.0_3.1.1.60200-66~20.04_amd64.deb",
sha256 = "e9464369619bbea7299ac83e17b3cbbabdeb16e6d4da116400532e7737332b65",
),
struct(
name = "hiprand",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hiprand6.2.0/hiprand6.2.0_2.11.0.60200-66~20.04_amd64.deb",
sha256 = "2efed49be9413e08e91b3fb67736644bb0e8809fc673d310a0abab65b69eacad",
),
struct(
name = "hiprand-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hiprand-dev6.2.0/hiprand-dev6.2.0_2.11.0.60200-66~20.04_amd64.deb",
sha256 = "19564fb2f9616860234aa8bd69cca324a1a3ec33476581ec57200a1dac1d4dcb",
),
struct(
name = "hsarocr",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hsa-rocr6.2.0/hsa-rocr6.2.0_1.14.0.60200-66~20.04_amd64.deb",
sha256 = "e4940a5d47e9e39d603f18936e7921c603fd8dde0e359e0be796f9c1cdacd431",
),
struct(
name = "miopen",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/m/miopen-hip6.2.0/miopen-hip6.2.0_3.2.0.60200-66~20.04_amd64.deb",
sha256 = "638a28c5407c3af7d16e1b0179b7494b0aeb36c314114af148b1bcd52e883db1",
),
struct(
name = "miopen-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/m/miopen-hip-dev/miopen-hip-dev_3.2.0.60200-66~20.04_amd64.deb",
sha256 = "77c9d26c4f0053b71fb86f7a6b489655e27053f9605efca3a16344ccf286e313",
),
struct(
name = "rccl",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rccl6.2.0/rccl6.2.0_2.20.5.60200-66~20.04_amd64.deb",
sha256 = "2b3ce1ca2e58e891963f26d4bd31ae45894480483f691d371f269e698f75f8eb",
),
struct(
name = "rccl-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rccl-dev6.2.0/rccl-dev6.2.0_2.20.5.60200-66~20.04_amd64.deb",
sha256 = "0dedbffa5bb272d656086a9586e3705551345945f35f4f6be6dc8a27b63127a9",
),
struct(
name = "rocblas",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocblas6.2.0/rocblas6.2.0_4.2.0.60200-66~20.04_amd64.deb",
sha256 = "6e5b3caeadf592367f8638db67a70b8dd9231a8257dc2012a9c46e2c5974fff5",
),
struct(
name = "rocblas-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocblas-dev/rocblas-dev_4.2.0.60200-66~20.04_amd64.deb",
sha256 = "eaefe5a7d75ef61314b83af5bb85d8e652a730deaa58e1d600b1e9c2e673673c",
),
struct(
name = "rocfft-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocfft-dev6.2.0/rocfft-dev6.2.0_1.0.28.60200-66~20.04_amd64.deb",
sha256 = "e94d50fd6f24d70649ce046dbfe4dda2587d1d82892d4c126a4c3e91d1570071",
),
struct(
name = "rocm_core",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocm-core/rocm-core_6.2.0.60200-66~20.04_amd64.deb",
sha256 = "0e16c9fc58fc904542be4dad63bb2ff34268b5c13957c432e91ec0e4fd149c82",
),
struct(
name = "rocm_hip_libraries",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocm-hip-libraries/rocm-hip-libraries_6.2.0.60200-66~20.04_amd64.deb",
sha256 = "14f47d79b508eb259bfe4e0e5f360edb5721b908caf3bb981a4eee4181783be9",
),
struct(
name = "rocm_hip_dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hip-dev/hip-dev_6.2.41133.60200-66~20.04_amd64.deb",
sha256 = "97e6e77eaea56de6cc4ea2c525dd8b9a587546eb99c782c7af46cdc5363b99bf",
),
struct(
name = "rocm-device-libs",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocm-device-libs6.2.0/rocm-device-libs6.2.0_1.0.0.60200-66~20.04_amd64.deb",
sha256 = "ae055b579d319e1a779783ba774f119fb0e1a731d058a03b36dc5c15214d210a",
),
struct(
name = "rocminfo",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocminfo6.2.0/rocminfo6.2.0_1.0.0.60200-66~20.04_amd64.deb",
sha256 = "3bcf3dc22dbede7da70299cde1484776827808b967d371441f6cf6d3fe8af30d",
),
struct(
name = "rocm-llvm",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocm-llvm6.2.0/rocm-llvm6.2.0_18.0.0.24292.60200-66~20.04_amd64.deb",
sha256 = "ce17d2b85407b9539e0feda513fd360a48ebfd971c19af122dda21d60448c9fc",
),
struct(
name = "rocm-llvm-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocm-llvm-dev/rocm-llvm-dev_18.0.0.24292.60200-66~20.04_amd64.deb",
sha256 = "322ca8425c3a8f2ec17c551bad606b96d957b0c1eea07196dd66ac9f15460ed5",
),
struct(
name = "rocprim-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprim-dev6.2.0/rocprim-dev6.2.0_3.2.0.60200-66~20.04_amd64.deb",
sha256 = "e74e1907eb90a692344626e881cb88eeed5565ac3b487eb94ad4ac02ffd838ed",
),
struct(
name = "rocrand-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocrand-dev/rocrand-dev_3.1.0.60200-66~20.04_amd64.deb",
sha256 = "ddd0ac44b08470dfc128d6f6d2598a9728879f5a78bc5290645baebf22433b63",
),
struct(
name = "roctracer",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/roctracer6.2.0/roctracer6.2.0_4.1.60200.60200-66~20.04_amd64.deb",
sha256 = "b94cdf230b372ebcaf97085cf67f01ef7977f814280fdaf1886797f39899ef41",
),
struct(
name = "roctracer-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/roctracer-dev6.2.0/roctracer-dev6.2.0_4.1.60200.60200-66~20.04_amd64.deb",
sha256 = "9a85b57eea3790432eae06421081b3e59d3c9841d59646364ecd174f9ed4821a",
),
struct(
name = "rocsolver",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocsolver6.2.0/rocsolver6.2.0_3.26.0.60200-66~20.04_amd64.deb",
sha256 = "87dcd34a9b50f46161ecdb7781ab03c2b311fb7e13aa167c4a9c5e3bcf24b473",
),
struct(
name = "rocsolver-dev",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocsolver-dev6.2.0/rocsolver-dev6.2.0_3.26.0.60200-66~20.04_amd64.deb",
sha256 = "21e4aa1957e7bc5d293a418a983d9b3c3917fb78eb79d3d4d55a253b9bae7743",
),
Expand Down
Loading

0 comments on commit f743561

Please sign in to comment.