28 lines
526 B
Python
28 lines
526 B
Python
load("@rules_zig//zig:defs.bzl", "zig_library")
|
|
|
|
cc_library(
|
|
name = "empty",
|
|
)
|
|
|
|
cc_library(
|
|
name = "libpjrt_cuda",
|
|
defines = ["ZML_RUNTIME_CUDA"],
|
|
deps = ["@libpjrt_cuda"],
|
|
)
|
|
|
|
zig_library(
|
|
name = "cuda",
|
|
import_name = "runtimes/cuda",
|
|
main = "cuda.zig",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pjrt",
|
|
] + select({
|
|
"//runtimes:cuda.enabled": [
|
|
":libpjrt_cuda",
|
|
"//async",
|
|
],
|
|
"//conditions:default": [":empty"],
|
|
}),
|
|
)
|