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
During development of Pytorch 1.10, the schema of gelu layer changed from being aten::gelu(Tensor self, bool approximate) -> (Tensor) to aten::gelu(Tensor self) -> (Tensor)
Public pytorch 1.10.0 and 1.10.2 contains gelu op of the form
aten::gelu(Tensor self) -> (Tensor)
Torch-TensorRT available in master branch and shipped with 21.11, 21.12 and 22.01 currently supports the public pytorch's gelu schema . Hence, if your model (which has gelu layer) is converted into torchscript inside any of 21.11, 21.12 and 22.01 containers and compiled with Torch-TensorRT, you will face the following error
This will build a new docker container very similar to Pytorch NGC 22.01 container with Torch-TensorRT reinstalled (make sure the patch is applied before building). This new docker container would support both schema variants of gelu.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
During development of Pytorch 1.10, the schema of gelu layer changed from being
aten::gelu(Tensor self, bool approximate) -> (Tensor)
toaten::gelu(Tensor self) -> (Tensor)
NVIDIA's NGC Pytorch containers 21.11 and 21.12 contains gelu of the following form (Pytorch version: 1.11.0a0+b6df043)
NGC container 22.01 (Pytorch version : 1.11.0a0+bfe5ad2) also contains gelu of the form
NVIDIA NGC container is using unmerged pull request pytorch/pytorch#61439.
Public pytorch 1.10.0 and 1.10.2 contains gelu op of the form
Torch-TensorRT available in master branch and shipped with 21.11, 21.12 and 22.01 currently supports the
public pytorch's gelu schema
. Hence, if your model (which has gelu layer) is converted into torchscript inside any of 21.11, 21.12 and 22.01 containers and compiled with Torch-TensorRT, you will face the following errorbecause Torch-TensorRT is expecting
aten::gelu(Tensor self)
.We are working on this to resolve it in future NGC containers. But here is a temporary solution
Solution:
Rebuild the Torch-TensorRT inside the docker container with this patch #845.
You can follow the instructions here https://github.com/NVIDIA/Torch-TensorRT/tree/master/docker
Say if you're using existing 22.01 container, include the changes in the patch to your current Torch-TensorRT directory and build an image by running
This will build a new docker container very similar to Pytorch NGC 22.01 container with Torch-TensorRT reinstalled (make sure the patch is applied before building). This new docker container would support both schema variants of gelu.
Beta Was this translation helpful? Give feedback.
All reactions