FIX: fix the cuda_arch on the fly and create dir
This commit is contained in:
7
env/merlin/HyQuas/packages/hyquas/package.py
vendored
7
env/merlin/HyQuas/packages/hyquas/package.py
vendored
@ -66,12 +66,13 @@ class Hyquas(CMakePackage, CudaPackage):
|
|||||||
def build_cutt(self):
|
def build_cutt(self):
|
||||||
cuda_arch = self.spec.variants['cuda_arch'].value[0]
|
cuda_arch = self.spec.variants['cuda_arch'].value[0]
|
||||||
|
|
||||||
|
# Filtering CMakefile & Makefile to change the cuda arch flags which are hardcoded
|
||||||
CMakefile = FileFilter('CMakeLists.txt')
|
CMakefile = FileFilter('CMakeLists.txt')
|
||||||
CMakefile.filter(r'^\s*CUDA_NVCC_FLAGS\s*=.*', 'CUDA_NVCC_FLAGS := -Xcompiler -fopenmp -std=c++14 -O2 -g -arch=compute_' + cuda_arch + '-code=sm_' + cuda_arch + '--ptxas-options=-v -lineinfo -keep' )
|
CMakefile.filter("CUDA_NVCC_FLAGS .*", "CUDA_NVCC_FLAGS \"-Xcompiler -fopenmp -std=c++14 -O2 -g -arch=compute_{0} -code=sm_{0} --ptxas-options=-v -lineinfo -keep\")".format(cuda_arch))
|
||||||
with working_dir('./third-party/cutt'):
|
with working_dir('./third-party/cutt'):
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
|
makefile.filter("GENCODE_FLAGS := .*", "GENCODE_FLAGS := -gencode arch=compute_{0},code=sm_{0}".format(cuda_arch))
|
||||||
|
|
||||||
makefile.filter(r'^\s*GENCODE_FLAGS\s*=.*', 'GENCODE_FLAGS := -gencode arch=compute_' + cuda_arch +',code=sm_' + cuda_arch )
|
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
@ -95,5 +96,7 @@ class Hyquas(CMakePackage, CudaPackage):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdir(prefix.bin)
|
mkdir(prefix.bin)
|
||||||
|
with working_dir(self.stage.source_path):
|
||||||
|
mkdirp('evaluator-preprocess/parameter-files')
|
||||||
with working_dir(self.build_directory):
|
with working_dir(self.build_directory):
|
||||||
install('main', prefix.bin)
|
install('main', prefix.bin)
|
||||||
|
Reference in New Issue
Block a user