thanks so much for the suggestion of disabling autocast , that indeed is nice solution.
and also i found out that it depends on the input data , it overflows for certain datasets (with larger values for camera intrinsics values for example.)