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

[RUNTIME] Introduce RValue reference(move) support to TypedPackedFunc #5271

Merged
merged 3 commits into from
Apr 11, 2020

Commits on Apr 10, 2020

  1. [RUNTIME] Introduce RValue reference(move) support to TypedPackedFunc

    This PR introduces RValue reference support the PackedFunc calling convention to address the above issue.
    Specifically, when an argument is a r-value reference, we will use a assign a different type code(`kObjectRValueRefArg`),
    and pass `Object**`  (the address to the Object pointer) instead through the values array.
    The callee can choose to move out this Object pointer and set the original Object pointer from the caller side to be nullptr.
    
    We also add an experimental move support to the python side(marked as _move so to indicate the dev nature).
    This enhancement will enable copy on write optimizations through out the TVM stack.
    tqchen committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    8128fdd View commit details
    Browse the repository at this point in the history
  2. Address review comments

    tqchen committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    58f61a3 View commit details
    Browse the repository at this point in the history
  3. fix compilation

    tqchen committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    21b0fb5 View commit details
    Browse the repository at this point in the history