Radix/runtimes/tpu/BUILD.bazel

38 lines
767 B
Python
Raw Permalink Normal View History

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_zig//zig:defs.bzl", "zig_library")
cc_library(
name = "empty",
defines = ["ZML_RUNTIME_TPU_DISABLED"],
)
cc_library(
name = "libpjrt_tpu",
defines = ["ZML_RUNTIME_TPU"],
deps = ["@libpjrt_tpu"],
)
zig_library(
name = "tpu",
import_name = "runtimes/tpu",
main = "tpu.zig",
visibility = ["//visibility:public"],
deps = [
"//pjrt",
] + select({
"//runtimes:tpu.enabled": [
":libpjrt_tpu",
"//async",
"//stdx",
"@rules_zig//zig/runfiles",
],
"//conditions:default": [":empty"],
}),
)
filegroup(
name = "layers",
srcs = [],
visibility = ["//visibility:public"],
)