Skip to content
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

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Apr 27, 2021

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

- 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
@tqchen
Copy link
Member Author

tqchen commented Apr 27, 2021

@@ -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")
Copy link
Contributor

@giuseros giuseros Apr 27, 2021

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.

Copy link
Member Author

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

Copy link
Contributor

@giuseros giuseros Apr 27, 2021

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

Copy link
Member Author

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

Copy link
Contributor

@csullivan csullivan left a 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

@ZihengJiang ZihengJiang merged commit 62309e5 into apache:main Apr 30, 2021
umangyadav pushed a commit to umangyadav/tvm that referenced this pull request May 5, 2021
…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
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…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
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…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
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…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
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
…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
@tqchen tqchen deleted the packed branch February 26, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants