Fix #1935 , torch.amp.autocast -> torch.autocast (namespace issue for 1.10 pt compat)

vit_packed
Ross Wightman 2023-08-30 15:02:20 -07:00
parent 9260cf517d
commit 983310d6a2
1 changed files with 1 additions and 1 deletions

View File

@ -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)