You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/11/10 11:26:17 UTC

[GitHub] [tvm] guberti opened a new pull request, #13347: [TIR] Fix extern_primfunc buffer order bug

guberti opened a new pull request, #13347:
URL: https://github.com/apache/tvm/pull/13347

   This fixes #13330, which was blocking my work to write TIR schedules for microTVM.
   
   I originally thought I'd have to change the function signature of `DomainTouchedAccessMap`, but I couldn't think of a way to do that cleanly. Instead, I changed `extern_primfunc` to use `primfunc.params` to create the buffer lists in the right order.
   
   Would love a look from @csullivan!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1315853968

   I'm happy to merge it in once it's confirmed that the TVMScript issue has been fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1316296008

   Thanks @guberti for confirming :-) Merging it in


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1310140691

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @Hzfengsy, @junrushao <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1310146323

   I'd love to add a unit test to prevent regressions - ideally in `tests/python/unittest/test_tir_te_extern_primfunc.py`. However, when running on `main` I can't get that unit test to pass. I get:
   ```
   ============================================== ERRORS ===============================================
   _______________ ERROR collecting tests/python/unittest/test_tir_te_extern_primfunc.py _______________
   tests/python/unittest/test_tir_te_extern_primfunc.py:36: in <module>
       def func_1(A: T.Buffer[(16,), "float32"], C: T.Buffer[(1,), "float32"]):
   python/tvm/script/tir/prim_func.py:40: in prim_func
       result = from_source(input_func)
   python/tvm/script/parser.py:1368: in from_source
       result = to_ast(input_func, TVMDiagnosticCtx(), parser)
   ../.local/lib/python3.8/site-packages/synr/compiler.py:731: in to_ast
       prog = compiler.compile_module(program_ast)
   ../.local/lib/python3.8/site-packages/synr/compiler.py:100: in compile_module
       new_func = self.compile_def(stmt)
   ../.local/lib/python3.8/site-packages/synr/compiler.py:174: in compile_def
       params = self.compile_args_to_params(args)
   ../.local/lib/python3.8/site-packages/synr/compiler.py:164: in compile_args_to_params
       ty = self.compile_type(arg.annotation)
   ../.local/lib/python3.8/site-packages/synr/compiler.py:622: in compile_type
       return self._expr2type(self.compile_expr(ty))
   ../.local/lib/python3.8/site-packages/synr/compiler.py:605: in _expr2type
       assert isinstance(
   E   AssertionError: Expected subscript call to have lhs of Var, but it is <class 'synr.ast.Attr'>
   ```
   Perhaps I'm building TVM wrong?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao merged pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
junrushao merged PR #13347:
URL: https://github.com/apache/tvm/pull/13347


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1317118031

   LGTM, too!  I like the improvement of using primfunc's parameter list for making the tensor to buffer mapping, since the parameter list is what actually defines the order of parameters.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1316291634

   @junrushao I've confirmed the TVMScript issue (#13360) is fixed, can we merge this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1311342841

   @csullivan I fixed `test_tir_te_extern_primfunc.py` so that it fails on `HEAD` (and will catch regressions of this issue). I would have done that sooner, but I was blocked for a bit by #13360. Should be good to merge now!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13347: [TIR] Fix extern_primfunc buffer order bug

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13347:
URL: https://github.com/apache/tvm/pull/13347#issuecomment-1310760603

   Looks like the unit tests are failing because the `create_input_tensors_for_primfunc` helper function in `test_tir_te_extern_primfunc.py` uses the same `DomainTouchedAccessMap` function to order its tensors, so the orders happened to match before.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org