2023-05-15 09:36:41 +00:00
|
|
|
load("@rules_zig//zig:defs.bzl", "zig_library")
|
|
|
|
|
|
2023-09-14 13:28:25 +00:00
|
|
|
cc_library(
|
|
|
|
|
name = "zmlxcuda_lib",
|
|
|
|
|
srcs = ["zmlxcuda.c"],
|
|
|
|
|
visibility = ["@libpjrt_cuda//:__subpackages__"],
|
|
|
|
|
)
|
|
|
|
|
|
2023-05-15 09:36:41 +00:00
|
|
|
cc_library(
|
|
|
|
|
name = "empty",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
|
name = "libpjrt_cuda",
|
|
|
|
|
defines = ["ZML_RUNTIME_CUDA"],
|
|
|
|
|
deps = ["@libpjrt_cuda"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
zig_library(
|
2023-01-02 14:28:25 +00:00
|
|
|
name = "cuda",
|
2023-05-15 09:36:41 +00:00
|
|
|
import_name = "runtimes/cuda",
|
|
|
|
|
main = "cuda.zig",
|
2023-01-02 14:28:25 +00:00
|
|
|
visibility = ["//visibility:public"],
|
2023-05-15 09:36:41 +00:00
|
|
|
deps = [
|
|
|
|
|
"//pjrt",
|
|
|
|
|
] + select({
|
|
|
|
|
"//runtimes:cuda.enabled": [
|
|
|
|
|
":libpjrt_cuda",
|
|
|
|
|
"//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",
|
|
|
|
|
srcs = [],
|
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
|
)
|