forked from ShichenLiu/SoftRas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (34 loc) · 1.37 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
CUDA_FLAGS = []
ext_modules=[
CUDAExtension('soft_renderer.cuda.load_textures', [
'soft_renderer/cuda/load_textures_cuda.cpp',
'soft_renderer/cuda/load_textures_cuda_kernel.cu',
]),
CUDAExtension('soft_renderer.cuda.create_texture_image', [
'soft_renderer/cuda/create_texture_image_cuda.cpp',
'soft_renderer/cuda/create_texture_image_cuda_kernel.cu',
]),
CUDAExtension('soft_renderer.cuda.soft_rasterize', [
'soft_renderer/cuda/soft_rasterize_cuda.cpp',
'soft_renderer/cuda/soft_rasterize_cuda_kernel.cu',
]),
CUDAExtension('soft_renderer.cuda.voxelization', [
'soft_renderer/cuda/voxelization_cuda.cpp',
'soft_renderer/cuda/voxelization_cuda_kernel.cu',
]),
]
INSTALL_REQUIREMENTS = ['numpy', 'torch', 'torchvision', 'scikit-image', 'tqdm', 'imageio']
setup(
description='PyTorch implementation of "Soft Rasterizer"',
author='Shichen Liu',
author_email='[email protected]',
license='MIT License',
version='1.0.0',
name='soft_renderer',
packages=['soft_renderer', 'soft_renderer.cuda', 'soft_renderer.functional'],
install_requires=INSTALL_REQUIREMENTS,
ext_modules=ext_modules,
cmdclass = {'build_ext': BuildExtension}
)