Fix past CI after #24334
# What does this PR do?

Fix dtype issue in past CI (pytorch 1.11 and 1.10) after #24334

cc @gante 
@ydshieh thank you for fixing it 🙏 <|||||>_The documentation is not available anymore as the PR was closed or merged._