Skip to content

Commit 0bcd760

Browse files
liruilong940607Ruilong Li
andauthored
delay import for _check_and_build_extension_h_precompiler_headers (#619)
Co-authored-by: Ruilong Li <[email protected]>
1 parent fc4a2e5 commit 0bcd760

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gsplat/cuda/_backend.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from torch.utils.cpp_extension import _find_cuda_home # <--- For robust CUDA detection
1818
from torch.utils.cpp_extension import (
1919
_TORCH_PATH,
20-
_check_and_build_extension_h_precompiler_headers,
2120
_get_build_directory,
2221
_import_module_from_library,
2322
_jit_compile,
@@ -64,6 +63,10 @@ def load_extension(
6463
# But it's ok so we catch this exception and ignore it.
6564
try:
6665
if USE_PRECOMPILED_HEADERS:
66+
from torch.utils.cpp_extension import (
67+
_check_and_build_extension_h_precompiler_headers,
68+
)
69+
6770
# Using PreCompiled Header('torch/extension.h') to reduce compile time.
6871
# remove: remove_extension_h_precompiler_headers()
6972
_check_and_build_extension_h_precompiler_headers(

0 commit comments

Comments
 (0)