MCPcopy
hub / github.com/XingangPan/DragGAN / _get_mangled_gpu_name

Function _get_mangled_gpu_name

torch_utils/custom_ops.py:44–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42#----------------------------------------------------------------------------
43
44def _get_mangled_gpu_name():
45 name = torch.cuda.get_device_name().lower()
46 out = []
47 for c in name:
48 if re.match('[a-z0-9_-]+', c):
49 out.append(c)
50 else:
51 out.append('-')
52 return ''.join(out)
53
54#----------------------------------------------------------------------------
55# Main entry point for compiling and loading C++/CUDA plugins.

Callers 1

get_pluginFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected