Update Instant-NGP & Density Grid with CUDA supports. Much faster and better PSNR. (#193)

This commit is contained in:
Ruilong Li(李瑞龙) authored and GitHub committed 2022-07-24 22:22:44 -07:00
1 parent 31b52ae186
commit 12cd321e1a
39 files changed
+1721 -650

No files matched your search

+1 -25
View File
@@ -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(