[ONNX] handle equality checks on devices (#77203)
Previously the newly added `test_device_eq` would fail since the inputs
to `Equal` were invalid. Handle this by replacing its inputs with a
fixed tensor `Constant`. This is OK since ONNX doesn't have the concept
of different devices.
Discovered during investigation of
https://github.com/microsoft/onnx-converters-private/issues/9
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77203
Approved by: https://github.com/BowenBao