()
| 42 | #---------------------------------------------------------------------------- |
| 43 | |
| 44 | def _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. |