Skip to content

Commit

Permalink
Dtype assignment without trycatch
Browse files Browse the repository at this point in the history
  • Loading branch information
raza-sikander committed Aug 21, 2024
1 parent 4c8cb3c commit 39bc878
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/unit/ops/transformer/inference/inference_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ def get_tolerances():
def get_dtypes():
global DTYPES
if DTYPES is None:
DTYPES = [torch.float32]
try:
if get_accelerator().is_fp16_supported():
DTYPES.append(torch.float16)
if get_accelerator().is_bf16_supported():
DTYPES.append(torch.bfloat16)
except (AssertionError, AttributeError):
pass
DTYPES = get_accelerator().supported_dtypes()
return DTYPES


Expand Down

0 comments on commit 39bc878

Please sign in to comment.