Fix crash.
This commit is contained in:
@@ -928,10 +928,7 @@ def should_use_bf16(device=None, model_params=0, prioritize_performance=True, ma
|
|||||||
if is_intel_xpu():
|
if is_intel_xpu():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if device is None:
|
props = torch.cuda.get_device_properties("cuda")
|
||||||
device = torch.device("cuda")
|
|
||||||
|
|
||||||
props = torch.cuda.get_device_properties(device)
|
|
||||||
if props.major >= 8:
|
if props.major >= 8:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user