(self)
| 49 | |
| 50 | class CudaUse(object): |
| 51 | def __init__(self): |
| 52 | self.cuda_available = th.cuda.is_available() |
| 53 | if self.cuda_available: |
| 54 | from fastai.utils.pynvml_gate import load_pynvml_env |
| 55 | self.pynvml = load_pynvml_env() |
| 56 | |
| 57 | def get_cuda_id(self): |
| 58 | if self.cuda_available: |
nothing calls this directly
no outgoing calls
no test coverage detected