def nvcc_compiler(name): if name == '': compiler = find_nvcc_compiler() else: compiler = NvccCompiler(name) if compiler is None: raise argparse.ArgumentTypeError( f"Couldn't automatically find nvcc compiler") elif not compiler.is_valid(): raise argparse.ArgumentTypeError( f"Program {compiler} is not a supported nvcc compiler") return compiler
def find_compiler(self) -> Optional[Compiler]: if self.gpu: return find_nvcc_compiler() else: return find_gcc_compiler() or find_clang_compiler()