Replace TensorRT's deprecated API in `caffe2/python/trt/test_pt_onnx_trt.py` (#60236)
Summary:
TensorRT v8 is going to remove some functions/methods that used in test.
ref:
- getMaxWorkspaceSize deprecation: https://github.com/NVIDIA/TensorRT/blob/b2d60b6e1003f973983903de154a274b569006b8/include/NvInfer.h#L6984-L6993
- buildCudaEngine deprecation: https://github.com/NVIDIA/TensorRT/blob/b2d60b6e1003f973983903de154a274b569006b8/include/NvInfer.h#L7079-L7087
cc ptrblck
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60236
Reviewed By: gchanan
Differential Revision: D29232376
Pulled By: ngimel
fbshipit-source-id: 2b8a48787bf61c68a81568b6026d6afd5a83e751