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

[FIX][RUNTIME] Convert container with function value type #14024

Merged

Conversation

MasterJH5574
Copy link
Contributor

@MasterJH5574 MasterJH5574 commented Feb 17, 2023

Prior to this PR, though the convert function is capable of converting a single Python function/lambda to TVM func, it is not able to convert a container whose values inside are functions to TVM object.

This PR adds function conversion to convert_to_object and redirects convert to convert_to_object, so that now the conversion is always recursive, and therefore will work well on function container value type.

Co-authored-by: Chaofan Lin [email protected]

@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 17, 2023

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 by @-ing them in a comment.

Generated by tvm-bot

@MasterJH5574
Copy link
Contributor Author

cc @SiriusNEO @tqchen

Prior to this PR, though the `convert` function is capable of
converting a single Python function/lambda to TVM func, it is not able
to convert a container whose values inside are functions to TVM
object.

This PR adds function conversion to `convert_to_object` and redirects
`convert` to `convert_to_object`, so that now the conversion is always
recursive, and therefore will work well on function container value
type.

Co-authored-by: Chaofan Lin <[email protected]>
@MasterJH5574 MasterJH5574 force-pushed the tvm-dev/2023-02-17-dict-func-conversion branch from 732c19c to ff1647d Compare February 17, 2023 16:07
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! It's probably something we've left over with @cyx-6's work bringing PackedFunc as an Object. Thanks for the patch!

@tqchen tqchen merged commit b139736 into apache:main Feb 17, 2023
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.

5 participants