2023-05-15 09:36:41 +00:00
|
|
|
load("@rules_zig//zig:defs.bzl", "zig_library")
|
2025-04-30 15:53:51 +00:00
|
|
|
load("@aspect_bazel_lib//lib:tar.bzl", "mtree_spec", "tar")
|
2023-05-15 09:36:41 +00:00
|
|
|
|
2024-01-15 09:41:42 +00:00
|
|
|
cc_library(
|
|
|
|
|
name = "zmlxrocm_lib",
|
|
|
|
|
srcs = ["zmlxrocm.c"],
|
|
|
|
|
linkopts = [
|
|
|
|
|
"-lc",
|
|
|
|
|
"-ldl",
|
|
|
|
|
],
|
2023-01-02 14:28:25 +00:00
|
|
|
visibility = ["@libpjrt_rocm//:__subpackages__"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
alias(
|
|
|
|
|
name = "hipblaslt",
|
|
|
|
|
actual = "@libpjrt_rocm//:hipblaslt",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
alias(
|
|
|
|
|
name = "gfx",
|
|
|
|
|
actual = "@libpjrt_rocm//:gfx",
|
|
|
|
|
)
|
|
|
|
|
|
2023-05-15 09:36:41 +00:00
|
|
|
cc_library(
|
|
|
|
|
name = "empty",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
|
name = "libpjrt_rocm",
|
|
|
|
|
defines = ["ZML_RUNTIME_ROCM"],
|
|
|
|
|
deps = ["@libpjrt_rocm"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
zig_library(
|
2023-01-02 14:28:25 +00:00
|
|
|
name = "rocm",
|
2023-05-15 09:36:41 +00:00
|
|
|
import_name = "runtimes/rocm",
|
|
|
|
|
main = "rocm.zig",
|
2023-01-02 14:28:25 +00:00
|
|
|
visibility = ["//visibility:public"],
|
2023-05-15 09:36:41 +00:00
|
|
|
deps = [
|
|
|
|
|
"//pjrt",
|
|
|
|
|
] + select({
|
|
|
|
|
"//runtimes:rocm.enabled": [
|
|
|
|
|
":libpjrt_rocm",
|
|
|
|
|
"//async",
|
2024-01-15 09:41:42 +00:00
|
|
|
"//stdx",
|
|
|
|
|
"@rules_zig//zig/runfiles",
|
2023-05-15 09:36:41 +00:00
|
|
|
],
|
|
|
|
|
"//conditions:default": [":empty"],
|
|
|
|
|
}),
|
2023-01-02 14:28:25 +00:00
|
|
|
)
|
2023-08-18 17:11:27 +00:00
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
|
name = "layers",
|
2025-04-30 15:53:51 +00:00
|
|
|
srcs = ["@libpjrt_rocm//:amdgpu_ids_layer"],
|
2023-08-18 17:11:27 +00:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
|
)
|