Skip to content

[Relax][PyTorch] Add rnn_tanh.input converter#19837

Draft
cchung100m wants to merge 1 commit into
apache:mainfrom
cchung100m:issue-18364-rnn_tanh
Draft

[Relax][PyTorch] Add rnn_tanh.input converter#19837
cchung100m wants to merge 1 commit into
apache:mainfrom
cchung100m:issue-18364-rnn_tanh

Conversation

@cchung100m

Copy link
Copy Markdown
Contributor

Hi Committers,

This PR addresses the rnn_tanh.input part of issue #18364. Any suggestions would be appreciated if you are available.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for translating vanilla tanh-RNN cells (_rnn_tanh and _rnn_tanh_cell_unroll) in the TVM Relax PyTorch frontend. The review feedback identifies three critical issues: a typo in the function call premute_dims instead of permute_dims, an incorrect range definition for the reverse path iteration that lacks a step argument, and an incorrect initialization of the forward hidden state using zeros instead of slicing the input hidden state hx with take.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread python/tvm/relax/frontend/torch/exported_program_translator.py Outdated
Comment thread python/tvm/relax/frontend/torch/exported_program_translator.py Outdated
Comment thread python/tvm/relax/frontend/torch/exported_program_translator.py
@cchung100m cchung100m force-pushed the issue-18364-rnn_tanh branch from 78f1250 to 4cebdbd Compare June 19, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant