Skip to content

Commit

Permalink
modify absolute paths in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenliang Zhao authored and Wenliang Zhao committed Jan 29, 2024
1 parent 016776e commit 57e4817
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,13 @@ def gen_packages_items():
def get_ext_modules(cur_dir):
# if encounter compilation issues, please refer to https://github.com/HuiZeng/Image-Adaptive-3DLUT?tab=readme-ov-file#build.
if torch.cuda.is_available():
return CUDAExtension('trilinear',
[join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear_cuda.cpp'),
join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear_kernel.cu')],
)
trilinear_cuba_abs_path = join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear_cuda.cpp')
trilinear_kernel_abs_path = join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear_kernel.cu')
return CUDAExtension('trilinear', [trilinear_cuba_abs_path, trilinear_kernel_abs_path])
else:
return CppExtension('trilinear',
[join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear.cpp')],
include_dirs=[join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src')]
)
trilinear_abs_path = join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src/trilinear.cpp')
src_abs_path = join(cur_dir, 'libcom/image_harmonization/source/trilinear_cpp/src')
return CppExtension('trilinear', [trilinear_abs_path], include_dirs=[src_abs_path])

if __name__ == '__main__':
cur_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down

0 comments on commit 57e4817

Please sign in to comment.