(self, verbose=False)
| 20 | return f'deepspeed.inference.v2.kernels{self.NAME}' |
| 21 | |
| 22 | def is_compatible(self, verbose=False): |
| 23 | try: |
| 24 | import torch |
| 25 | except ImportError: |
| 26 | if verbose: |
| 27 | self.warning("Please install torch if trying to pre-compile inference kernels") |
| 28 | return False |
| 29 | |
| 30 | cuda_okay = True |
| 31 | if not os.environ.get("DS_IGNORE_CUDA_DETECTION"): |
| 32 | if not self.is_rocm_pytorch() and torch.cuda.is_available(): #ignore-cuda |
| 33 | sys_cuda_major, _ = installed_cuda_version() |
| 34 | torch_cuda_major = int(torch.version.cuda.split('.')[0]) |
| 35 | cuda_capability = self.cuda_capability_major() |
| 36 | if cuda_capability is not None and cuda_capability < 6: |
| 37 | if verbose: |
| 38 | self.warning("NVIDIA Inference is only supported on Pascal and newer architectures") |
| 39 | cuda_okay = False |
| 40 | if cuda_capability is not None and cuda_capability >= 8: |
| 41 | if torch_cuda_major < 11 or sys_cuda_major < 11: |
| 42 | if verbose: |
| 43 | self.warning("On Ampere and higher architectures please use CUDA 11+") |
| 44 | cuda_okay = False |
| 45 | return super().is_compatible(verbose) and cuda_okay |
| 46 | |
| 47 | def filter_ccs(self, ccs): |
| 48 | ccs_retained = [] |
nothing calls this directly
no test coverage detected