Enabling bytecode module coroutine begin/resume. (#9497)
iree_vm_bytecode_dispatch_begin now begins a call and if it does not
complete prior to returning the caller can repeatedly issue
iree_vm_bytecode_dispatch_resume until it does.
Invocations are marked with fiber enter/leave to allow tracy to
visualize them. Unfortunately due to proper nesting requirements
we can't do the fiber management at a more common level and instead
will need each implementation to manage it around their execution.
Future changes will update iree/vm/invocation.h to support stateful
coroutine-style invocations with a prettier API. This is just the
internals to verify that the bytecode dispatch supports it.
Progress on #8093.
diff --git a/tools/iree-benchmark-module-main.cc b/tools/iree-benchmark-module-main.cc
index a20020b..784d9a3 100644
--- a/tools/iree-benchmark-module-main.cc
+++ b/tools/iree-benchmark-module-main.cc
@@ -339,8 +339,8 @@
IREE_TRACE_SCOPE0("IREEBenchmark::RegisterSpecificFunction");
iree_vm_function_t function;
- IREE_RETURN_IF_ERROR(input_module_->lookup_function(
- input_module_->self, IREE_VM_FUNCTION_LINKAGE_EXPORT,
+ IREE_RETURN_IF_ERROR(iree_vm_module_lookup_function_by_name(
+ input_module_, IREE_VM_FUNCTION_LINKAGE_EXPORT,
iree_string_view_t{function_name.data(), function_name.size()},
&function));