sw:vec_iree: Update VM API Match the IREE change in https://github.com/openxla/iree/commit/09630d6 Change-Id: I3bfead809c46f4c2165ccfbde210cbb8ea680586
diff --git a/device/device_vmvx_loader.c b/device/device_vmvx_loader.c index cfaf111..a32bd98 100644 --- a/device/device_vmvx_loader.c +++ b/device/device_vmvx_loader.c
@@ -31,7 +31,8 @@ iree_hal_sync_device_params_initialize(¶ms); iree_vm_instance_t* instance = NULL; - iree_status_t status = iree_vm_instance_create(host_allocator, &instance); + iree_status_t status = iree_vm_instance_create(IREE_VM_TYPE_CAPACITY_DEFAULT, + host_allocator, &instance); if (iree_status_is_ok(status)) { status = iree_hal_vmvx_module_loader_create(
diff --git a/model_util/util.c b/model_util/util.c index 11cba21..9920457 100644 --- a/model_util/util.c +++ b/model_util/util.c
@@ -39,7 +39,8 @@ iree_hal_device_t **device, iree_vm_context_t **context) { iree_allocator_t host_allocator = iree_allocator_system(); - iree_status_t result = iree_vm_instance_create(host_allocator, &instance); + iree_status_t result = iree_vm_instance_create(IREE_VM_TYPE_CAPACITY_DEFAULT, + host_allocator, &instance); #if defined(BUILD_INLINE_HAL) IREE_RETURN_IF_ERROR(iree_hal_module_register_inline_types(instance)); @@ -173,9 +174,9 @@ // Setup call inputs with our buffers. iree_vm_list_t *inputs = NULL; if (iree_status_is_ok(result)) { - result = iree_vm_list_create( - /*element_type=*/NULL, /*capacity=*/model->num_input, - iree_allocator_system(), &inputs); + result = iree_vm_list_create(iree_vm_make_undefined_type_def(), + /*capacity=*/model->num_input, + iree_allocator_system(), &inputs); } iree_vm_ref_t arg_buffer_view_ref; for (int i = 0; i < model->num_input; ++i) { @@ -189,9 +190,9 @@ // The output vm list is allocated statically. iree_vm_list_t *outputs = NULL; if (iree_status_is_ok(result)) { - result = iree_vm_list_create( - /*element_type=*/NULL, - /*capacity=*/1, iree_allocator_system(), &outputs); + result = + iree_vm_list_create(iree_vm_make_undefined_type_def(), + /*capacity=*/1, iree_allocator_system(), &outputs); } // Invoke the function. @@ -207,8 +208,8 @@ iree_hal_buffer_view_t *ret_buffer_view = NULL; if (iree_status_is_ok(result)) { // Get the result buffers from the invocation. - ret_buffer_view = (iree_hal_buffer_view_t *)iree_vm_list_get_ref_deref( - outputs, index_output, &iree_hal_buffer_view_descriptor); + ret_buffer_view = + iree_vm_list_get_buffer_view_assign(outputs, index_output); if (ret_buffer_view == NULL) { result = iree_make_status(IREE_STATUS_NOT_FOUND, "can't find return buffer view");