MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / get_nvcc_version

Function get_nvcc_version

custom_ops/setup_ops.py:144–152  ·  view source on GitHub ↗

Get cuda version of nvcc.

()

Source from the content-addressed store, hash-verified

142
143
144def get_nvcc_version():
145 """
146 Get cuda version of nvcc.
147 """
148 nvcc_output = subprocess.check_output(["nvcc", "--version"], universal_newlines=True)
149 output = nvcc_output.split()
150 release_idx = output.index("release") + 1
151 nvcc_cuda_version = float(output[release_idx].split(",")[0])
152 return nvcc_cuda_version
153
154
155def get_gencode_flags(archs):

Callers 1

setup_ops.pyFile · 0.85

Calls 2

splitMethod · 0.80
indexMethod · 0.80

Tested by

no test coverage detected