Uh oh!
There was an error while loading. Please reload this page.
[BYOC] RelayToTIR custom codegen passes can still depend on dynamic shape functions - #11619
Conversation
mbs-octoml
commented
Jun 7, 2022
(Will give this a run through ci in draft form). |
areusch
left a comment
There was a problem hiding this comment.
thanks @mbs-octoml a couple questions for my understanding
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
345b9db to
210e2c0Comparembs-octoml
commented
Jun 8, 2022
Thanks @areusch , I've added a large intro comment to capture what I've reverse engineered. |
As discussed offline I'm going to pay down some testing tech debt and ping back. |
210e2c0 to
db09ba6Comparembs-octoml
commented
Jun 9, 2022
@areusch PTAL, added a bare-bones-but-at-least-it's-a-start unit test in test_pass_lower_te.py. Spent way too much time trying to make the tests of the form assert_equals(output, parse("...")) but gave up due to difficulties with matching GlobalVars. |
…hape functions In apache#11474 I got ready to switch CUTLASS from function-at-a-time to IRModule-at-a-time compilation. However my approach didn't handle dynamic shape functions, so I adjust it here. The idea is still that such passes will leave behind calls to 'extern' functions. However, converting those calls to 'call_lowered' form in MarkCompilerFunctionsAsExtern is too soon since only the TECompiler knows how to capture all the attributes necessary to support dynamic shape functions. So stop doing that in MarkCompilerFunctionsAsExtern and instead support this case properly in the TECompiler. While there try to chip away at the chronic lack of structure in te_compiler.cc. Every little bit helps. Add a basic unit test.
feea55c to
78d92c8Compare| main = actual_mod["main"] | ||
| call = main.body | ||
| assert call.op.name == "call_lowered" |
areusch
commented
Jun 10, 2022
tagging issue describing test challenges to cross-reference it. #11661 |
mbs-octoml
commented
Jun 10, 2022
@tvm-bot merge |
Cannot merge, these CI jobs are not successful on 78d92c8: |
…hape functions (apache#11619) In apache#11474 I got ready to switch CUTLASS from function-at-a-time to IRModule-at-a-time compilation. However my approach didn't handle dynamic shape functions, so I adjust it here. The idea is still that such passes will leave behind calls to 'extern' functions. However, converting those calls to 'call_lowered' form in MarkCompilerFunctionsAsExtern is too soon since only the TECompiler knows how to capture all the attributes necessary to support dynamic shape functions. So stop doing that in MarkCompilerFunctionsAsExtern and instead support this case properly in the TECompiler. While there try to chip away at the chronic lack of structure in te_compiler.cc. Every little bit helps. Add a basic unit test.
In #11474 I got ready to switch CUTLASS from function-at-a-time to IRModule-at-a-time compilation.
However my approach didn't handle dynamic shape functions, so I adjust it here.
The idea is still that such passes will leave behind
calls to 'extern' functions. However, converting those
calls to 'call_lowered' form in
MarkCompilerFunctionsAsExtern is too soon since only
the TECompiler knows how to capture all the attributes
necessary to support dynamic shape functions.
So stop doing that in MarkCompilerFunctionsAsExtern and
instead support this case properly in the TECompiler.
While there try to chip away at the chronic lack of structure in te_compiler.cc. Every little bit helps.
Added a bare-bones unit test to exercise the main lowering/call-rewrite flavors, but much more is needed.