Explicitly convert to double for comparison (#79964)
Otherwise it errors on ONNX clang10 build: https://github.com/pytorch/pytorch/runs/6976721937?check_suite_focus=true
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79964
Approved by: https://github.com/malfet