42 lines
803 B
Python
42 lines
803 B
Python
load("@rules_zig//zig:defs.bzl", "zig_library")
|
|
|
|
cc_library(
|
|
name = "zmlxcuda_lib",
|
|
srcs = ["zmlxcuda.c"],
|
|
visibility = ["@libpjrt_cuda//:__subpackages__"],
|
|
)
|
|
|
|
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",
|
|
"//stdx",
|
|
"@rules_zig//zig/runfiles",
|
|
],
|
|
"//conditions:default": [":empty"],
|
|
}),
|
|
)
|
|
|
|
filegroup(
|
|
name = "layers",
|
|
srcs = [],
|
|
visibility = ["//visibility:public"],
|
|
)
|