Join paths with CUDA_HOME, or raises an error if it CUDA_HOME is not set. This is basically a lazy way of raising an error for missing $CUDA_HOME only once we need to get any CUDA-specific path.
(*paths)
| 2397 | _maybe_write(path, content) |
| 2398 | |
| 2399 | def _join_cuda_home(*paths) -> str: |
| 2400 | """ |
| 2401 | Join paths with CUDA_HOME, or raises an error if it CUDA_HOME is not set. |
| 2402 | |
| 2403 | This is basically a lazy way of raising an error for missing $CUDA_HOME |
| 2404 | only once we need to get any CUDA-specific path. |
| 2405 | """ |
| 2406 | if CUDA_HOME is None: |
| 2407 | raise OSError('CUDA_HOME environment variable is not set. ' |
| 2408 | 'Please set it to your CUDA install root.') |
| 2409 | return os.path.join(CUDA_HOME, *paths) |
| 2410 | |
| 2411 | |
| 2412 | def _is_cuda_file(path: str) -> bool: |
no test coverage detected
searching dependent graphs…