mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 02:45:34 +08:00
Update Instant-NGP & Density Grid with CUDA supports. Much faster and better PSNR. (#193)
This commit is contained in:
1 parent
31b52ae186
commit
12cd321e1a
39 files changed
+1721
-650
No files matched your search
@@ -1,36 +1,12 @@
|
||||
import os
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
USE_CUDA = True
|
||||
|
||||
ext_modules = []
|
||||
cmdclass = {}
|
||||
setup_requires = []
|
||||
if USE_CUDA:
|
||||
try:
|
||||
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
|
||||
|
||||
ext_modules = [
|
||||
CUDAExtension(
|
||||
name="pyrad_cuda",
|
||||
sources=[
|
||||
"pyrad/cuda/pyrad_cuda.cpp",
|
||||
"pyrad/cuda/pyrad_cuda_kernel.cu",
|
||||
],
|
||||
include_dirs=[os.path.join("pyrad", "cuda", "include")],
|
||||
extra_compile_args={
|
||||
"cxx": [],
|
||||
"nvcc": [],
|
||||
},
|
||||
verbose=True,
|
||||
),
|
||||
]
|
||||
cmdclass = {"build_ext": BuildExtension}
|
||||
setup_requires = ["pybind11>=2.5.0"]
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("Failed to build the CUDA extension.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup(
|
||||
|
||||
Reference in new issue
Block a user