-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
28 lines (24 loc) · 824 Bytes
/
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
import os
import numpy
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME
nvjpeg_found = CUDA_HOME is not None and os.path.exists(os.path.join(CUDA_HOME, "include", "nvjpeg.h"))
print(f'NVJPEG Found or Not: {nvjpeg_found}')
# python setup.py build_ext
setup(
name = "PyNvJpeg",
version = "1.0.0",
author = "yangxian",
author_email = "[email protected]",
packages = ['nvjpeg'],
ext_modules = [
CUDAExtension(name = "nvjpeg_wrapper",
include_dirs = [numpy.get_include(), ],
sources = ['src/wrapper.cpp'],
libraries = ['nvjpeg']
)
],
cmdclass = {
"build_ext" : BuildExtension
}
)