Skip to content

Replace usage of direct invocation of native modules with generated wrappers #2075

Closed

Description

@benvanik

iree_vm_invoke is not currently designed to directly invoke native functions. check_test does this, and it only happened to work because there was missing validation inside of the invocation logic. This validation is really useful so it'd be nice to rework check_test to not do this.

Activity

  1. added
    infrastructure
    on May 31, 2020
  2. GMNGeoffrey commented on Jun 1, 2020

    @GMNGeoffrey
    Member

    You're just talking about https://sourcegraph.com/github.com/google/iree/-/blob/iree/modules/check/check_test.cc#L174, not any issue in the check runner, right? It seems a little odd that we have to know whether something is a native function or not at that level. Isn't a native module just one way of implementing a VM module?
    Looking at your commit, the validation in question that's breaking is a function that takes variadic arguments, right? Which we can write with a native module but not with a normal bytecode module. Although actually the check module functions don't take variadic arguments. I guess that the way native module function signatures are created has to assume they do though? I used to have another module wrapping the calls to the native module for the unit tests, but removed it in 25e1362. Basically you're saying we need to put that back?

  3. benvanik commented on Nov 22, 2020

    @benvanik
    CollaboratorAuthor

    Was fixed long ago with 4c0a53e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions