MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / set_clang_cuda_compiler_path

Function set_clang_cuda_compiler_path

configure.py:598–618  ·  view source on GitHub ↗

Set CLANG_CUDA_COMPILER_PATH.

(environ_cp)

Source from the content-addressed store, hash-verified

596
597
598def set_clang_cuda_compiler_path(environ_cp):
599 """Set CLANG_CUDA_COMPILER_PATH."""
600 default_clang_path = which('clang') or ''
601 ask_clang_path = ('Please specify which clang should be used as device and '
602 'host compiler. [Default is %s]: ') % default_clang_path
603
604 while True:
605 clang_cuda_compiler_path = get_from_env_or_user_or_default(
606 environ_cp, 'CLANG_CUDA_COMPILER_PATH', ask_clang_path,
607 default_clang_path)
608 if os.path.exists(clang_cuda_compiler_path):
609 break
610
611 # Reset and retry
612 print('Invalid clang path: %s cannot be found.' % clang_cuda_compiler_path)
613 environ_cp['CLANG_CUDA_COMPILER_PATH'] = ''
614
615 # Set CLANG_CUDA_COMPILER_PATH
616 environ_cp['CLANG_CUDA_COMPILER_PATH'] = clang_cuda_compiler_path
617 write_action_env_to_bazelrc('CLANG_CUDA_COMPILER_PATH',
618 clang_cuda_compiler_path)
619
620
621def prompt_loop_or_load_from_env(environ_cp,

Callers 1

mainFunction · 0.85

Calls 2

Tested by

no test coverage detected