Torch
check_fp8_support(device_id=0)
Check if FP8 is supported on the current GPU.
FP8 requires compute capability 8.9+ (Ada Lovelace/Hopper architecture or newer).
Source code in bionemo/testing/torch.py
21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
recursive_assert_approx_equal(x, y, atol=0.0001, rtol=0.0001)
Assert that all tensors in a nested structure are approximately equal.
Source code in bionemo/testing/torch.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
recursive_detach(x)
Detach all tensors in a nested structure.
Source code in bionemo/testing/torch.py
36 37 38 39 40 41 42 43 44 45 |
|