Skip to content

Commit

Permalink
feat: add static version cufft (for device callback)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhan committed Dec 30, 2024
1 parent d1d1e6b commit a642c4b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions cuda/private/templates/BUILD.cufft
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,50 @@ cc_library(
":cufftw_lib",
]),
)

cc_import(
name = "cufftw_static_a",
static_library = "%{component_name}/%{libpath}/libcufftw_static.a",
target_compatible_with = ["@platforms//os:linux"],
)

cc_import(
name = "cufft_static_a",
static_library = "%{component_name}/%{libpath}/libcufft_static.a",
target_compatible_with = ["@platforms//os:linux"],
)

cc_import(
name = "cufft_static_nocallback_a",
static_library = "%{component_name}/%{libpath}/libcufft_static_nocallback.a",
target_compatible_with = ["@platforms//os:linux"],
)

cc_library(
name = "cufftw_static",
deps = [
":%{component_name}_headers",
] + if_linux([
":cufftw_static_a",
])
)

cc_library(
name = "cufft_static",
deps = [
":%{component_name}_headers",
] + if_linux([
":cufftw_static_a",
":cufft_static_a",
])
)

cc_library(
name = "cufft_static_nocallback",
deps = [
":%{component_name}_headers",
] + if_linux([
":cufftw_static_a",
":cufft_static_nocallback_a",
])
)
2 changes: 1 addition & 1 deletion cuda/private/templates/registry.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REGISTRY = {
"nvcc": ["compiler_deps", "nvptxcompiler"],
"cccl": ["cub", "thrust"],
"cublas": ["cublas"],
"cufft": ["cufft"],
"cufft": ["cufft", "cufft_static"],
"cufile": [],
"cupti": ["cupti", "nvperf_host", "nvperf_target"],
"curand": ["curand"],
Expand Down

0 comments on commit a642c4b

Please sign in to comment.