-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TOPI] Treat undefined elements as constants in Array #7232
Conversation
I didn't know we could use None. Is there a way to test it in the unit tests? I'd like to see a unit test, but otherwise it looks good. |
It is supported here: https://github.com/apache/tvm/blob/main/include/tvm/topi/transform.h#L658 (so does |
Thanks @mbrookhart @yzhliu |
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
* [TOPI] Treat undefined elements as constants in Array * Add a checker * fix * add test case
#7018 introduces the dynamic support to
strided_slice
. However, in the following case, the static workload will be treat as a dynamic:This is because the
None
inend
is notIntImmNode
and will be judged as a non-constant array. This PR changes the behavior by ignoring the undefined elements.In addition, the dynamic path also assumes
strides
array is always given, but it will be initialized to array of 1 after this path. Since I'm not sure what's the right behavior, I only add a checker to error out.cc @kevinthesun @mbrookhart