Python Cython.Distutils.build_ext.build_extensions() Examples

The following are 30 code examples of Cython.Distutils.build_ext.build_extensions(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module Cython.Distutils.build_ext , or try the search function .
Example #1
Source File: setup.py    From contextualbandits with BSD 2-Clause "Simplified" License 6 votes vote down vote up
def build_extensions(self):
        compiler = self.compiler.compiler_type
        if compiler == 'msvc': # visual studio
            for e in self.extensions:
                e.extra_compile_args += ['/O2', '/openmp']
        else:
            for e in self.extensions:
                e.extra_compile_args += ['-O3', '-march=native', '-fopenmp']
                e.extra_link_args += ['-fopenmp']

                if e.language == "c++":
                    e.extra_compile_args += ['-std=c++11']

            ### Remove this code if you have a mac with gcc or clang + openmp
            if platform[:3] == "dar":
                for e in self.extensions:
                    e.extra_compile_args = [arg for arg in e.extra_compile_args if arg != '-fopenmp']
                    e.extra_link_args    = [arg for arg in e.extra_link_args    if arg != '-fopenmp']
        build_ext.build_extensions(self) 
Example #2
Source File: setup.py    From pydriver with MIT License 5 votes vote down vote up
def build_extensions(self, *args, **kwargs):
        compiler_type = self.compiler.compiler_type
        if compiler_type not in extra_args:
            compiler_type = 'unix'  # probably some unix-like compiler
        # merge compile and link arguments with global arguments for current compiler
        for e in self.extensions:
            e.extra_compile_args = list(set(e.extra_compile_args + extra_args[compiler_type]['extra_compile_args']))
            e.extra_link_args = list(set(e.extra_link_args + extra_args[compiler_type]['extra_link_args']))
        _build_ext.build_extensions(self, *args, **kwargs) 
Example #3
Source File: setup.py    From mmdetection_with_SENet154 with Apache License 2.0 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #4
Source File: setup.py    From TF_Deformable_Net with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #5
Source File: setup.py    From cascade-rcnn_Pytorch with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #6
Source File: setup.py    From faster-rcnn.pytorch with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #7
Source File: setup.py    From 1.FaceRecognition with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #8
Source File: setup.py    From MSDS-RCNN with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #9
Source File: setup.py    From Faster-RCNN_TF with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #10
Source File: setup.py    From FPN_Pytorch with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #11
Source File: setup.py    From pytorch-lighthead with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #12
Source File: setup_windows.py    From kaggle-rsna18 with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #13
Source File: setup_linux.py    From kaggle-rsna18 with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #14
Source File: setup.py    From Master-R-CNN with Apache License 2.0 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #15
Source File: setup.py    From anime-face-detector with MIT License 5 votes vote down vote up
def build_extensions(self):
        build_ext.build_extensions(self) 
Example #16
Source File: setup.py    From refinedet.pytorch with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #17
Source File: setup.py    From Grid-R-CNN with Apache License 2.0 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #18
Source File: setup.py    From scene-graph-TF-release with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #19
Source File: setup.py    From tf-cpn with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #20
Source File: setup.py    From tf-cpn with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #21
Source File: setup.py    From rgz_rcnn with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #22
Source File: setup.py    From DeepSim with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #23
Source File: setup.py    From hpfrec with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def build_extensions(self):
		c = self.compiler.compiler_type
		# TODO: add entries for intel's ICC
		if c == 'msvc': # visual studio
			for e in self.extensions:
				e.extra_compile_args = ['/openmp', '/O2']
		else: # gcc and clang
			for e in self.extensions:
				e.extra_compile_args = ['-fopenmp', '-O2', '-march=native', '-std=c99']
				e.extra_link_args = ['-fopenmp']
				### Comment: -Ofast gives worse speed than -O2 or -O3
		build_ext.build_extensions(self) 
Example #24
Source File: setup.py    From sia-cog with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #25
Source File: bbox_setup.py    From MOTDT with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #26
Source File: setup.py    From faster-rcnn-resnet with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #27
Source File: setup.py    From RetinaNet_Tensorflow_Rotation with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #28
Source File: setup.py    From RetinaNet_Tensorflow_Rotation with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #29
Source File: setup.py    From RetinaNet_Tensorflow_Rotation with MIT License 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self) 
Example #30
Source File: setup_linux.py    From simple-HRNet with GNU General Public License v3.0 5 votes vote down vote up
def build_extensions(self):
        customize_compiler_for_nvcc(self.compiler)
        build_ext.build_extensions(self)