Fix #1935 , torch.amp.autocast -> torch.autocast (namespace issue for 1.10 pt compat)
parent
9260cf517d
commit
983310d6a2
|
@ -260,7 +260,7 @@ class LiteMSA(nn.Module):
|
|||
v = F.pad(v, (0, 1), mode="constant", value=1.)
|
||||
|
||||
if not torch.jit.is_scripting():
|
||||
with torch.amp.autocast(device_type=v.device.type, enabled=False):
|
||||
with torch.autocast(device_type=v.device.type, enabled=False):
|
||||
out = self._attn(q, k, v)
|
||||
else:
|
||||
out = self._attn(q, k, v)
|
||||
|
|
Loading…
Reference in New Issue