2025-12-10 17:59:51 +00:00
|
|
|
def define_targets(rules, c10_name = "c10"):
|
2022-03-02 02:49:38 -08:00
|
|
|
rules.cc_library(
|
2025-12-10 17:59:51 +00:00
|
|
|
name = c10_name,
|
2023-04-02 03:36:26 -07:00
|
|
|
visibility = ["//visibility:public"],
|
2022-03-02 02:49:38 -08:00
|
|
|
deps = [
|
|
|
|
|
"//c10/core:CPUAllocator",
|
|
|
|
|
"//c10/core:ScalarType",
|
|
|
|
|
"//c10/core:alignment",
|
|
|
|
|
"//c10/core:alloc_cpu",
|
|
|
|
|
"//c10/core:base",
|
2023-04-02 03:36:26 -07:00
|
|
|
"//c10/macros",
|
2022-03-02 02:49:38 -08:00
|
|
|
"//c10/mobile:CPUCachingAllocator",
|
|
|
|
|
"//c10/mobile:CPUProfilingAllocator",
|
|
|
|
|
"//c10/util:TypeCast",
|
|
|
|
|
"//c10/util:base",
|
|
|
|
|
"//c10/util:typeid",
|
|
|
|
|
] + rules.if_cuda(
|
|
|
|
|
[
|
2023-02-09 15:45:26 +00:00
|
|
|
"//c10/cuda:cuda",
|
2022-03-02 02:49:38 -08:00
|
|
|
"//c10/cuda:Macros",
|
|
|
|
|
],
|
|
|
|
|
[],
|
|
|
|
|
),
|
|
|
|
|
)
|
2025-02-08 22:40:14 +00:00
|
|
|
|
|
|
|
|
rules.cc_library(
|
2025-12-10 17:59:51 +00:00
|
|
|
name = c10_name + "_headers",
|
2025-02-08 22:40:14 +00:00
|
|
|
deps = [
|
|
|
|
|
"//c10/core:base_headers",
|
|
|
|
|
"//c10/macros",
|
|
|
|
|
"//c10/util:base_headers",
|
|
|
|
|
"//c10/util:bit_cast",
|
|
|
|
|
],
|
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
|
)
|