Skip to content

Conversation

@matthewfl
Copy link
Contributor

This PR adds new raising from tensorrt.elemetnwise Ops to tensorrt.activation for the GELU Tanh (when created by torch-mlir) and GELU Erf. This also includes raising from min(a, max(x, y)) to the CLIP activation (which is used by clip and ReLU6 by torch-mlir). Merging these elementwise ops in to the tensorrt.activation type enables for TensorRT to fuse the activation into a proceeding linear layer's kernel (matrix multiply + elementwise sum).

@shelkesagar29 shelkesagar29 added the mlir-tensorrt Pull request for the mlir-tensorrt project label Jul 28, 2025
@matthewfl matthewfl force-pushed the mfl/raise-activations branch from 0685a68 to 221b51a Compare August 7, 2025 20:47
…on to tensorrt.activation Op

adds new raising from `tensorrt.elemetnwise` Ops to `tensorrt.activation` for the GELU Tanh (when created by torch-mlir) and GELU Erf.  This also includes raising from `min(a, max(x, y))` to the CLIP activation (which is used by clip and ReLU6 by torch-mlir).  Merging these elementwise ops in to the `tensorrt.activation` type enables for TensorRT to fuse the activation into a proceeding linear layer's kernel (matrix multiply + elementwise sum).

Signed-off-by: Matthew Francis-Landau <[email protected]>

make raise activation use same getSplatConstantElementAttribute utils function

Signed-off-by: Matthew Francis-Landau <[email protected]>
@matthewfl matthewfl force-pushed the mfl/raise-activations branch from 221b51a to ba10b6d Compare August 7, 2025 20:48
@matthewfl
Copy link
Contributor Author

@shelkesagar29 can you merge the PR. (I don't have a merge button that I can click)

@shelkesagar29 shelkesagar29 merged commit d8f3603 into NVIDIA:main Aug 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir-tensorrt Pull request for the mlir-tensorrt project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants