framework
zeus.util.framework
Utilities for framework-specific code.
torch_is_available
cached
torch_is_available()
Check if PyTorch is available.
Source code in zeus/util/framework.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
cuda_sync
cuda_sync(device=None)
Synchronize CPU and CUDA.
cupy.cuda.Device.synchronize
may be a good choice to make
CUDA device synchronization more general. Haven't tested it yet.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device |
int | None
|
The device to synchronize. |
None
|
Source code in zeus/util/framework.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|