Skip to content

Commit 2c59a40

Browse files
authored
feat: add nvjpeg (#304)
1 parent aeb7bcd commit 2c59a40

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
cc_import_versioned_sos(
2+
name = "nvjpeg_so",
3+
shared_library = "%{component_name}/%{libpath}/libnvjpeg.so",
4+
)
5+
6+
cc_import(
7+
name = "nvjpeg_lib",
8+
interface_library = "%{component_name}/%{libpath}/x64/nvjpeg.lib",
9+
system_provided = 1,
10+
target_compatible_with = ["@platforms//os:windows"],
11+
)
12+
13+
cc_library(
14+
name = "nvjpeg",
15+
deps = [
16+
":%{component_name}_headers",
17+
] + if_linux([
18+
":nvjpeg_so",
19+
]) + if_windows([
20+
":nvjpeg_lib",
21+
]),
22+
)
23+
24+
cc_import(
25+
name = "nvjpeg_static_a",
26+
static_library = "%{component_name}/%{libpath}/libnvjpeg_static.a",
27+
target_compatible_with = ["@platforms//os:linux"],
28+
)
29+
30+
cc_library(
31+
name = "nvjpeg_static",
32+
deps = [
33+
":%{component_name}_headers",
34+
] + if_linux([
35+
":nvjpeg_static_a",
36+
]),
37+
)

cuda/private/templates/registry.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ REGISTRY = {
1313
"npp": ["nppc", "nppial", "nppicc", "nppidei", "nppif", "nppig", "nppim", "nppist", "nppisu", "nppitc", "npps"],
1414
"nvidia_fs": [],
1515
"nvjitlink": ["nvjitlink", "nvjitlink_static"],
16-
"nvjpeg": [],
16+
"nvjpeg": ["nvjpeg", "nvjpeg_static"],
1717
"nvml": ["nvml"],
1818
"nvprof": [],
1919
"nvrtc": ["nvrtc"],

0 commit comments

Comments
 (0)