-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interpolate): Addressing the linear, scale factor, align corners…
… edge case This commit adds support in some cases for the edge case when handling torch.nn.functional.interpolate where the user is doing some form of linear upsampling and uses scale factor to calculate the new tensor size at runtime and they set align corners to true (as of PyTorch 1.5 this is no longer the default behavior). This commit adds support for this case when users chose to construct static input size engines via the interpolate plugin which will run the function from ATen on CPU. In the case of dynamic input shapes with these 3 conditions the compilation will terminate with an error. The ultimate solution will be to find the root cause of the descripancy between PyTorch and TensorRT. Barring that we will need to use the dimension calculation primatives for TensorRT plugins. However, there is a limitation where static values in the computation cannot be floats which PyTorch scale factors are. Therefore it doesn't seem possible currently to support this usecase. Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
- Loading branch information
1 parent
0cda1cc
commit 92e3818
Showing
6 changed files
with
307 additions
and
198 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.