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 2021/04/27 16:35:31 UTC

[GitHub] [tvm] tqchen opened a new pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

tqchen opened a new pull request #7932:
URL: https://github.com/apache/tvm/pull/7932


   This PR fixes the return value support in tir.tvm_call_packed
   
   - Clarified the semantics of the intrinsics
   - Fix a problem when lowering call packed with nested scopes(let bindings)
   - Added regression tests to cover the changes
   
   


-- 
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.

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



[GitHub] [tvm] tqchen commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621520129



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
        I agree a TODO is a good idea




-- 
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.

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



[GitHub] [tvm] tqchen edited a comment on pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#issuecomment-827747600


   cc @csullivan @areusch @giuseros @ZihengJiang 


-- 
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.

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



[GitHub] [tvm] giuseros commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
giuseros commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621501551



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       Is the PR that adds non-C support already merged? If so, I think it should be ok to add a test. If not, we might add a TODO and add the test when the PR gets merged




-- 
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.

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



[GitHub] [tvm] giuseros commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
giuseros commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621445920



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       Can you add a check also for the C backend? I tried this in AOT, but the C backend appears to no handling return values correctly. 




-- 
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.

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



[GitHub] [tvm] giuseros commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
giuseros commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621445920



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       Can you add a check also for the C backend? I tried this in AOT (to call `_linked_params_lookup`) , but the C backend appears to no handling return values correctly. 




-- 
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.

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



[GitHub] [tvm] tqchen commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621484634



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       i believe previously it was only works for non-C backend, but recent PR might added support




-- 
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.

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



[GitHub] [tvm] ZihengJiang merged pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
ZihengJiang merged pull request #7932:
URL: https://github.com/apache/tvm/pull/7932


   


-- 
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.

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



[GitHub] [tvm] giuseros commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
giuseros commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621445920



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       Can you add a check also for the C backend? I tried this in AOT (to call `_linked_params_lookup`) , but the C backend appears to not handling return values correctly. 




-- 
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.

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



[GitHub] [tvm] giuseros commented on a change in pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
giuseros commented on a change in pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#discussion_r621501551



##########
File path: tests/python/unittest/test_tir_transform_lower_tvm_builtin.py
##########
@@ -133,11 +133,45 @@ def check_packed_func(target="llvm"):
     tvm.ir.assert_structural_equal(alloca_shape, expected_stmt, map_free_vars=True)
 
 
-def test_packed_func():
+def test_lower_packed_func():
     check_packed_func("llvm")

Review comment:
       Is the PR that adds non-LLVM support already merged? If so, I think it should be ok to add a test. If not, we might add a TODO and add the test when the PR gets merged




-- 
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.

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



[GitHub] [tvm] tqchen commented on pull request #7932: [TIR][TRANSFORM] Return value support in tir.tvm_call_packed

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #7932:
URL: https://github.com/apache/tvm/pull/7932#issuecomment-827747600


   cc @csullivan @areusch @giuseros 


-- 
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.

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