in Benchmarks/NVIDIA/NCCLBandwidth.py [0:0]
def build(self):
current = os.getcwd()
path ='nccl'
isdir = os.path.isdir(path)
if not isdir:
print("Building NCCL Library...")
results = subprocess.run(['git', 'clone', 'https://github.com/NVIDIA/nccl.git', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
build_path = os.path.join(current, 'nccl')
os.chdir(build_path)
results = subprocess.run('make -j src.build', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
tools.write_log(tools.check_error(results))
os.chdir(current)
results = subprocess.run('export NCCL_HOME=' + current + '/nccl/build', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
results = subprocess.run('export LD_LIBRARY_PATH=' + current + '/nccl/build/lib:$LD_LIBRARY_PATH', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
path ='nccl-tests'
isdir = os.path.isdir(path)
if not isdir:
print("Building NCCL Test..")
results = subprocess.run(['git', 'clone', 'https://github.com/NVIDIA/nccl-tests.git', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
build_path = os.path.join(current, 'nccl-tests')
os.chdir(build_path)
results = subprocess.run(['make'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
tools.write_log(tools.check_error(results))
else:
build_path = os.path.join(current, 'nccl-tests')
os.chdir(build_path)