Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Todo] Fix multi-input argument mapping #89

Open
whbldhwj opened this issue Jun 30, 2022 · 0 comments
Open

[Todo] Fix multi-input argument mapping #89

whbldhwj opened this issue Jun 30, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@whbldhwj
Copy link
Contributor

For muliti-input model, when converting model to Relay graph, TVM may generate a different order of input arguments comapred to the original model.
For example, for the model below

class Q6Net(nn.Module):
    def __init__(self) -> None:
        super(Q6Net, self).__init__()

    def forward(self, data_discount, data_quantity, data_shipdate, data_extendedprice):
       ...

TVM-generated Relay graph takes the input arguments in the order of

[
Var(data_extendedprice, ty=TensorType([10], float32)), 
Var(data_discount, ty=TensorType([10], float32)), 
Var(data_quantity, ty=TensorType([10], float32)), 
Var(data_shipdate, ty=TensorType([10], float32))
]

This information can be extracted from:
https://github.com/apache/tvm/blob/2625878abef4bc78da65918a8a8c1db441638e8b/python/tvm/relay/frontend/pytorch.py#L4276

As a result, when executing the RAF model with the arguments in the original order
data_discount, data_quantity, data_shipdate, data_extendedprice
we will get the incorrect output due to the mismatch of arguments. This needs to be fixed.

@whbldhwj whbldhwj added bug Something isn't working help wanted Extra attention is needed labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant