[ONNX] Remove deprecated functions (#107208)
The usage of some functions is deprecated. This PR drop them.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107208
Approved by: https://github.com/justinchuby, https://github.com/thiagocrepaldi