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

[Relay] Fix invalid shape function for "copy" operator #9749

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

mbs-octoml
Copy link
Contributor

@mbs-octoml mbs-octoml commented Dec 15, 2021

The @script shape function for copy was ill-formed, resulting in a TIR shape
function which did not assign to its output. That in turn caused either OOM or
assert fails as uninitialized shape dimensions worked their way downstream.
That fix is in python/tvm/relay/op/tensor.py.

Special thanks to @electriclilies for helping me with the scalar vs tensor switch
in the shape function. It turns out copy is used for scalars in some models.

Everything else is for testing and debugging as I tracked
this down.

[This is CORE-112 in OctoML JIRA.]

Copy link
Contributor

@electriclilies electriclilies left a comment

Choose a reason for hiding this comment

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

Overall LGTM! I have a few nitty questions but other than that, good to go in

include/tvm/runtime/debug.h Show resolved Hide resolved
src/relay/backend/te_compiler_cache.cc Show resolved Hide resolved
src/target/compilation_config.cc Show resolved Hide resolved
tests/python/relay/dyn/test_dynamic_op_level3.py Outdated Show resolved Hide resolved
@mbs-octoml
Copy link
Contributor Author

Thanks @electriclilies . Here goes another 6 hours of CI!

@mbs-octoml
Copy link
Contributor Author

Dang, stepped on my own toes in #9759. Here we go again.

The 'script' for of the shape function was ill-formed,
resulting in a TIR shape function which did not assign
to it's output, which in turn caused either OOM or
assert fails as uninitialized dimensions worked their
way downstream. That fix is in python/tvm/relay/op/tensor.py.

Everything else is for testing and debugging as I tracked
this down.

Special thanks to Lily for helping me with the scalar vs
tensor switch in the copy shape function.

[This is CORE-112 in OctoML JIRA.]
@masahi masahi merged commit 89b1676 into apache:main Dec 18, 2021
@mbs-octoml mbs-octoml deleted the mbs-CORE-112 branch January 3, 2022 19:04
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
The 'script' for of the shape function was ill-formed,
resulting in a TIR shape function which did not assign
to it's output, which in turn caused either OOM or
assert fails as uninitialized dimensions worked their
way downstream. That fix is in python/tvm/relay/op/tensor.py.

Everything else is for testing and debugging as I tracked
this down.

Special thanks to Lily for helping me with the scalar vs
tensor switch in the copy shape function.

[This is CORE-112 in OctoML JIRA.]
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
The 'script' for of the shape function was ill-formed,
resulting in a TIR shape function which did not assign
to it's output, which in turn caused either OOM or
assert fails as uninitialized dimensions worked their
way downstream. That fix is in python/tvm/relay/op/tensor.py.

Everything else is for testing and debugging as I tracked
this down.

Special thanks to Lily for helping me with the scalar vs
tensor switch in the copy shape function.

[This is CORE-112 in OctoML JIRA.]
qsqqsqqsq-intellif pushed a commit to qsqqsqqsq-intellif/tvm that referenced this pull request Apr 29, 2022
The 'script' for of the shape function was ill-formed,
resulting in a TIR shape function which did not assign
to it's output, which in turn caused either OOM or
assert fails as uninitialized dimensions worked their
way downstream. That fix is in python/tvm/relay/op/tensor.py.

Everything else is for testing and debugging as I tracked
this down.

Special thanks to Lily for helping me with the scalar vs
tensor switch in the copy shape function.

[This is CORE-112 in OctoML JIRA.]
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.

3 participants