You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a pytorch model that contains a Pixel Shuffle operation (which is not fully supported) and I would like to convert it to TensorRT, while being able to specify a dynamic shape as input. The "ts" path does not work as there is an issue, the "fx" path has problems too and I am not able to use a splitted model with dynamic shapes.
The conversion using torch_tensorrt.fx.compile succeeds when I use a static shape, however there is no way of specifying a dynamic shape
Using a manual approach (that is by manually tracing with acc_tracer, then constructing the TRTInterpreter and finally the TRTModule) fails as there is a non supported operation (a pixel shuffle layer) (Maybe I should open an Issue for this too?)
Using the manual approach with a TRTSplitter is maybe the way to go but I don't know how to specify the dynamic shape constraints in this situation.
Here is the code as I have it now. Please note that the branch with the splitter is executed and the result is errors when I execute the trt model with different shapes. If do_split is set to False the conversion fails as nn.PixelShuffle is not supported.
❓ Question
I have a pytorch model that contains a Pixel Shuffle operation (which is not fully supported) and I would like to convert it to TensorRT, while being able to specify a dynamic shape as input. The "ts" path does not work as there is an issue, the "fx" path has problems too and I am not able to use a splitted model with dynamic shapes.
What you have already tried
torch_tensorrt.fx.compile
succeeds when I use a static shape, however there is no way of specifying a dynamic shapeacc_tracer
, then constructing theTRTInterpreter
and finally theTRTModule
) fails as there is a non supported operation (a pixel shuffle layer) (Maybe I should open an Issue for this too?)TRTSplitter
is maybe the way to go but I don't know how to specify the dynamic shape constraints in this situation.The "manual" approach that I mentioned is the one specified in examples/fx/fx2trt_example.py and in the docs.
Here is the code as I have it now. Please note that the branch with the splitter is executed and the result is errors when I execute the trt model with different shapes. If
do_split
is set toFalse
the conversion fails asnn.PixelShuffle
is not supported.Environment
The official NVIDIA Pytorch Docker image version 22.12 is used.
The text was updated successfully, but these errors were encountered: