forked from alibaba/rtp-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD
More file actions
executable file
·122 lines (104 loc) · 2.59 KB
/
Copy pathBUILD
File metadata and controls
executable file
·122 lines (104 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
load("//:def.bzl", "copts", "cuda_copts")
load("//bazel:arch_select.bzl", "torch_deps", "flashinfer_deps", "select_py_bindings")
flashinfer_deps()
config_setting(
name = "enable_triton",
values = {"define": "enable_triton=true"},
)
config_setting(
name = "using_cuda",
values = {"define": "using_cuda=true"},
)
config_setting(
name = "using_cuda12",
values = {"define": "using_cuda12=true"},
)
config_setting(
name = "using_rocm",
values = {"define": "using_rocm=true"},
)
config_setting(
name = "using_aiter_src",
values = {"define": "using_aiter_src=true"},
)
config_setting(
name = "using_arm",
values = {"define": "using_arm=true"},
)
config_setting(
name = "using_cpu",
values = {"define": "using_cpu=true"},
)
config_setting(
name = "xft_use_icx",
values = {"define": "xft_use_icx=true"},
)
config_setting(
name = "using_3fs",
define_values = {"use_3fs": "true",},
)
config_setting(
name = "enable_3fs",
values = {"copt": "-DENABLE_3FS=1"},
)
cc_binary(
name = "th_transformer_config",
deps = [
"//rtp_llm/cpp/pybind:th_transformer_config_lib",
],
copts = copts(),
linkshared = 1,
linkopts = [
"-Wl,-rpath='$$ORIGIN'",
],
visibility = ["//visibility:public"],
)
cc_binary(
name = "rtp_compute_ops",
deps = [
"//rtp_llm/cpp/pybind:th_compute_lib",
] + select({
"@//:using_cuda12": [
"//rtp_llm/cpp/pybind:th_transformer_gpu",
],
"//conditions:default": [],
}),
copts = copts(),
linkshared = 1,
linkopts = [
"-Wl,-rpath='$$ORIGIN'",
"-Wl,-rpath=$(NVSHMEM_DIR)/lib",
"-L$(NVSHMEM_DIR)/lib",
],
visibility = ["//visibility:public"],
)
cc_binary(
name = "th_transformer",
srcs = [
":rtp_compute_ops",
],
deps = [
"//rtp_llm/cpp/pybind:th_transformer_lib",
],
copts = copts(),
linkshared = 1,
linkopts = [
"-Wl,-rpath='$$ORIGIN'",
# "-Wl,--exclude-libs,ALL", # 添加这行,隐藏静态库符号
],
visibility = ["//visibility:public"],
)
py_runtime(
name = "python310",
interpreter_path = "/opt/conda310/bin/python",
visibility = ["//visibility:public"],
python_version = "PY3",
stub_shebang = "#!/opt/conda310/bin/python"
)
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
refresh_compile_commands(
name = "refresh_compdb",
targets = {
"//rtp_llm/cpp/model_rpc:model_rpc_server": "--config=cuda12_6 --config=debug --sandbox_base=/mnt/ram/",
},
)