Bug Description
In py/torch_tensorrt/dynamo/conversion/impl/slice/ops.py, function slice_op, Line 112, it only considers the case when start is int, but not the case when start is trt.ITensor.
I tried to add support for start being trt.ITensor, however, I'm not able to run successfully because TRT requires the start being a shape tensor to be able to do shape inference but it seems start is not a shape tensor. Therefore, currently I'm only able to do a workaround by hard coding all the parameters of the slice layer.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
Build information about Torch-TensorRT can be found by turning on debug messages
- Torch-TensorRT Version (e.g. 1.0.0):
- PyTorch Version (e.g. 1.0):
- CPU Architecture:
- OS (e.g., Linux):
- How you installed PyTorch (
conda, pip, libtorch, source):
- Build command you used (if compiling from source):
- Are you using local sources or building from archives:
- Python version:
- CUDA version:
- GPU models and configuration:
- Any other relevant information:
Additional context
Bug Description
In py/torch_tensorrt/dynamo/conversion/impl/slice/ops.py, function
slice_op, Line 112, it only considers the case whenstartisint, but not the case whenstartistrt.ITensor.I tried to add support for
startbeingtrt.ITensor, however, I'm not able to run successfully because TRT requires thestartbeing a shape tensor to be able to do shape inference but it seemsstartis not a shape tensor. Therefore, currently I'm only able to do a workaround by hard coding all the parameters of the slice layer.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
conda,pip,libtorch, source):Additional context