-
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
[TIR][TRANSFORM] Return value support in tir.tvm_call_packed #7932
Conversation
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
@@ -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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe previously it was only works for non-C backend, but recent PR might added support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree a TODO is a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Verified this with a packed function returning a handle. Thanks @tqchen
…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
…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
…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
…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
…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 PR fixes the return value support in tir.tvm_call_packed