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] trilu not tagged with injective and thus miss reduce schedule #13030

Closed
ganler opened this issue Oct 11, 2022 · 0 comments · Fixed by #13120
Closed

[Bug] trilu not tagged with injective and thus miss reduce schedule #13030

ganler opened this issue Oct 11, 2022 · 0 comments · Fixed by #13120
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@ganler
Copy link
Contributor

ganler commented Oct 11, 2022

Expected behavior

TVM should successfully compile a model whose operators are supoprted.

Actual behavior

For some cases, trilu-argmin cannot find a reduction strategy and thus throw:

raise RuntimeError("Unsupported operator: %s" % operator.tag)

The reason is that in this case trilu's operator.tag is empty which is not regarded as injective:

if tag.is_injective(operator.tag):

I am not sure but maybe we need to put proper operator tag for trilu?

Environment

fa17da2 on Ubuntu 20.04.

Steps to reproduce

Preferably a minimal script to cause the issue to occur.

import tvm
from tvm import relay

i0 = relay.var("i0", shape=[2, 2], dtype="int32")
i1 = relay.var("i1", shape=(), dtype="int64")
v0 = relay.trilu(i0, i1)
v1 = relay.argmin(v0, axis=[0])

f = relay.Function([i0, i1], v1)
relay.create_executor("graph", device=tvm.cpu(), target="llvm").evaluate(f)

Triage

Please refer to the list of label tags linked above to find the relevant tags and add them here in a bullet format (example below).

  • needs-triage

cc: @jwfromm

@ganler ganler added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Oct 11, 2022
@ganler ganler changed the title [Bug] Cannot find reduce schedule for Trilu [Bug] trilu not tagged with injective and thus miss reduce schedule Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant