Classes | Functions | Variables
nms::setup_linux Namespace Reference

Classes

class  custom_build_ext

Functions

def customize_compiler_for_nvcc
def find_in_path
def locate_cuda

Variables

 _compile
dictionary cmdclass = {'build_ext': custom_build_ext}
 compiler_so
tuple CUDA = locate_cuda()
list ext_modules
string name = 'nms'
tuple numpy_include = np.get_include()

Function Documentation

inject deep into distutils to customize how the dispatch
to gcc/nvcc works.
If you subclass UnixCCompiler, it's not trivial to get your subclass
injected in, and still have the right customizations (i.e.
distutils.sysconfig.customize_compiler) run on it. So instead of going
the OO route, I have this. Note, it's kindof like a wierd functional
subclassing going on.

Definition at line 66 of file nms/setup_linux.py.

def nms.setup_linux.find_in_path (   name,
  path 
)

Definition at line 16 of file nms/setup_linux.py.

Locate the CUDA environment on the system
Returns a dict with keys 'home', 'nvcc', 'include', and 'lib64'
and values giving the absolute path to each directory.
Starts by looking for the CUDAHOME env variable. If not found, everything
is based on finding 'nvcc' in the PATH.

Definition at line 27 of file nms/setup_linux.py.


Variable Documentation

Definition at line 72 of file nms/setup_linux.py.

dictionary nms::setup_linux::cmdclass = {'build_ext': custom_build_ext}

Definition at line 140 of file nms/setup_linux.py.

Definition at line 72 of file nms/setup_linux.py.

Definition at line 56 of file nms/setup_linux.py.

Initial value:
00001 [
00002     Extension(
00003         "cpu_nms",
00004         ["cpu_nms.pyx"],
00005         extra_compile_args={'gcc': ["-Wno-cpp", "-Wno-unused-function"]},
00006         include_dirs = [numpy_include]
00007     ),
00008     Extension('gpu_nms',
00009         ['nms_kernel.cu', 'gpu_nms.pyx'],
00010         library_dirs=[CUDA['lib64']],
00011         libraries=['cudart'],
00012         language='c++',
00013         runtime_library_dirs=[CUDA['lib64']],
00014         # this syntax is specific to this build system
00015         # we're only going to use certain compiler args with nvcc and not with
00016         # gcc the implementation of this trick is in customize_compiler() below
00017         extra_compile_args={'gcc': ["-Wno-unused-function"],
00018                             'nvcc': ['-arch=sm_35',
00019                                      '--ptxas-options=-v',
00020                                      '-c',
00021                                      '--compiler-options',
00022                                      "'-fPIC'"]},
00023         include_dirs = [numpy_include, CUDA['include']]
00024     ),
00025 ]

Definition at line 110 of file nms/setup_linux.py.

string nms::setup_linux::name = 'nms'

Definition at line 137 of file nms/setup_linux.py.

tuple nms::setup_linux::numpy_include = np.get_include()

Definition at line 61 of file nms/setup_linux.py.



rail_object_detector
Author(s):
autogenerated on Sat Jun 8 2019 20:26:31