Skip to content

Run vm tests with C Backend - #4549

Merged
benvanik merged 4 commits into
iree-org:mainfrom
simon-camp:c_target
Jan 21, 2021
Merged

benvanik merged 4 commits into
iree-org:mainfrom
simon-camp:c_target

Conversation

@simon-camp

@simon-camp simon-camp commented Jan 19, 2021 •

Copy link
Copy Markdown

This adds a runner using the C backend for the tests under iree/vm/test. I'm marking it as wip because there are still some things missing to get fully automated tests.

  • Support for control flow ops so that the macro definitions in c_funcs.h can be removed and canonicalizations can be reenabled in CModuleTarget.cpp
  • Autogenerate the code in arithmetic_ops.h, so that the generated header can be used directly

Alternatively this could land as is featurewise and the points above could be handled in a follow up PR.

@google-cla google-cla Bot added the cla: yes label Jan 19, 2021
@marbre
marbre requested a review from benvanik January 19, 2021 15:43
@simon-camp
simon-camp marked this pull request as ready for review January 19, 2021 15:49
Comment thread iree/compiler/Dialect/VM/Target/BUILD Resolved
Comment thread iree/compiler/Dialect/VM/Target/BUILD Resolved
std::vector<TestParams> test_params;

// TODO(simon-camp) get these automatically
std::vector<ModuleDescription> modules = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It'd be cool to share this entire file with both emitc and the bytecode; a iree/vm/testing/module_test.h+cc that contained most of this and then an extern "GetModuleFactory()" that would get defined by the particular test type (iree/vm/bytecode_module_test_factory.cc, etc). Maybe file an issue so that we can track that? (it'd also be useful for benchmarks and such too)

Comment thread iree/vm/test/emitc/module_test.cc Resolved
@benvanik
benvanik self-requested a review January 19, 2021 18:07
@simon-camp simon-camp changed the title [WIP] Run vm tests with C Backend Run vm tests with C Backend Jan 20, 2021
@simon-camp

Copy link
Copy Markdown
Author

I think this is ready to merge now if the checks are green :)

@benvanik
benvanik merged commit 5ddd22a into iree-org:main Jan 21, 2021
@hanhanW hanhanW mentioned this pull request Jan 22, 2021
@simon-camp
simon-camp deleted the c_target branch January 26, 2021 08:25
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