Could you please share your training loop?
Also  basic autocast usage would be something like -
with autocast():
    out = model(x)
    loss = criterion(targets, out)
print(loss) #to debug
loss.backward()
optim.step()