MCPcopy Create free account
hub / github.com/pytorch/executorch / get_nvidia_driver_version

Function get_nvidia_driver_version

util/collect_env.py:174–181  ·  view source on GitHub ↗
(run_lambda)

Source from the content-addressed store, hash-verified

172
173
174def get_nvidia_driver_version(run_lambda):
175 if get_platform() == "darwin":
176 cmd = "kextstat | grep -i cuda"
177 return run_and_parse_first_match(
178 run_lambda, cmd, r"com[.]nvidia[.]CUDA [(](.*?)[)]"
179 )
180 smi = get_nvidia_smi()
181 return run_and_parse_first_match(run_lambda, smi, r"Driver Version: (.*?) ")
182
183
184def get_gpu_info(run_lambda):

Callers 1

get_env_infoFunction · 0.85

Calls 3

get_platformFunction · 0.85
get_nvidia_smiFunction · 0.85

Tested by

no test coverage detected