autocast uses an internal “allow-list” to cast tensors into float16, if the operation is considered save using this precision.
The autocast docs 1 give you some more information.
Are you seeing any dtype mismatch errors in your code (inside the autocast region) as this could be a bug?