(Translated by https://www.hiragana.jp/)
[Draft][FFI] Remove backwards-compatibility unwrapping of IntImm by Lunderberg · Pull Request #17241 · apache/tvm · GitHub
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

[Draft][FFI] Remove backwards-compatibility unwrapping of IntImm #17241

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Lunderberg
Copy link
Contributor

This is a follow-up PR to #16183, which updated the FFI with explicit integer types. As part of that change, many internal functions were updated to accept non-IR types (e.g. Array<runtime::Int> instead of Array<IntImm>). For backwards compatibility with callees that provided the IR types, a specialization of PackedFuncValueConverter unwrapped the IntImm into a runtime::Int.

This commit removes the backwards-compatibility specialization of PackedFuncValueConverter. Breakages that are found in CI as a result will then be updated at the caller side, removing the need for the backwards-compatibility handler altogether.

@Lunderberg
Copy link
Contributor Author

The initial commit in this PR branch only removes the backwards-compatibility handler, and does not yet update any callers. This is expected to trigger breakage in CI, which will identify the callers that must be updated.

@Lunderberg Lunderberg marked this pull request as draft August 5, 2024 14:28
@Lunderberg Lunderberg changed the title [FFI] Remove backwards-compatibility unwrapping of IntImm [Draft][FFI] Remove backwards-compatibility unwrapping of IntImm Aug 5, 2024
@Lunderberg Lunderberg force-pushed the ffi_remove_automatic_intimm_to_runtime_int_conversion branch from a721e35 to cf1b599 Compare August 26, 2024 14:42
@tqchen
Copy link
Member

tqchen commented Sep 6, 2024

would be great to followup on this one

@Lunderberg
Copy link
Contributor Author

Agreed, though unfortunately I haven't had time to do so. It looks like the current failures are in the relay/collage C++ testing, but I haven't looking into it.

@tqchen
Copy link
Member

tqchen commented Sep 14, 2024

Given these are legacy. I think we can remove those tests to move forward

This is a follow-up PR to apache#16183,
which updated the FFI with explicit integer types.  As part of that
change, many internal functions were updated to accept non-IR
types (e.g. `Array<runtime::Int>` instead of `Array<IntImm>`).  For
backwards compatibility with callees that provided the IR types, a
specialization of `PackedFuncValueConverter` unwrapped the `IntImm`
into a `runtime::Int`.

This commit removes the backwards-compatibility specialization of
`PackedFuncValueConverter`.  Breakages that are found in CI as a
result will then be updated at the caller side, removing the need for
the backwards-compatibility handler altogether.
@Lunderberg Lunderberg force-pushed the ffi_remove_automatic_intimm_to_runtime_int_conversion branch from cf1b599 to 2e187d7 Compare September 16, 2024 17:07
@tqchen
Copy link
Member

tqchen commented Sep 23, 2024

would be great to check the remaining errors and get this in

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.

2 participants