I was wondering what the best way to go forward from a Custom C++/CUDA Pytorch operation to onnx and then to TensorRT (I want to end up running realtime on an AGX Xavier).
The custom module is done inline with “Custom C++ and CUDA Extensions”, however the torch.onnx Custom operations section mentions using torch script. Is this the proper way of doing it? Or can I just export/register the forward static method from the custom autograd function or something?
The actual error I get is below
ONNX export failed: Couldn’t export Python operator CorrelationFunction
Aside: the onnx exporter also has issues with grid_sample, but I just added the ATen fallback, is this okay, or is it best to also make this a custom plugin for better performance?
Source code for reference

  
      
      GitHub
  
  
    

5had3z/stereo-to-all 15

The aim of this project is to generate a pointcloud with motion vectors and semantic segmentation of stereoscopic image sequences. Targeting real-time deployment on an nVIDIA Xavier. - 5had3z/stere...


  
  
    
    
  
  


Cheers