Skip to content

Commit cfd51c2

Browse files
Fixing cuda buck
Differential Revision: D84940388 Pull Request resolved: pytorch#15229
1 parent b858946 commit cfd51c2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

backends/cuda/runtime/TARGETS

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@ load("//tools/build/buck:nvcc_flags.bzl", "get_nvcc_arch_args")
33

44
oncall("executorch")
55

6+
runtime.cxx_library(
7+
name = "cuda_platform",
8+
srcs = [
9+
"platform/platform.cpp",
10+
],
11+
headers = [
12+
"platform/platform.h",
13+
],
14+
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
15+
link_whole = True,
16+
supports_python_dlopen = True,
17+
visibility = ["@EXECUTORCH_CLIENTS"],
18+
deps = [
19+
"//executorch/runtime/core:core",
20+
],
21+
nvcc_flags = get_nvcc_arch_args() + [
22+
"-_NVCC_HOST_COMPILER_FLAG_",
23+
"gcc",
24+
],
25+
external_deps = [
26+
("cuda", None, "cuda-lazy"),
27+
],
28+
)
29+
630
runtime.cxx_library(
731
name = "runtime_shims",
832
srcs = [
@@ -33,6 +57,7 @@ runtime.cxx_library(
3357
"//executorch/runtime/core:core",
3458
"//executorch/runtime/core/exec_aten:lib",
3559
"//executorch/runtime/platform:platform",
60+
"//executorch/backends/cuda/runtime:cuda_platform",
3661
],
3762
nvcc_flags = get_nvcc_arch_args() + [
3863
"-_NVCC_HOST_COMPILER_FLAG_",

0 commit comments

Comments
 (0)