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

[Bug] Relay/TOPI adv_index not supporting None as arguments #12922

Closed
shingjan opened this issue Sep 28, 2022 · 0 comments
Closed

[Bug] Relay/TOPI adv_index not supporting None as arguments #12922

shingjan opened this issue Sep 28, 2022 · 0 comments
Labels

Comments

@shingjan
Copy link

shingjan commented Sep 28, 2022

The advanced indexing implementation of relay/topi is not able to handle cases that use None as one of the indexing argument.

My repro under test_forward_index

    class Index2(Module):
        def forward(self, x):
            return x[None, [2, 2]]

    input_data = torch.rand([3, 3, 3, 3]).float().cpu()
    verify_model_with_input(Index2().eval(), [input_data])

Expected behavior

A tensor shaped [1, 2, 3, 3, 3] shall be returned.

Actual behavior

>           raise Exception("warning unhandled case: {0}".format(type(expr)))
E           Exception: warning unhandled case: <class 'NoneType'>

python/tvm/relay/expr_functor.py:76: Exception

Environment

Latest TVM main

cc: @masahi

@areusch areusch added the needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it label Oct 19, 2022
@janetsc janetsc added the relay:op src/relay/op label Oct 19, 2022
@janetsc janetsc removed the needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it label Oct 28, 2022
@masahi masahi closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants