shawnington 8299ebdaae
Update attention.py to respect FORCE_UPCAST_ATTENTION_DTYPE
Fixed attention precision not being cast in attention_pytorch and others functions. This led to the functions not being able to respect the `--dont-upcast-attention` flag.  

change calls to `.float()` to `.to(dtype=torch.float32)` in several locations, as it profiles much faster. 

removed unneeded check for `attn_precision == torch.float32`, as the change from `.float()` to `.to(dtype=cast_to_type)` does not cast or copy if `tensor.dtype == cast_to_type`
2024-06-03 08:21:35 -07:00
..
2024-02-23 02:39:35 -05:00
2023-01-16 22:37:14 -05:00
2023-12-26 12:52:21 -05:00
2024-01-21 21:51:22 -05:00
2024-01-21 21:51:22 -05:00
2024-02-18 02:20:23 -05:00
2024-03-25 18:09:23 -04:00
2024-05-08 18:36:56 -04:00
2024-04-12 22:12:35 -04:00
2024-06-02 19:23:37 -04:00
2024-05-22 13:56:28 -04:00
2023-01-16 22:37:14 -05:00
2024-05-27 19:08:27 -04:00
2024-05-27 19:08:27 -04:00
2024-03-11 13:54:56 -04:00