Skip to content

Commit

Permalink
Add missing deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alekstheod committed Nov 27, 2024
1 parent 402354e commit 34ab8f9
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 27 deletions.
41 changes: 38 additions & 3 deletions third_party/gpus/rocm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ cc_library(
":hiprand",
":hipsolver",
":hipsparse",
":hsa-rocr",
":hsa_rocr",
":miopen",
":rocblas",
":rocm_config",
":rocprofiler_register",
":rocsolver",
":roctracer",
] + select_threshold(
Expand All @@ -63,9 +64,9 @@ cc_library(
)

cc_library(
name = "hsa-rocr",
name = "hsa_rocr",
srcs = glob(["%{rocm_root}/lib/libhsa-runtime*.so*"]),
hdrs = glob(["%{rocm_root}/include/hsa/**"]),
data = glob(["%{rocm_root}/lib/libhsa-runtime*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -88,6 +89,40 @@ cc_library(
linkstatic = 1,
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [
":amd_comgr",
":hsa_rocr",
":rocm_config",
":rocprofiler_register",
],
)

cc_library(
name = "rocprofiler_register",
srcs = glob([
"%{rocm_root}/lib/librocprofiler-register.so*",
]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
)

cc_library(
name = "amd_comgr",
srcs = glob([
"%{rocm_root}/lib/libamd_comgr.so*",
]),
hdrs = glob(["%{rocm_root}/include/amd_comgr/**"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
)

Expand Down
16 changes: 8 additions & 8 deletions third_party/gpus/rocm/rocm_redist_ubuntu_20_04.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
rocm_redist_ubuntu_20_04 = {
"6.2.0": {
"archives": [
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~20.04_amd64.deb",
sha256 = "fabf4a831f21b5248932e08654149bc215da2a816613ad8d05b805d4e226171a",
),
struct(
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",
Expand All @@ -17,14 +21,6 @@ rocm_redist_ubuntu_20_04 = {
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(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt6.2.0/hipblaslt6.2.0_0.8.0.60200-66~20.04_amd64.deb",
sha256 = "a9fb63b30c3383b37479253c59c85493b75646037e016f68b136d12c5e6a4adb",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt-dev6.2.0/hipblaslt-dev6.2.0_0.8.0.60200-66~20.04_amd64.deb",
sha256 = "5e2ca28ea10ff16eb75bde5c69aef6dbe3566d8fc49c3d2ace0ae7a777c1ffae",
),
struct(
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",
Expand Down Expand Up @@ -129,6 +125,10 @@ rocm_redist_ubuntu_20_04 = {
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(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~20.04_amd64.deb",
sha256 = "4be88c5010c2cf0223c1dd7dc9d4a430fc54ee401ca093de2dcca60dabea763a",
),
struct(
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",
Expand Down
16 changes: 8 additions & 8 deletions third_party/gpus/rocm/rocm_redist_ubuntu_22_04.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
rocm_redist_ubuntu_22_04 = {
"6.2.0": {
"archives": [
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~22.04_amd64.deb",
sha256 = "bc5d620e4e0db3746fc6b2279e463f618681f1f95ba973e40b687cef50ca2489",
),
struct(
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~22.04_amd64.deb",
sha256 = "38e9670bedc7bbdc0b9f38c7a0fe90f73ef80f161cbf63c98d30e422438ce2c5",
Expand All @@ -17,14 +21,6 @@ rocm_redist_ubuntu_22_04 = {
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~22.04_amd64.deb",
sha256 = "885cf3f3a52ebde9caadf6348a6cda28fd15e3bc52bab0c90b587d72b29ff7ef",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt6.2.0/hipblaslt6.2.0_0.8.0.60200-66~22.04_amd64.deb",
sha256 = "af3bea7cda7c1af147c3baae1cb3a8846ff571fe713c3a83d0924810bee734fe",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt-dev6.2.0/hipblaslt-dev6.2.0_0.8.0.60200-66~22.04_amd64.deb",
sha256 = "d9d2c80228ebfe74ebb98fc74fda57be498ab84ca40358355c616dfd38efded2",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipcc6.2.0/hipcc6.2.0_1.1.1.60200-66~22.04_amd64.deb",
sha256 = "468026fa8eb70121f0c545557a926ddc41228cef9457b4a00d8fc3a36b04310f",
Expand Down Expand Up @@ -129,6 +125,10 @@ rocm_redist_ubuntu_22_04 = {
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~22.04_amd64.deb",
sha256 = "3d859bb735ff8bf1962ce680e9257dcc574ab36224f50069f833fa19c6d7e69d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~22.04_amd64.deb",
sha256 = "66df78d8c5e2d1a0ae43cd4a5e41cf75ec120c870a0bbd7da18a2ba4dec42f9c",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocrand-dev/rocrand-dev_3.1.0.60200-66~22.04_amd64.deb",
sha256 = "317c16a6e0b0b456153437406dd92225e17dbd454fc1304b0c3fef5fbfc69bc2",
Expand Down
9 changes: 6 additions & 3 deletions third_party/gpus/rocm/rocm_redist_ubuntu_24_04.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ rocm_redist_ubuntu_24_04 = {
"6.2.0": {
"archives": [
struct(
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~24.04_amd64.deb",
sha256 = "4831c09058882d531d10ead6a13ada15e7e9cbb182bd56ab62f2404207488f3e",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~24.04_amd64.deb",
sha256 = "7e1ff2d9f2435f5b9db9aa952bb57d1a878a8aa7d96bda61361c107b7e1428e3",
),
struct(
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~24.04_amd64.deb",
Expand Down Expand Up @@ -94,7 +94,6 @@ rocm_redist_ubuntu_24_04 = {
sha256 = "00f135ce2ae47c35085ef06248ff7d5ce8c12fd0d5b82e7bd77b1dbc0ce7058e",
),
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~24.04_amd64.deb",
sha256 = "eb3904263b396d46799eeea1081d8e8d1a551a890432a803364db2d013849f92",
),
Expand Down Expand Up @@ -130,6 +129,10 @@ rocm_redist_ubuntu_24_04 = {
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~24.04_amd64.deb",
sha256 = "6c832e2feb0885fbe481245825c76a466921b294f530eb0d0da70a44cfe6e608",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~24.04_amd64.deb",
sha256 = "d198d010fedfbe51d3fd19444e2848d430e08f91d19a5b2661b94ac6d1135863",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocrand-dev/rocrand-dev_3.1.0.60200-66~24.04_amd64.deb",
sha256 = "2a2a95185ce0e54df226474b2f5cfcdc9e5ede5a6d88a8a70c2635ea2237abba",
Expand Down
41 changes: 38 additions & 3 deletions third_party/xla/third_party/tsl/third_party/gpus/rocm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ cc_library(
":hiprand",
":hipsolver",
":hipsparse",
":hsa-rocr",
":hsa_rocr",
":miopen",
":rocblas",
":rocm_config",
":rocprofiler_register",
":rocsolver",
":roctracer",
] + select_threshold(
Expand All @@ -63,9 +64,9 @@ cc_library(
)

cc_library(
name = "hsa-rocr",
name = "hsa_rocr",
srcs = glob(["%{rocm_root}/lib/libhsa-runtime*.so*"]),
hdrs = glob(["%{rocm_root}/include/hsa/**"]),
data = glob(["%{rocm_root}/lib/libhsa-runtime*.so*"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
Expand All @@ -88,6 +89,40 @@ cc_library(
linkstatic = 1,
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [
":amd_comgr",
":hsa_rocr",
":rocm_config",
":rocprofiler_register",
],
)

cc_library(
name = "rocprofiler_register",
srcs = glob([
"%{rocm_root}/lib/librocprofiler-register.so*",
]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
)

cc_library(
name = "amd_comgr",
srcs = glob([
"%{rocm_root}/lib/libamd_comgr.so*",
]),
hdrs = glob(["%{rocm_root}/include/amd_comgr/**"]),
include_prefix = "rocm",
includes = [
"%{rocm_root}/include",
],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
rocm_redist_ubuntu_20_04 = {
"6.2.0": {
"archives": [
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~20.04_amd64.deb",
sha256 = "fabf4a831f21b5248932e08654149bc215da2a816613ad8d05b805d4e226171a",
),
struct(
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",
Expand Down Expand Up @@ -121,6 +125,10 @@ rocm_redist_ubuntu_20_04 = {
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(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~20.04_amd64.deb",
sha256 = "4be88c5010c2cf0223c1dd7dc9d4a430fc54ee401ca093de2dcca60dabea763a",
),
struct(
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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
rocm_redist_ubuntu_22_04 = {
"6.2.0": {
"archives": [
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~22.04_amd64.deb",
sha256 = "bc5d620e4e0db3746fc6b2279e463f618681f1f95ba973e40b687cef50ca2489",
),
struct(
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~22.04_amd64.deb",
sha256 = "38e9670bedc7bbdc0b9f38c7a0fe90f73ef80f161cbf63c98d30e422438ce2c5",
Expand Down Expand Up @@ -121,6 +125,10 @@ rocm_redist_ubuntu_22_04 = {
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~22.04_amd64.deb",
sha256 = "3d859bb735ff8bf1962ce680e9257dcc574ab36224f50069f833fa19c6d7e69d",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~22.04_amd64.deb",
sha256 = "66df78d8c5e2d1a0ae43cd4a5e41cf75ec120c870a0bbd7da18a2ba4dec42f9c",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocrand-dev/rocrand-dev_3.1.0.60200-66~22.04_amd64.deb",
sha256 = "317c16a6e0b0b456153437406dd92225e17dbd454fc1304b0c3fef5fbfc69bc2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ rocm_redist_ubuntu_24_04 = {
"6.2.0": {
"archives": [
struct(
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~24.04_amd64.deb",
sha256 = "4831c09058882d531d10ead6a13ada15e7e9cbb182bd56ab62f2404207488f3e",
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/c/comgr6.2.0/comgr6.2.0_2.8.0.60200-66~24.04_amd64.deb",
sha256 = "7e1ff2d9f2435f5b9db9aa952bb57d1a878a8aa7d96bda61361c107b7e1428e3",
),
struct(
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~24.04_amd64.deb",
Expand All @@ -17,6 +17,14 @@ rocm_redist_ubuntu_24_04 = {
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~24.04_amd64.deb",
sha256 = "e9f71e71db600d72dcb2b61e64b965b6c60d47bd4bb699e8abec85edb260b819",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt6.2.0/hipblaslt6.2.0_0.8.0.60200-66~24.04_amd64.deb",
sha256 = "e5dfd8ba9e49f919a96c102d3a652e8ef0c4d1a63b3f3909c856d40b1745e2a9",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipblaslt-dev6.2.0/hipblaslt-dev6.2.0_0.8.0.60200-66~24.04_amd64.deb",
sha256 = "639bd47010035ee6719425510be33d2f54483004a909dfa4c64f853d7394a22f",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hipcc6.2.0/hipcc6.2.0_1.1.1.60200-66~24.04_amd64.deb",
sha256 = "c2782a98633e4400f46ba732605e56b2821366db60ec06d88db0615e4d1acf3c",
Expand Down Expand Up @@ -121,6 +129,10 @@ rocm_redist_ubuntu_24_04 = {
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~24.04_amd64.deb",
sha256 = "6c832e2feb0885fbe481245825c76a466921b294f530eb0d0da70a44cfe6e608",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocprofiler-register6.2.0/rocprofiler-register6.2.0_0.4.0.60200-66~24.04_amd64.deb",
sha256 = "d198d010fedfbe51d3fd19444e2848d430e08f91d19a5b2661b94ac6d1135863",
),
struct(
url = "https://repo.radeon.com/rocm/apt/6.2/pool/main/r/rocrand-dev/rocrand-dev_3.1.0.60200-66~24.04_amd64.deb",
sha256 = "2a2a95185ce0e54df226474b2f5cfcdc9e5ede5a6d88a8a70c2635ea2237abba",
Expand Down

0 comments on commit 34ab8f9

Please sign in to comment.