Skip to content

Commit

Permalink
IPEX make IPEX_FORCE_ATTENTION_SLICE=-1 disable Dynamic Atten
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed Jan 18, 2025
1 parent 7006e47 commit facfe2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/intel/ipex/hijacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def as_tensor(data, dtype=None, device=None):
return original_as_tensor(data, dtype=dtype, device=device)


if device_supports_fp64 and os.environ.get('IPEX_FORCE_ATTENTION_SLICE', None) is None:
if os.environ.get('IPEX_FORCE_ATTENTION_SLICE', '0') == '-1' or (device_supports_fp64 and os.environ.get('IPEX_FORCE_ATTENTION_SLICE', '0') == '0'):
original_torch_bmm = torch.bmm
original_scaled_dot_product_attention = torch.nn.functional.scaled_dot_product_attention
else:
Expand Down

0 comments on commit facfe2b

Please sign in to comment.