DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

RuntimeError: Subtraction, the `-` operator, with a bool tensor is not supported. If you are trying to invert a mask, use the `~` or `logical_not()` operator instead

Open ShinichR opened this issue 2 years ago • 1 comments

https://github.com/microsoft/DeepSpeed/blob/4de4d2acc6077707c806a8abbc26fba1e2779745/deepspeed/ops/transformer/inference/ds_attention.py#L101

1 - input_mask need to be modified to ~input_mask

ShinichR avatar Apr 20 '23 09:04 ShinichR

https://github.com/microsoft/DeepSpeed/blob/4de4d2acc6077707c806a8abbc26fba1e2779745/deepspeed/ops/transformer/inference/ds_attention.py#L101

1 - input_mask need to be modified to ~input_mask

Solved my problem, thanks

enbacoo avatar Apr 26 '23 06:04 enbacoo