Replacing use of dylib/vmvx(-sync) with local-task/local-sync drivers.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 253b883..ff038f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,27 +102,10 @@
option(IREE_HAL_DRIVER_LOCAL_TASK "Enables the 'local-task' runtime HAL driver" ${IREE_HAL_DRIVER_DEFAULTS})
option(IREE_HAL_DRIVER_VULKAN "Enables the 'vulkan' runtime HAL driver" ${IREE_HAL_DRIVER_VULKAN_DEFAULT})
-# TODO(#9336): remove legacy driver names.
-option(IREE_HAL_DRIVER_DYLIB "Enables the 'dylib' runtime HAL driver" ${IREE_HAL_DRIVER_DEFAULTS})
-option(IREE_HAL_DRIVER_DYLIB_SYNC "Enables the 'dylib-sync' runtime HAL driver" ${IREE_HAL_DRIVER_DEFAULTS})
-option(IREE_HAL_DRIVER_VMVX "Enables the 'vmvx' runtime HAL driver" ${IREE_HAL_DRIVER_DEFAULTS})
-option(IREE_HAL_DRIVER_VMVX_SYNC "Enables the 'vmvx-sync' runtime HAL driver" ${IREE_HAL_DRIVER_DEFAULTS})
-
-# TODO(#9336): remove legacy driver names.
-# Existing builds assume that dylib-sync doesn't use the system loader.
-set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT OFF)
-set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT OFF)
-set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT OFF)
-if(IREE_HAL_DRIVER_DYLIB)
- set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT ON)
- set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT ON)
-endif()
-if(IREE_HAL_DRIVER_DYLIB_SYNC)
- set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT ON)
-endif()
-if(IREE_HAL_DRIVER_VMVX OR IREE_HAL_DRIVER_VMVX_SYNC)
- set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT ON)
-endif()
+option(IREE_HAL_EXECUTABLE_LOADER_DEFAULTS "Sets the default value for all runtime HAL executable loaders" ON)
+set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT ${IREE_HAL_EXECUTABLE_LOADER_DEFAULTS})
+set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT ${IREE_HAL_EXECUTABLE_LOADER_DEFAULTS})
+set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT ${IREE_HAL_EXECUTABLE_LOADER_DEFAULTS})
# Emscripten builds don't support embedded ELF libraries.
if(EMSCRIPTEN)
@@ -135,6 +118,15 @@
set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT ON)
endif()
+# If no local driver is enabled then we force all the loaders off; this allows
+# for simpler checks that don't need to see if both the driver and loader is
+# available.
+if(NOT IREE_HAL_DRIVER_LOCAL_SYNC AND NOT IREE_HAL_DRIVER_LOCAL_TASK)
+ set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT OFF)
+ set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT OFF)
+ set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT OFF)
+endif()
+
option(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF "Enables the embedded dynamic library loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT})
option(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY "Enables the system dynamic library loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT})
option(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE "Enables the VMVX module loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE_DEFAULT})
@@ -149,18 +141,6 @@
if(IREE_HAL_DRIVER_LOCAL_TASK)
message(STATUS " - local-task")
endif()
-if(IREE_HAL_DRIVER_DYLIB)
- message(STATUS " - dylib")
-endif()
-if(IREE_HAL_DRIVER_DYLIB_SYNC)
- message(STATUS " - dylib-sync")
-endif()
-if(IREE_HAL_DRIVER_VMVX)
- message(STATUS " - vmvx")
-endif()
-if(IREE_HAL_DRIVER_VMVX_SYNC)
- message(STATUS " - vmvx-sync")
-endif()
if(IREE_HAL_DRIVER_VULKAN)
message(STATUS " - vulkan")
endif()
diff --git a/build_tools/bazel/iree_check_test.bzl b/build_tools/bazel/iree_check_test.bzl
index 115388d..0d23dbd 100644
--- a/build_tools/bazel/iree_check_test.bzl
+++ b/build_tools/bazel/iree_check_test.bzl
@@ -10,9 +10,9 @@
load("//build_tools/bazel:native_binary.bzl", "native_test")
ALL_TARGET_BACKENDS_AND_DRIVERS = [
- ("vmvx", "vmvx"),
+ ("vmvx", "local-task"),
("vulkan-spirv", "vulkan"),
- ("dylib-llvm-aot", "dylib"),
+ ("dylib-llvm-aot", "local-task"),
]
def iree_check_test(
diff --git a/build_tools/cmake/build_runtime_emscripten.sh b/build_tools/cmake/build_runtime_emscripten.sh
index 97761bf..8739b07 100755
--- a/build_tools/cmake/build_runtime_emscripten.sh
+++ b/build_tools/cmake/build_runtime_emscripten.sh
@@ -43,8 +43,10 @@
-DIREE_HOST_BINARY_ROOT=$PWD/../build-host/install \
-DIREE_BUILD_COMPILER=OFF \
-DIREE_HAL_DRIVER_DEFAULTS=OFF \
- -DIREE_HAL_DRIVER_VMVX=ON \
- -DIREE_HAL_DRIVER_VMVX_SYNC=ON \
+ -DIREE_HAL_DRIVER_LOCAL_SYNC=ON \
+ -DIREE_HAL_DRIVER_LOCAL_TASK=ON \
+ -DIREE_HAL_EXECUTABLE_LOADER_DEFAULTS=OFF \
+ -DIREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=ON \
-DIREE_ENABLE_CPUINFO=OFF \
-DIREE_BUILD_TESTS=ON \
-DIREE_BUILD_SAMPLES=ON
diff --git a/build_tools/cmake/iree_check_test.cmake b/build_tools/cmake/iree_check_test.cmake
index b778ea2..f1e5027 100644
--- a/build_tools/cmake/iree_check_test.cmake
+++ b/build_tools/cmake/iree_check_test.cmake
@@ -412,7 +412,7 @@
if(NOT DEFINED _RULE_TARGET_BACKENDS AND NOT DEFINED _RULE_DRIVERS)
set(_RULE_TARGET_BACKENDS "vmvx" "vulkan-spirv" "dylib-llvm-aot")
- set(_RULE_DRIVERS "vmvx" "vulkan" "dylib")
+ set(_RULE_DRIVERS "local-task" "vulkan" "local-task")
endif()
list(LENGTH _RULE_TARGET_BACKENDS _TARGET_BACKEND_COUNT)
diff --git a/build_tools/cmake/iree_trace_runner_test.cmake b/build_tools/cmake/iree_trace_runner_test.cmake
index e22122a..bc13eb7 100644
--- a/build_tools/cmake/iree_trace_runner_test.cmake
+++ b/build_tools/cmake/iree_trace_runner_test.cmake
@@ -308,7 +308,7 @@
if(NOT DEFINED _RULE_TARGET_BACKENDS AND NOT DEFINED _RULE_DRIVERS)
set(_RULE_TARGET_BACKENDS "vmvx" "vulkan-spirv" "dylib-llvm-aot")
- set(_RULE_DRIVERS "vmvx" "vulkan" "dylib")
+ set(_RULE_DRIVERS "local-task" "vulkan" "local-task")
endif()
list(LENGTH _RULE_TARGET_BACKENDS _TARGET_BACKEND_COUNT)
diff --git a/build_tools/cmake/riscv.toolchain.cmake b/build_tools/cmake/riscv.toolchain.cmake
index 4034c52..5b4d437 100644
--- a/build_tools/cmake/riscv.toolchain.cmake
+++ b/build_tools/cmake/riscv.toolchain.cmake
@@ -48,8 +48,10 @@
set(IREE_BUILD_BINDINGS_TFLITE OFF CACHE BOOL "" FORCE)
set(IREE_BUILD_BINDINGS_TFLITE_JAVA OFF CACHE BOOL "" FORCE)
set(IREE_HAL_DRIVER_DEFAULTS OFF CACHE BOOL "" FORCE)
- set(IREE_HAL_DRIVER_VMVX_SYNC ON CACHE BOOL "" FORCE)
- set(IREE_HAL_DRIVER_DYLIB_SYNC ON CACHE BOOL "" FORCE)
+ set(IREE_HAL_DRIVER_LOCAL_SYNC ON CACHE BOOL "" FORCE)
+ set(IREE_HAL_EXECUTABLE_LOADER_DEFAULTS OFF CACHE BOOL "" FORCE)
+ set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF ON CACHE BOOL "" FORCE)
+ set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE ON CACHE BOOL "" FORCE)
set(CMAKE_SYSTEM_LIBRARY_PATH "${RISCV_TOOLCHAIN_ROOT}/riscv32-unknown-elf/lib")
set(IREE_ENABLE_THREADING OFF CACHE BOOL "" FORCE)
set(RISCV_COMPILER_FLAGS "${RISCV_COMPILER_FLAGS} -march=rv32imf -mabi=ilp32 -DIREE_PLATFORM_GENERIC=1 -DIREE_SYNCHRONIZATION_DISABLE_UNSAFE=1 \
diff --git a/build_tools/kokoro/gcp_ubuntu/cmake/linux/riscv64/tests/lit.cfg.py b/build_tools/kokoro/gcp_ubuntu/cmake/linux/riscv64/tests/lit.cfg.py
index 1d13513..562ca6a 100644
--- a/build_tools/kokoro/gcp_ubuntu/cmake/linux/riscv64/tests/lit.cfg.py
+++ b/build_tools/kokoro/gcp_ubuntu/cmake/linux/riscv64/tests/lit.cfg.py
@@ -20,7 +20,7 @@
(os.getenv("QEMU_RV64_BIN"), os.getenv("RISCV_TOOLCHAIN_ROOT")))
config.environment["TEST_MODULE_CMD"] = (
- "%s %s/tools/iree-run-module --driver=dylib" %
+ "%s %s/tools/iree-run-module --driver=local-task" %
(config.environment["TEST_CMD"], os.getenv("BUILD_RISCV_DIR")))
config.test_exec_root = os.getenv("BUILD_RISCV_DIR") + \
diff --git a/compiler/src/iree/compiler/API/python/iree/compiler/tools/core.py b/compiler/src/iree/compiler/API/python/iree/compiler/tools/core.py
index 9737ea6..1a8554e 100644
--- a/compiler/src/iree/compiler/API/python/iree/compiler/tools/core.py
+++ b/compiler/src/iree/compiler/API/python/iree/compiler/tools/core.py
@@ -30,7 +30,7 @@
# TODO: Remove these. In the absence of default profiles, though, it is better
# to centralize.
DEFAULT_TESTING_BACKENDS = ["dylib-llvm-aot"]
-DEFAULT_TESTING_DRIVER = "dylib"
+DEFAULT_TESTING_DRIVER = "local-task"
class InputType(Enum):
diff --git a/compiler/src/iree/compiler/ConstEval/BUILD b/compiler/src/iree/compiler/ConstEval/BUILD
index 1c33d06..8e1e707 100644
--- a/compiler/src/iree/compiler/ConstEval/BUILD
+++ b/compiler/src/iree/compiler/ConstEval/BUILD
@@ -75,7 +75,7 @@
deps = [
"//compiler/src/iree/compiler/Dialect/VM/Target/Bytecode",
"//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/vmvx/registration",
+ "//runtime/src/iree/hal/drivers/local_task/registration",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/tools/utils:vm_util",
"//runtime/src/iree/vm",
diff --git a/compiler/src/iree/compiler/ConstEval/CMakeLists.txt b/compiler/src/iree/compiler/ConstEval/CMakeLists.txt
index f6c3fa8..22ab08f 100644
--- a/compiler/src/iree/compiler/ConstEval/CMakeLists.txt
+++ b/compiler/src/iree/compiler/ConstEval/CMakeLists.txt
@@ -65,7 +65,7 @@
MLIRIR
iree::compiler::Dialect::VM::Target::Bytecode
iree::hal
- iree::hal::drivers::vmvx::registration
+ iree::hal::drivers::local_task::registration
iree::modules::hal
iree::tools::utils::vm_util
iree::vm
diff --git a/compiler/src/iree/compiler/ConstEval/Runtime.cpp b/compiler/src/iree/compiler/ConstEval/Runtime.cpp
index 98947f2..6aa3867 100644
--- a/compiler/src/iree/compiler/ConstEval/Runtime.cpp
+++ b/compiler/src/iree/compiler/ConstEval/Runtime.cpp
@@ -8,7 +8,7 @@
#include "iree/compiler/Dialect/VM/Target/Bytecode/BytecodeModuleTarget.h"
#include "iree/hal/api.h"
-#include "iree/hal/drivers/vmvx/registration/driver_module.h"
+#include "iree/hal/drivers/local_task/registration/driver_module.h"
#include "iree/modules/hal/module.h"
#include "iree/vm/ref_cc.h"
#include "mlir/IR/BuiltinOps.h"
@@ -265,8 +265,8 @@
// Create driver and device.
iree_hal_driver_t* driver = nullptr;
IREE_CHECK_OK(iree_hal_driver_registry_try_create_by_name(
- runtime.registry, iree_make_cstring_view("vmvx"), iree_allocator_system(),
- &driver));
+ runtime.registry, iree_make_cstring_view("local-task"),
+ iree_allocator_system(), &driver));
IREE_CHECK_OK(iree_hal_driver_create_default_device(
driver, iree_allocator_system(), &device));
iree_hal_driver_release(driver);
@@ -305,7 +305,7 @@
Runtime::Runtime() {
IREE_CHECK_OK(
iree_hal_driver_registry_allocate(iree_allocator_system(), ®istry));
- IREE_CHECK_OK(iree_hal_vmvx_driver_module_register(registry));
+ IREE_CHECK_OK(iree_hal_local_task_driver_module_register(registry));
IREE_CHECK_OK(iree_hal_module_register_types());
IREE_CHECK_OK(iree_vm_instance_create(iree_allocator_system(), &instance));
}
diff --git a/docs/developers/best_practices.md b/docs/developers/best_practices.md
index 62a787c..a73f8ea 100644
--- a/docs/developers/best_practices.md
+++ b/docs/developers/best_practices.md
@@ -72,10 +72,11 @@
workers rather than rely on heuristic selection that defaults to one worker
per detected physical core.
-If running on a single thread or system with no threading support, the
-`dylib-sync` HAL driver can be used instead of the more generic `dylib` HAL
-driver. The synchronous driver performs execution inline rather than through
-IREE's task scheduling system.
+If running on a single thread or system with no threading support the
+`local-sync` HAL driver can be used instead of the multithreaded `local-task`
+HAL driver to reduce dependencies and code size. When running with the
+`local-sync` driver all execution happens inline on the thread invoking the
+IREE runtime and will block until it has completed.
### Do the minimum amount of work: cache queries and reuse buffers
diff --git a/docs/developers/developing_iree/benchmarking.md b/docs/developers/developing_iree/benchmarking.md
index 3912688..bdc590f 100644
--- a/docs/developers/developing_iree/benchmarking.md
+++ b/docs/developers/developing_iree/benchmarking.md
@@ -31,7 +31,7 @@
```shell
$ bazel run //tools:iree-benchmark-module -- \
--module_file=/tmp/module.fb \
- --driver=vmvx \
+ --driver=local-task \
--entry_function=abs \
--function_input=f32=-2
```
@@ -78,7 +78,7 @@
```shell
$ ./bazel-bin/tools/iree-benchmark-module \
--module_file=/tmp/module.fb \
- --driver=vmvx \
+ --driver=local-task \
--entry_function=abs \
--function_input=f32=-2
```
@@ -122,7 +122,7 @@
```shell
$ build/tools/iree-benchmark-module
--module_file=/tmp/fullyconnected.vmfb
- --driver=vmvx
+ --driver=local-task
```
If no `entry_function` is specified, `iree-benchmark-module` will register a
diff --git a/docs/developers/developing_iree/developer_overview.md b/docs/developers/developing_iree/developer_overview.md
index a879145..3eef331 100644
--- a/docs/developers/developing_iree/developer_overview.md
+++ b/docs/developers/developing_iree/developer_overview.md
@@ -140,7 +140,7 @@
```shell
$ ../iree-build/tools/iree-run-module \
--module_file=/tmp/simple_abs_vmvx.vmfb \
- --driver=vmvx \
+ --driver=local-task \
--entry_function=abs \
--function_input=f32=-2
```
@@ -165,7 +165,7 @@
```shell
$ ../iree-build/tools/iree-check-module \
/tmp/abs.vmfb \
- --driver=vmvx
+ --driver=local-task
```
### iree-run-mlir
diff --git a/docs/developers/developing_iree/e2e_benchmarking.md b/docs/developers/developing_iree/e2e_benchmarking.md
index ef00976..201c295 100644
--- a/docs/developers/developing_iree/e2e_benchmarking.md
+++ b/docs/developers/developing_iree/e2e_benchmarking.md
@@ -117,7 +117,7 @@
```shell
$ tools/iree-benchmark-module \
--module_file=/tmp/iree/modules/MatrixOpsStaticModule/iree_vmvx/compiled.vmfb \
- --driver=vmvx \
+ --driver=local-task \
--entry_function=matmul_lhs_batch \
--function_input=256x64x32xf32=2 \
--function_input=32x16xf32=3
@@ -221,7 +221,7 @@
```shell
$ adb shell /data/local/tmp/iree-benchmark-module \
--module_file="/data/local/tmp/MatrixOpsStaticModule/iree_vmvx/compiled.vmfb" \
- --driver=vmvx \
+ --driver=local-task \
--entry_function=matmul_lhs_batch \
--function_input=256x64x32xf32=2 \
--function_input=32x16xf32=3
diff --git a/docs/developers/developing_iree/profiling_cpu_events.md b/docs/developers/developing_iree/profiling_cpu_events.md
index 54e0358..84ca334 100644
--- a/docs/developers/developing_iree/profiling_cpu_events.md
+++ b/docs/developers/developing_iree/profiling_cpu_events.md
@@ -63,7 +63,7 @@
```shell
perf record -o /tmp/perf.data \
./tools/iree-benchmark-module \
- --driver=dylib \
+ --driver=local-task \
... command-line arguments of iree-benchmark-module as usual ...
```
@@ -73,7 +73,7 @@
```shell
perf record -o /tmp/perf.data -e L1-dcache-load-misses \
./tools/iree-benchmark-module \
- --driver=dylib \
+ --driver=local-task \
... command-line arguments of iree-benchmark-module as usual ...
```
@@ -150,7 +150,7 @@
adb shell \
simpleperf record -e raw-l1d-cache-refill -o /data/local/tmp/perf.data \
/data/local/tmp/iree-benchmark-module \
- --driver=dylib \
+ --driver=local-task \
... command-line arguments of iree-benchmark-module as usual ...
```
diff --git a/docs/developers/developing_iree/profiling_with_tracy.md b/docs/developers/developing_iree/profiling_with_tracy.md
index cff3897..b516fd3 100644
--- a/docs/developers/developing_iree/profiling_with_tracy.md
+++ b/docs/developers/developing_iree/profiling_with_tracy.md
@@ -107,8 +107,8 @@
## Running the profiled program
-Tracing doesn't work properly on VMs (see "Problematic Platforms / Virtual Machines"
-section 2.1.6.4 of the [manual](#the-tracy-manual)). To get sampling, you should
+Tracing doesn't work properly on VMs (see "Problematic Platforms / Virtual Machines"
+section 2.1.6.4 of the [manual](#the-tracy-manual)). To get sampling, you should
run the profiled program on bare metal.
Run your IREE workload as you normally would: now that it's been built with
@@ -126,7 +126,7 @@
```shell
TRACY_NO_EXIT=1 /data/local/tmp/iree-benchmark-module \
- --driver=dylib \
+ --driver=local-task \
--module_file=/data/local/tmp/android_module.fbvm \
--entry_function=serving_default \
--function_input=1x384xi32 \
diff --git a/docs/developers/developing_iree/testing_guide.md b/docs/developers/developing_iree/testing_guide.md
index 090966e..2c3464d 100644
--- a/docs/developers/developing_iree/testing_guide.md
+++ b/docs/developers/developing_iree/testing_guide.md
@@ -324,7 +324,7 @@
iree_check_test(
name = "check_vmvx_vmvx_floor.mlir",
src = "floor.mlir",
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
```
@@ -343,7 +343,7 @@
iree_check_single_backend_test_suite(
name = "check_vmvx_vmvx",
srcs = glob(["*.mlir"]),
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
```
@@ -363,7 +363,7 @@
srcs = ["success.mlir"],
# Leave this argument off to run on all supported backend/driver pairs.
target_backends_and_drivers = [
- ("vmvx", "vmvx"),
+ ("vmvx", "local-task"),
("vulkan-spirv", "vulkan"),
],
)
diff --git a/docs/website/docs/bindings/c-api.md b/docs/website/docs/bindings/c-api.md
index 61276a8..f1a5009 100644
--- a/docs/website/docs/bindings/c-api.md
+++ b/docs/website/docs/bindings/c-api.md
@@ -71,7 +71,7 @@
// with those for the specific HAL drivers your application uses.
// Functionality extensions can be used via custom modules.
#include "iree/modules/hal/module.h"
-#include "iree/hal/drivers/dylib/registration/driver_module.h"
+#include "iree/hal/drivers/local_task/registration/driver_module.h"
#include "iree/vm/bytecode_module.h"
```
@@ -90,7 +90,7 @@
// Device drivers are managed through registries.
// Applications may use multiple registries to more finely control driver
// lifetimes and visibility.
-IREE_CHECK_OK(iree_hal_dylib_driver_module_register(
+IREE_CHECK_OK(iree_hal_local_task_driver_module_register(
iree_hal_driver_registry_default()));
```
@@ -108,13 +108,13 @@
iree_vm_instance_t* instance = NULL;
IREE_CHECK_OK(iree_vm_instance_create(iree_allocator_system(), &instance));
-// We use the CPU "dylib" driver in this example, but could use a different
+// We use the CPU "local-task" driver in this example, but could use a different
// driver like the GPU "vulkan" driver. The driver(s) used should match with
// the target(s) specified during compilation.
iree_hal_driver_t* driver = NULL;
IREE_CHECK_OK(iree_hal_driver_registry_try_create_by_name(
iree_hal_driver_registry_default(),
- iree_string_view_literal("dylib"),
+ iree_string_view_literal("local-task"),
iree_allocator_system(), &driver));
// Drivers may support multiple devices, such as when a machine has multiple
diff --git a/docs/website/docs/building-from-source/android.md b/docs/website/docs/building-from-source/android.md
index 13054c6..cf09530 100644
--- a/docs/website/docs/building-from-source/android.md
+++ b/docs/website/docs/building-from-source/android.md
@@ -127,7 +127,7 @@
Run the tool:
``` shell
-adb shell /data/local/tmp/iree-run-module --driver=vmvx \
+adb shell /data/local/tmp/iree-run-module --driver=local-task \
--module_file=/data/local/tmp/simple_abs_vmvx.vmfb \
--entry_function=abs \
--function_input="f32=-5"
diff --git a/docs/website/docs/building-from-source/riscv.md b/docs/website/docs/building-from-source/riscv.md
index c351ff0..54a38ac 100644
--- a/docs/website/docs/building-from-source/riscv.md
+++ b/docs/website/docs/building-from-source/riscv.md
@@ -117,7 +117,7 @@
-cpu rv64 \
-L ${RISCV_TOOLCHAIN_ROOT}/sysroot/ \
../iree-build-riscv/tools/iree-run-module \
- --driver=vmvx \
+ --driver=local-task \
--module_file=/tmp/simple_abs_vmvx.vmfb \
--entry_function=abs \
--function_input=f32=-5
@@ -163,7 +163,7 @@
-cpu rv64,x-v=true,x-k=true,vlen=256,elen=64,vext_spec=v1.0 \
-L ${RISCV_TOOLCHAIN_ROOT}/sysroot/ \
../iree-build-riscv/tools/iree-run-module \
- --driver=dylib \
+ --driver=local-task \
--module_file=mobilenet-dylib.vmfb \
--entry_function=predict \
--function_input="1x224x224x3xf32=0"
diff --git a/docs/website/docs/deployment-configurations/bare-metal.md b/docs/website/docs/deployment-configurations/bare-metal.md
index 446bc1b..d1a3ecf 100644
--- a/docs/website/docs/deployment-configurations/bare-metal.md
+++ b/docs/website/docs/deployment-configurations/bare-metal.md
@@ -84,8 +84,8 @@
* `set(IREE_BINDINGS_TFLITE OFF)`: Disable the TFLite binding support
* `set(IREE_ENABLE_THREADING OFF)`: Disable multi-thread library support
* `set(IREE_HAL_DRIVER_DEFAULTS OFF)`: Disable HAL drivers by default, then
-enable the synchronous HAL drivers with `set(IREE_HAL_DRIVER_VMVX_SYNC ON)` and
-`set(IREE_HAL_DRIVER_DYLIB_SYNC ON)`
+enable the synchronous HAL drivers with `set(IREE_HAL_DRIVER_LOCAL_SYNC ON)`
+* `set(IREE_HAL_EXECUTABLE_LOADER_DEFAULTS OFF)`: Disable HAL executable loaders by default, then enable the CPU codegen and VMVX loaders with `set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF ON)` and `set(IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE ON)`
* `set(IREE_BUILD_TESTS OFF)`: Disable tests until IREE supports running them on
bare-metal platforms
* `set(IREE_BUILD_SAMPLES ON)`: Build
diff --git a/docs/website/docs/deployment-configurations/cpu-dylib.md b/docs/website/docs/deployment-configurations/cpu-dylib.md
index fd7b289..46f71c7 100644
--- a/docs/website/docs/deployment-configurations/cpu-dylib.md
+++ b/docs/website/docs/deployment-configurations/cpu-dylib.md
@@ -35,8 +35,9 @@
<!-- TODO(??): a way to verify dylib is compiled in and supported -->
-Ensure that the `IREE_HAL_DRIVER_DYLIB` CMake option is `ON` when configuring
-for the target.
+Ensure that the `IREE_HAL_DRIVER_LOCAL_TASK` and
+`IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF` CMake options are `ON` when
+configuring for the target.
### Get compiler for CPU native instructions
@@ -119,7 +120,7 @@
``` shell hl_lines="2"
tools/iree-run-module \
- --driver=dylib \
+ --driver=local-task \
--module_file=mobilenet-dylib.vmfb \
--entry_function=predict \
--function_input="1x224x224x3xf32=0"
diff --git a/docs/website/docs/getting-started/tflite.md b/docs/website/docs/getting-started/tflite.md
index 4e0647b..00c0a80 100644
--- a/docs/website/docs/getting-started/tflite.md
+++ b/docs/website/docs/getting-started/tflite.md
@@ -77,7 +77,7 @@
bytecodeModule = "/".join([workdir, "iree.vmfb"])
backends = ["dylib-llvm-aot"]
-config = "dylib"
+config = "local-task"
```
The TFLite sample model and input are downloaded locally.
@@ -108,7 +108,7 @@
IREE module.
```python
-config = iree_rt.Config("dylib")
+config = iree_rt.Config("local-task")
context = iree_rt.SystemContext(config=config)
with open(bytecodeModule, 'rb') as f:
vm_module = iree_rt.VmModule.from_flatbuffer(f.read())
diff --git a/experimental/web/run_native_benchmarks.sh b/experimental/web/run_native_benchmarks.sh
index 8b254f5..db212c2 100644
--- a/experimental/web/run_native_benchmarks.sh
+++ b/experimental/web/run_native_benchmarks.sh
@@ -34,7 +34,7 @@
echo "Benchmarking DeepLabV3..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./deeplabv3_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x257x257x3xf32 \
@@ -44,7 +44,7 @@
echo "Benchmarking MobileSSD..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./mobile_ssd_v2_float_coco_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x320x320x3xf32 \
@@ -54,7 +54,7 @@
echo "Benchmarking PoseNet..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./posenet_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x353x257x3xf32 \
@@ -64,7 +64,7 @@
echo "Benchmarking MobileBertSquad..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./mobilebertsquad_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x384xi32 \
@@ -76,7 +76,7 @@
echo "Benchmarking MobileNetV2..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./mobilenet_v2_1.0_224_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x224x224x3xf32 \
@@ -86,7 +86,7 @@
echo "Benchmarking MobileNetV3Small..."
"${IREE_BENCHMARK_MODULE_PATH?}" \
--module_file=./MobileNetV3SmallStaticBatch_native.vmfb \
- --driver=dylib \
+ --driver=local-task \
--task_topology_group_count=1 \
--entry_function=main \
--function_input=1x224x224x3xf32 \
diff --git a/experimental/web/testing/build_tests.sh b/experimental/web/testing/build_tests.sh
index 19aa9c6..25b4ab7 100644
--- a/experimental/web/testing/build_tests.sh
+++ b/experimental/web/testing/build_tests.sh
@@ -53,8 +53,10 @@
-DIREE_HOST_BINARY_ROOT=${INSTALL_ROOT} \
-DIREE_BUILD_COMPILER=OFF \
-DIREE_HAL_DRIVER_DEFAULTS=OFF \
- -DIREE_HAL_DRIVER_VMVX=ON \
- -DIREE_HAL_DRIVER_VMVX_SYNC=ON \
+ -DIREE_HAL_DRIVER_LOCAL_SYNC=ON \
+ -DIREE_HAL_DRIVER_LOCAL_TASK=ON \
+ -DIREE_HAL_EXECUTABLE_LOADER_DEFAULTS=OFF \
+ -DIREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=ON \
-DIREE_BUILD_SAMPLES=OFF \
-DIREE_ENABLE_CPUINFO=OFF \
-DIREE_BUILD_TESTS=ON
diff --git a/experimental/web/testing/parse_test_list.py b/experimental/web/testing/parse_test_list.py
index 2b3c2f0..b7eb9e9 100644
--- a/experimental/web/testing/parse_test_list.py
+++ b/experimental/web/testing/parse_test_list.py
@@ -74,7 +74,7 @@
# Parse the 'command' list into the source file and its arguments.
# /path/to/run_test.bat # TODO(scotttodd): replace with `node`?
# /path/to/test_runner.js # such as iree-check-module.js or test.js
- # arg 1 # such as --driver=vmvx
+ # arg 1 # such as --driver=local-task
# arg 2 # such as check_vmvx_op.mlir_module.vmfb
test_source_absolute_path = test["command"][1]
parsed_test["sourceFile"] = get_normalized_relative_path(
diff --git a/integrations/tensorflow/python_projects/iree_tf/iree/tf/support/module_utils.py b/integrations/tensorflow/python_projects/iree_tf/iree/tf/support/module_utils.py
index 1907c2a..e5e0595 100644
--- a/integrations/tensorflow/python_projects/iree_tf/iree/tf/support/module_utils.py
+++ b/integrations/tensorflow/python_projects/iree_tf/iree/tf/support/module_utils.py
@@ -895,7 +895,7 @@
},
"iree_vmvx": {
"compiled_module_class": IreeCompiledModule,
- "driver": "vmvx",
+ "driver": "local-task",
"compiler_targets": ["vmvx"]
},
"iree_vulkan": {
@@ -905,7 +905,7 @@
},
"iree_llvmaot": {
"compiled_module_class": IreeCompiledModule,
- "driver": "dylib",
+ "driver": "local-task",
"compiler_targets": ["dylib-llvm-aot"]
},
}
diff --git a/integrations/tensorflow/test/python/iree_tfl_tests/test_util.py b/integrations/tensorflow/test/python/iree_tfl_tests/test_util.py
index a767f34..af4d6fc 100644
--- a/integrations/tensorflow/test/python/iree_tfl_tests/test_util.py
+++ b/integrations/tensorflow/test/python/iree_tfl_tests/test_util.py
@@ -23,7 +23,7 @@
}
configs = {
- 'llvmaot': 'dylib',
+ 'llvmaot': 'local-task',
'vulkan': 'vulkan',
}
diff --git a/runtime/bindings/python/iree/runtime/system_api.py b/runtime/bindings/python/iree/runtime/system_api.py
index 0151549..363e94b 100644
--- a/runtime/bindings/python/iree/runtime/system_api.py
+++ b/runtime/bindings/python/iree/runtime/system_api.py
@@ -43,12 +43,12 @@
PREFERRED_DRIVER_ENV_KEY = "IREE_DEFAULT_DRIVER"
# Default value for IREE_DRIVER
-DEFAULT_IREE_DRIVER_VALUE = "dylib,vulkan,vmvx"
+DEFAULT_IREE_DRIVER_VALUE = "local-task,vulkan"
# Mapping from IREE target backends to their corresponding drivers.
TARGET_BACKEND_TO_DRIVER = {
- "dylib-llvm-aot": "dylib",
- "vmvx": "vmvx",
+ "dylib-llvm-aot": "local-task",
+ "vmvx": "local-task",
"vulkan-spirv": "vulkan",
}
diff --git a/runtime/bindings/python/tests/array_interop_test.py b/runtime/bindings/python/tests/array_interop_test.py
index 8f04e1d..7744401 100644
--- a/runtime/bindings/python/tests/array_interop_test.py
+++ b/runtime/bindings/python/tests/array_interop_test.py
@@ -16,7 +16,7 @@
def setUp(self):
super().setUp()
- self.driver = iree.runtime.HalDriver.create("vmvx")
+ self.driver = iree.runtime.HalDriver.create("local-task")
self.device = self.driver.create_default_device()
self.allocator = self.device.allocator
diff --git a/runtime/bindings/python/tests/function_test.py b/runtime/bindings/python/tests/function_test.py
index b412fdc..4fb6427 100644
--- a/runtime/bindings/python/tests/function_test.py
+++ b/runtime/bindings/python/tests/function_test.py
@@ -44,7 +44,7 @@
@classmethod
def setUpClass(cls):
# Doesn't matter what device. We just need one.
- config = rt.Config("vmvx")
+ config = rt.Config("local-task")
cls.device = config.device
def testNoReflectionScalars(self):
diff --git a/runtime/bindings/python/tests/hal_test.py b/runtime/bindings/python/tests/hal_test.py
index f9f27e9..aa8464f 100644
--- a/runtime/bindings/python/tests/hal_test.py
+++ b/runtime/bindings/python/tests/hal_test.py
@@ -59,7 +59,7 @@
def setUp(self):
super().setUp()
- self.driver = iree.runtime.HalDriver.create("vmvx")
+ self.driver = iree.runtime.HalDriver.create("local-task")
self.device = self.driver.create_default_device()
self.allocator = self.device.allocator
diff --git a/runtime/bindings/python/tests/system_api_test.py b/runtime/bindings/python/tests/system_api_test.py
index 6e770c5..081e739 100644
--- a/runtime/bindings/python/tests/system_api_test.py
+++ b/runtime/bindings/python/tests/system_api_test.py
@@ -42,7 +42,7 @@
config = iree.runtime.Config("nothere1,nothere2")
def test_subsequent_driver(self):
- config = iree.runtime.Config("nothere1,dylib")
+ config = iree.runtime.Config("nothere1,local-task")
def test_empty_dynamic(self):
ctx = iree.runtime.SystemContext()
@@ -101,7 +101,7 @@
def test_tracing_explicit(self):
with tempfile.TemporaryDirectory() as temp_dir:
tracer = iree.runtime.Tracer(temp_dir)
- config = iree.runtime.Config("dylib", tracer=tracer)
+ config = iree.runtime.Config("local-task", tracer=tracer)
self.verify_tracing(config, temp_dir)
def test_tracing_from_environment(self):
@@ -109,7 +109,7 @@
try:
with tempfile.TemporaryDirectory() as temp_dir:
os.environ[iree.runtime.TRACE_PATH_ENV_KEY] = temp_dir
- config = iree.runtime.Config("dylib")
+ config = iree.runtime.Config("local-task")
self.verify_tracing(config, temp_dir)
finally:
if original:
diff --git a/runtime/bindings/tflite/interpreter.c b/runtime/bindings/tflite/interpreter.c
index 497cd5a..b98c2b4 100644
--- a/runtime/bindings/tflite/interpreter.c
+++ b/runtime/bindings/tflite/interpreter.c
@@ -44,7 +44,7 @@
// just say "whatever is first" on a query.
// iree_string_view_t driver_name = driver_infos[0].driver_name;
// NOTE: currently the sample file is compiled only with vmvx.
- iree_string_view_t driver_name = iree_make_cstring_view("vmvx");
+ iree_string_view_t driver_name = iree_make_cstring_view("local-task");
// TODO(benvanik): switch to iree_hal_driver_registry_try_create when
// implemented.
diff --git a/runtime/bindings/tflite/java/build.gradle b/runtime/bindings/tflite/java/build.gradle
index e38d78b..8efd9db 100644
--- a/runtime/bindings/tflite/java/build.gradle
+++ b/runtime/bindings/tflite/java/build.gradle
@@ -32,7 +32,9 @@
arguments "-DIREE_BUILD_BINDINGS_TFLITE=ON",
"-DIREE_BUILD_BINDINGS_TFLITE_JAVA=ON",
"-DIREE_HAL_DRIVER_DEFAULTS=OFF",
- "-DIREE_HAL_DRIVER_VMVX=ON",
+ "-DIREE_HAL_DRIVER_LOCAL_TASK=ON",
+ "-DIREE_HAL_EXECUTABLE_LOADER_DEFAULTS=OFF",
+ "-DIREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=ON",
// Disable all but the runtime components needed for the
// java bindings.
@@ -81,7 +83,9 @@
"-G" , "Ninja",
"-B", hostBuildDir ,
"-DIREE_HAL_DRIVER_DEFAULTS=OFF",
- "-DIREE_HAL_DRIVER_VMVX=ON",
+ "-DIREE_HAL_DRIVER_LOCAL_TASK=ON",
+ "-DIREE_HAL_EXECUTABLE_LOADER_DEFAULTS=OFF",
+ "-DIREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=ON",
"-DIREE_BUILD_COMPILER=OFF",
"-DIREE_BUILD_TESTS=OFF ",
"-DIREE_BUILD_SAMPLES=OFF",
diff --git a/runtime/src/iree/hal/drivers/BUILD b/runtime/src/iree/hal/drivers/BUILD
index 2766329..50bbea7 100644
--- a/runtime/src/iree/hal/drivers/BUILD
+++ b/runtime/src/iree/hal/drivers/BUILD
@@ -17,11 +17,6 @@
"cuda",
"local-sync",
"local-task",
- # TODO(#9336): remove legacy dylib/vmvx drivers.
- "dylib",
- "dylib-sync",
- "vmvx",
- "vmvx-sync",
"vulkan",
]
@@ -30,10 +25,6 @@
build_setting_default = [
"local-sync",
"local-task",
- "dylib",
- "dylib-sync",
- "vmvx",
- "vmvx-sync",
"vulkan",
],
)
@@ -67,23 +58,6 @@
":local-task_enabled": ["//runtime/src/iree/hal/drivers/local_task/registration"],
"//conditions:default": [],
}) +
- # TODO(#9336): remove legacy dylib/vmvx drivers.
- select({
- ":dylib_enabled": ["//runtime/src/iree/hal/drivers/dylib/registration"],
- "//conditions:default": [],
- }) +
- select({
- ":dylib-sync_enabled": ["//runtime/src/iree/hal/drivers/dylib_sync/registration"],
- "//conditions:default": [],
- }) +
- select({
- ":vmvx_enabled": ["//runtime/src/iree/hal/drivers/vmvx/registration"],
- "//conditions:default": [],
- }) +
- select({
- ":vmvx-sync_enabled": ["//runtime/src/iree/hal/drivers/vmvx_sync/registration"],
- "//conditions:default": [],
- }) +
select({
":vulkan_enabled": ["//runtime/src/iree/hal/drivers/vulkan/registration"],
"//conditions:default": [],
diff --git a/runtime/src/iree/hal/drivers/CMakeLists.txt b/runtime/src/iree/hal/drivers/CMakeLists.txt
index d2e1c8c..b1d7275 100644
--- a/runtime/src/iree/hal/drivers/CMakeLists.txt
+++ b/runtime/src/iree/hal/drivers/CMakeLists.txt
@@ -9,20 +9,12 @@
add_subdirectory(cuda)
list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::cuda::registration)
endif()
-# TODO(#9336): remove legacy dylib/vmvx drivers.
-if(IREE_HAL_DRIVER_LOCAL_SYNC OR IREE_HAL_DRIVER_DYLIB_SYNC OR IREE_HAL_DRIVER_VMVX_SYNC)
- add_subdirectory(local_sync)
-endif()
if(IREE_HAL_DRIVER_LOCAL_SYNC)
- # add_subdirectory(local_sync)
+ add_subdirectory(local_sync)
list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::local_sync::registration)
endif()
-# TODO(#9336): remove legacy dylib/vmvx drivers.
-if(IREE_HAL_DRIVER_LOCAL_TASK OR IREE_HAL_DRIVER_DYLIB OR IREE_HAL_DRIVER_VMVX)
- add_subdirectory(local_task)
-endif()
if(IREE_HAL_DRIVER_LOCAL_TASK)
- # add_subdirectory(local_task)
+ add_subdirectory(local_task)
list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::local_task::registration)
endif()
if(IREE_HAL_DRIVER_VULKAN)
@@ -33,24 +25,6 @@
list(APPEND IREE_HAL_DRIVER_MODULES experimental::rocm::registration)
endif()
-# TODO(#9336): remove legacy dylib/vmvx drivers.
-if(IREE_HAL_DRIVER_DYLIB)
- add_subdirectory(dylib)
- list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::dylib::registration)
-endif()
-if(IREE_HAL_DRIVER_DYLIB_SYNC)
- add_subdirectory(dylib_sync)
- list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::dylib_sync::registration)
-endif()
-if(IREE_HAL_DRIVER_VMVX)
- add_subdirectory(vmvx)
- list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::vmvx::registration)
-endif()
-if(IREE_HAL_DRIVER_VMVX_SYNC)
- add_subdirectory(vmvx_sync)
- list(APPEND IREE_HAL_DRIVER_MODULES iree::hal::drivers::vmvx_sync::registration)
-endif()
-
iree_cc_library(
NAME
drivers
diff --git a/runtime/src/iree/hal/drivers/dylib/BUILD b/runtime/src/iree/hal/drivers/dylib/BUILD
deleted file mode 100644
index 236a474..0000000
--- a/runtime/src/iree/hal/drivers/dylib/BUILD
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2020 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
diff --git a/runtime/src/iree/hal/drivers/dylib/CMakeLists.txt b/runtime/src/iree/hal/drivers/dylib/CMakeLists.txt
deleted file mode 100644
index 4f3b02c..0000000
--- a/runtime/src/iree/hal/drivers/dylib/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/dylib/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/BUILD b/runtime/src/iree/hal/drivers/dylib/registration/BUILD
deleted file mode 100644
index 9957c78..0000000
--- a/runtime/src/iree/hal/drivers/dylib/registration/BUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2020 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_runtime_cc_library")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_runtime_cc_library(
- name = "registration",
- srcs = ["driver_module.c"],
- hdrs = ["driver_module.h"],
- defines = [
- "IREE_HAVE_HAL_DYLIB_DRIVER_MODULE=1",
- ],
- deps = [
- "//runtime/src/iree/base",
- "//runtime/src/iree/base/internal:flags",
- "//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/local_task:task_driver",
- "//runtime/src/iree/hal/local",
- "//runtime/src/iree/hal/local/loaders:embedded_elf_loader",
- "//runtime/src/iree/hal/local/loaders:system_library_loader",
- "//runtime/src/iree/task:api",
- ],
-)
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/CMakeLists.txt b/runtime/src/iree/hal/drivers/dylib/registration/CMakeLists.txt
deleted file mode 100644
index 1a8392b..0000000
--- a/runtime/src/iree/hal/drivers/dylib/registration/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/dylib/registration/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-iree_cc_library(
- NAME
- registration
- HDRS
- "driver_module.h"
- SRCS
- "driver_module.c"
- DEPS
- iree::base
- iree::base::internal::flags
- iree::hal
- iree::hal::drivers::local_task::task_driver
- iree::hal::local
- iree::hal::local::loaders::embedded_elf_loader
- iree::hal::local::loaders::system_library_loader
- iree::task::api
- DEFINES
- "IREE_HAVE_HAL_DYLIB_DRIVER_MODULE=1"
- PUBLIC
-)
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c b/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c
deleted file mode 100644
index de16581..0000000
--- a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2020 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#include "iree/hal/drivers/dylib/registration/driver_module.h"
-
-#include <inttypes.h>
-#include <stddef.h>
-
-#include "iree/base/api.h"
-#include "iree/base/internal/flags.h"
-#include "iree/hal/drivers/local_task/task_device.h"
-#include "iree/hal/drivers/local_task/task_driver.h"
-#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/embedded_elf_loader.h"
-#include "iree/hal/local/loaders/system_library_loader.h"
-#include "iree/task/api.h"
-
-// TODO(#4298): remove this driver registration and wrapper.
-// By having a single iree/hal/local/registration that then has the loaders
-// added to it based on compilation settings we can have a single set of flags
-// for everything. We can also have API helper methods that register the driver
-// using an existing executor so that we can entirely externalize the task
-// system configuration from the HAL.
-
-#define IREE_HAL_DYLIB_DRIVER_ID 0x58444C4Cu // XDLL
-
-static iree_status_t iree_hal_dylib_driver_factory_enumerate(
- void* self, const iree_hal_driver_info_t** out_driver_infos,
- iree_host_size_t* out_driver_info_count) {
- static const iree_hal_driver_info_t driver_infos[1] = {
- {
- .driver_id = IREE_HAL_DYLIB_DRIVER_ID,
- .driver_name = iree_string_view_literal("dylib"),
- .full_name =
- iree_string_view_literal("AOT compiled dynamic libraries"),
- },
- };
- *out_driver_info_count = IREE_ARRAYSIZE(driver_infos);
- *out_driver_infos = driver_infos;
- return iree_ok_status();
-}
-
-static iree_status_t iree_hal_dylib_driver_factory_try_create(
- void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
- iree_hal_driver_t** out_driver) {
- if (driver_id != IREE_HAL_DYLIB_DRIVER_ID) {
- return iree_make_status(IREE_STATUS_UNAVAILABLE,
- "no driver with ID %016" PRIu64
- " is provided by this factory",
- driver_id);
- }
-
- iree_hal_task_device_params_t default_params;
- iree_hal_task_device_params_initialize(&default_params);
-
- iree_status_t status = iree_ok_status();
-
- iree_hal_executable_loader_t* loaders[2] = {NULL, NULL};
- iree_host_size_t loader_count = 0;
- if (iree_status_is_ok(status)) {
- status = iree_hal_embedded_elf_loader_create(
- iree_hal_executable_import_provider_null(), host_allocator,
- &loaders[loader_count++]);
- }
- if (iree_status_is_ok(status)) {
- status = iree_hal_system_library_loader_create(
- iree_hal_executable_import_provider_null(), host_allocator,
- &loaders[loader_count++]);
- }
-
- iree_task_executor_t* executor = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_task_executor_create_from_flags(host_allocator, &executor);
- }
-
- iree_hal_allocator_t* device_allocator = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_hal_allocator_create_heap(iree_make_cstring_view("cpu"),
- host_allocator, host_allocator,
- &device_allocator);
- }
-
- if (iree_status_is_ok(status)) {
- status = iree_hal_task_driver_create(
- iree_make_cstring_view("cpu"), &default_params, executor, loader_count,
- loaders, device_allocator, host_allocator, out_driver);
- }
-
- iree_hal_allocator_release(device_allocator);
- iree_task_executor_release(executor);
- for (iree_host_size_t i = 0; i < loader_count; ++i) {
- iree_hal_executable_loader_release(loaders[i]);
- }
- return status;
-}
-
-IREE_API_EXPORT iree_status_t
-iree_hal_dylib_driver_module_register(iree_hal_driver_registry_t* registry) {
- static const iree_hal_driver_factory_t factory = {
- .self = NULL,
- .enumerate = iree_hal_dylib_driver_factory_enumerate,
- .try_create = iree_hal_dylib_driver_factory_try_create,
- };
- return iree_hal_driver_registry_register_factory(registry, &factory);
-}
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.h b/runtime/src/iree/hal/drivers/dylib/registration/driver_module.h
deleted file mode 100644
index 782e02e..0000000
--- a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2020 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#ifndef IREE_HAL_DRIVERS_DYLIB_REGISTRATION_DRIVER_MODULE_H_
-#define IREE_HAL_DRIVERS_DYLIB_REGISTRATION_DRIVER_MODULE_H_
-
-#include "iree/base/api.h"
-#include "iree/hal/api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-// DEPRECATED: this entire driver will be removed soon.
-// TODO(#3580): remove this entire driver w/ iree_hal_executable_library_t.
-IREE_API_EXPORT iree_status_t
-iree_hal_dylib_driver_module_register(iree_hal_driver_registry_t* registry);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // IREE_HAL_DRIVERS_DYLIB_REGISTRATION_DRIVER_MODULE_H_
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/BUILD b/runtime/src/iree/hal/drivers/dylib_sync/BUILD
deleted file mode 100644
index 236a474..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/BUILD
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2020 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/CMakeLists.txt b/runtime/src/iree/hal/drivers/dylib_sync/CMakeLists.txt
deleted file mode 100644
index 1a54c3a..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/dylib_sync/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD b/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD
deleted file mode 100644
index 1e36d37..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2020 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_runtime_cc_library")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_runtime_cc_library(
- name = "registration",
- srcs = ["driver_module.c"],
- hdrs = ["driver_module.h"],
- defines = [
- "IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE=1",
- ],
- deps = [
- "//runtime/src/iree/base",
- "//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/local_sync:sync_driver",
- "//runtime/src/iree/hal/local",
- "//runtime/src/iree/hal/local/loaders:embedded_elf_loader",
- ],
-)
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/registration/CMakeLists.txt b/runtime/src/iree/hal/drivers/dylib_sync/registration/CMakeLists.txt
deleted file mode 100644
index 5bbe83c..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-iree_cc_library(
- NAME
- registration
- HDRS
- "driver_module.h"
- SRCS
- "driver_module.c"
- DEPS
- iree::base
- iree::hal
- iree::hal::drivers::local_sync::sync_driver
- iree::hal::local
- iree::hal::local::loaders::embedded_elf_loader
- DEFINES
- "IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE=1"
- PUBLIC
-)
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.c b/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.c
deleted file mode 100644
index c444a83..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.c
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2020 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#include "iree/hal/drivers/dylib_sync/registration/driver_module.h"
-
-#include <inttypes.h>
-#include <stddef.h>
-
-#include "iree/base/api.h"
-#include "iree/hal/drivers/local_sync/sync_device.h"
-#include "iree/hal/drivers/local_sync/sync_driver.h"
-#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/embedded_elf_loader.h"
-
-// TODO(#4298): remove this driver registration and wrapper.
-// By having a single iree/hal/local/registration that then has the loaders
-// added to it based on compilation settings we can have a single set of flags
-// for everything.
-
-#define IREE_HAL_DYLIB_SYNC_DRIVER_ID 0x53444C4Cu // SDLL
-
-static iree_status_t iree_hal_dylib_sync_driver_factory_enumerate(
- void* self, const iree_hal_driver_info_t** out_driver_infos,
- iree_host_size_t* out_driver_info_count) {
- static const iree_hal_driver_info_t default_driver_info = {
- .driver_id = IREE_HAL_DYLIB_SYNC_DRIVER_ID,
- .driver_name = iree_string_view_literal("dylib-sync"),
- .full_name = iree_string_view_literal(
- "synchronous AOT compiled dynamic embedded libraries"),
- };
- *out_driver_info_count = 1;
- *out_driver_infos = &default_driver_info;
- return iree_ok_status();
-}
-
-static iree_status_t iree_hal_dylib_sync_driver_factory_try_create(
- void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
- iree_hal_driver_t** out_driver) {
- if (driver_id != IREE_HAL_DYLIB_SYNC_DRIVER_ID) {
- return iree_make_status(IREE_STATUS_UNAVAILABLE,
- "no driver with ID %016" PRIu64
- " is provided by this factory",
- driver_id);
- }
-
- iree_hal_sync_device_params_t default_params;
- iree_hal_sync_device_params_initialize(&default_params);
-
- iree_status_t status = iree_ok_status();
- iree_hal_executable_loader_t* loaders[1] = {NULL};
- if (iree_status_is_ok(status)) {
- status = iree_hal_embedded_elf_loader_create(
- iree_hal_executable_import_provider_null(), host_allocator,
- &loaders[0]);
- }
-
- iree_hal_allocator_t* device_allocator = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_hal_allocator_create_heap(iree_make_cstring_view("cpu"),
- host_allocator, host_allocator,
- &device_allocator);
- }
-
- if (iree_status_is_ok(status)) {
- status = iree_hal_sync_driver_create(
- iree_make_cstring_view("cpu"), &default_params, IREE_ARRAYSIZE(loaders),
- loaders, device_allocator, host_allocator, out_driver);
- }
-
- iree_hal_allocator_release(device_allocator);
- iree_hal_executable_loader_release(loaders[0]);
- return status;
-}
-
-IREE_API_EXPORT iree_status_t iree_hal_dylib_sync_driver_module_register(
- iree_hal_driver_registry_t* registry) {
- static const iree_hal_driver_factory_t factory = {
- .self = NULL,
- .enumerate = iree_hal_dylib_sync_driver_factory_enumerate,
- .try_create = iree_hal_dylib_sync_driver_factory_try_create,
- };
- return iree_hal_driver_registry_register_factory(registry, &factory);
-}
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.h b/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.h
deleted file mode 100644
index 08bd04e..0000000
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2021 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#ifndef IREE_HAL_DRIVER_DYLIB_SYNC_REGISTRATION_DRIVER_MODULE_H_
-#define IREE_HAL_DRIVER_DYLIB_SYNC_REGISTRATION_DRIVER_MODULE_H_
-
-#include "iree/base/api.h"
-#include "iree/hal/api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-// DEPRECATED: this entire driver will be removed soon.
-// TODO(#3580): remove this entire driver w/ iree_hal_executable_library_t.
-IREE_API_EXPORT iree_status_t iree_hal_dylib_sync_driver_module_register(
- iree_hal_driver_registry_t* registry);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // IREE_HAL_DRIVER_DYLIB_SYNC_REGISTRATION_DRIVER_MODULE_H_
diff --git a/runtime/src/iree/hal/drivers/init.c b/runtime/src/iree/hal/drivers/init.c
index bcaf732..56c30fe 100644
--- a/runtime/src/iree/hal/drivers/init.c
+++ b/runtime/src/iree/hal/drivers/init.c
@@ -28,20 +28,6 @@
#include "experimental/rocm/registration/driver_module.h"
#endif // IREE_HAVE_HAL_EXPERIMENTAL_ROCM_DRIVER_MODULE
-// TODO(#9336): remove legacy dylib/vmvx drivers.
-#if defined(IREE_HAVE_HAL_DYLIB_DRIVER_MODULE)
-#include "iree/hal/drivers/dylib/registration/driver_module.h"
-#endif // IREE_HAVE_HAL_DYLIB_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE)
-#include "iree/hal/drivers/dylib_sync/registration/driver_module.h"
-#endif // IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_VMVX_DRIVER_MODULE)
-#include "iree/hal/drivers/vmvx/registration/driver_module.h"
-#endif // IREE_HAVE_HAL_VMVX_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE)
-#include "iree/hal/drivers/vmvx_sync/registration/driver_module.h"
-#endif // IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE
-
IREE_API_EXPORT iree_status_t
iree_hal_register_all_available_drivers(iree_hal_driver_registry_t* registry) {
IREE_TRACE_ZONE_BEGIN(z0);
@@ -71,24 +57,6 @@
z0, iree_hal_rocm_driver_module_register(registry));
#endif // IREE_HAVE_HAL_EXPERIMENTAL_ROCM_DRIVER_MODULE
-// TODO(#9336): remove legacy dylib/vmvx drivers.
-#if defined(IREE_HAVE_HAL_DYLIB_DRIVER_MODULE)
- IREE_RETURN_AND_END_ZONE_IF_ERROR(
- z0, iree_hal_dylib_driver_module_register(registry));
-#endif // IREE_HAVE_HAL_DYLIB_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE)
- IREE_RETURN_AND_END_ZONE_IF_ERROR(
- z0, iree_hal_dylib_sync_driver_module_register(registry));
-#endif // IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_VMVX_DRIVER_MODULE)
- IREE_RETURN_AND_END_ZONE_IF_ERROR(
- z0, iree_hal_vmvx_driver_module_register(registry));
-#endif // IREE_HAVE_HAL_VMVX_DRIVER_MODULE
-#if defined(IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE)
- IREE_RETURN_AND_END_ZONE_IF_ERROR(
- z0, iree_hal_vmvx_sync_driver_module_register(registry));
-#endif // IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE
-
IREE_TRACE_ZONE_END(z0);
return iree_ok_status();
}
diff --git a/runtime/src/iree/hal/drivers/vmvx/BUILD b/runtime/src/iree/hal/drivers/vmvx/BUILD
deleted file mode 100644
index 0820c01..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2021 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-# A VMVX (VM-based Vector eXtensions) runtime HAL backend.
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
diff --git a/runtime/src/iree/hal/drivers/vmvx/CMakeLists.txt b/runtime/src/iree/hal/drivers/vmvx/CMakeLists.txt
deleted file mode 100644
index 5afd954..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/vmvx/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/vmvx/registration/BUILD b/runtime/src/iree/hal/drivers/vmvx/registration/BUILD
deleted file mode 100644
index faac7da..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/registration/BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2021 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_runtime_cc_library")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_runtime_cc_library(
- name = "registration",
- srcs = ["driver_module.c"],
- hdrs = ["driver_module.h"],
- defines = [
- "IREE_HAVE_HAL_VMVX_DRIVER_MODULE=1",
- ],
- deps = [
- "//runtime/src/iree/base",
- "//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/local_task:task_driver",
- "//runtime/src/iree/hal/local",
- "//runtime/src/iree/hal/local/loaders:vmvx_module_loader",
- "//runtime/src/iree/task:api",
- "//runtime/src/iree/vm",
- ],
-)
diff --git a/runtime/src/iree/hal/drivers/vmvx/registration/CMakeLists.txt b/runtime/src/iree/hal/drivers/vmvx/registration/CMakeLists.txt
deleted file mode 100644
index 41f321c..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/registration/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/vmvx/registration/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-iree_cc_library(
- NAME
- registration
- HDRS
- "driver_module.h"
- SRCS
- "driver_module.c"
- DEPS
- iree::base
- iree::hal
- iree::hal::drivers::local_task::task_driver
- iree::hal::local
- iree::hal::local::loaders::vmvx_module_loader
- iree::task::api
- iree::vm
- DEFINES
- "IREE_HAVE_HAL_VMVX_DRIVER_MODULE=1"
- PUBLIC
-)
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.c b/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.c
deleted file mode 100644
index 973414f..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.c
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2021 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#include "iree/hal/drivers/vmvx/registration/driver_module.h"
-
-#include <inttypes.h>
-#include <stddef.h>
-
-#include "iree/base/api.h"
-#include "iree/hal/drivers/local_task/task_device.h"
-#include "iree/hal/drivers/local_task/task_driver.h"
-#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/vmvx_module_loader.h"
-#include "iree/task/api.h"
-#include "iree/vm/api.h"
-
-// TODO(#4298): remove this driver registration and wrapper.
-
-// TODO(benvanik): replace with C flags.
-#define IREE_HAL_VMVX_WORKER_COUNT 0
-#define IREE_HAL_MAX_VMVX_WORKER_COUNT 16
-
-#define IREE_HAL_VMVX_DRIVER_ID 0x564D5658u // VMVX
-
-static iree_status_t iree_hal_vmvx_driver_factory_enumerate(
- void* self, const iree_hal_driver_info_t** out_driver_infos,
- iree_host_size_t* out_driver_info_count) {
- static const iree_hal_driver_info_t driver_infos[1] = {
- {
- .driver_id = IREE_HAL_VMVX_DRIVER_ID,
- .driver_name = iree_string_view_literal("vmvx"),
- .full_name = iree_string_view_literal("VM-based reference backend"),
- },
- };
- *out_driver_info_count = IREE_ARRAYSIZE(driver_infos);
- *out_driver_infos = driver_infos;
- return iree_ok_status();
-}
-
-static iree_status_t iree_hal_vmvx_driver_factory_try_create(
- void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
- iree_hal_driver_t** out_driver) {
- if (driver_id != IREE_HAL_VMVX_DRIVER_ID) {
- return iree_make_status(IREE_STATUS_UNAVAILABLE,
- "no driver with ID %016" PRIu64
- " is provided by this factory",
- driver_id);
- }
-
- iree_vm_instance_t* instance = NULL;
- IREE_RETURN_IF_ERROR(iree_vm_instance_create(host_allocator, &instance));
-
- iree_hal_task_device_params_t default_params;
- iree_hal_task_device_params_initialize(&default_params);
-
- iree_hal_executable_loader_t* vmvx_loader = NULL;
- iree_status_t status = iree_hal_vmvx_module_loader_create(
- instance, host_allocator, &vmvx_loader);
- iree_hal_executable_loader_t* loaders[1] = {vmvx_loader};
-
- iree_task_executor_t* executor = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_task_executor_create_from_flags(host_allocator, &executor);
- }
-
- iree_hal_allocator_t* device_allocator = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_hal_allocator_create_heap(iree_make_cstring_view("vmvx"),
- host_allocator, host_allocator,
- &device_allocator);
- }
-
- if (iree_status_is_ok(status)) {
- status = iree_hal_task_driver_create(
- iree_make_cstring_view("vmvx"), &default_params, executor,
- IREE_ARRAYSIZE(loaders), loaders, device_allocator, host_allocator,
- out_driver);
- }
-
- iree_hal_allocator_release(device_allocator);
- iree_task_executor_release(executor);
- iree_hal_executable_loader_release(vmvx_loader);
- iree_vm_instance_release(instance);
- return status;
-}
-
-IREE_API_EXPORT iree_status_t
-iree_hal_vmvx_driver_module_register(iree_hal_driver_registry_t* registry) {
- static const iree_hal_driver_factory_t factory = {
- .self = NULL,
- .enumerate = iree_hal_vmvx_driver_factory_enumerate,
- .try_create = iree_hal_vmvx_driver_factory_try_create,
- };
- return iree_hal_driver_registry_register_factory(registry, &factory);
-}
diff --git a/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.h b/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.h
deleted file mode 100644
index bfde2a7..0000000
--- a/runtime/src/iree/hal/drivers/vmvx/registration/driver_module.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2021 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#ifndef IREE_HAL_DRIVERS_VMVX_REGISTRATION_DRIVER_MODULE_H_
-#define IREE_HAL_DRIVERS_VMVX_REGISTRATION_DRIVER_MODULE_H_
-
-#include "iree/base/api.h"
-#include "iree/hal/api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-IREE_API_EXPORT iree_status_t
-iree_hal_vmvx_driver_module_register(iree_hal_driver_registry_t* registry);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // IREE_HAL_DRIVERS_VMVX_REGISTRATION_DRIVER_MODULE_H_
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/BUILD b/runtime/src/iree/hal/drivers/vmvx_sync/BUILD
deleted file mode 100644
index 0820c01..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2021 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-# A VMVX (VM-based Vector eXtensions) runtime HAL backend.
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/CMakeLists.txt b/runtime/src/iree/hal/drivers/vmvx_sync/CMakeLists.txt
deleted file mode 100644
index d87ffa1..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/vmvx_sync/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/registration/BUILD b/runtime/src/iree/hal/drivers/vmvx_sync/registration/BUILD
deleted file mode 100644
index 14ef16f..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/registration/BUILD
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2021 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_runtime_cc_library")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_runtime_cc_library(
- name = "registration",
- srcs = ["driver_module.c"],
- hdrs = ["driver_module.h"],
- defines = [
- "IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE=1",
- ],
- deps = [
- "//runtime/src/iree/base",
- "//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/local_sync:sync_driver",
- "//runtime/src/iree/hal/local",
- "//runtime/src/iree/hal/local/loaders:vmvx_module_loader",
- "//runtime/src/iree/vm",
- ],
-)
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/registration/CMakeLists.txt b/runtime/src/iree/hal/drivers/vmvx_sync/registration/CMakeLists.txt
deleted file mode 100644
index 285c15f..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/registration/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
-# runtime/src/iree/hal/drivers/vmvx_sync/registration/BUILD #
-# #
-# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary #
-# CMake-only content. #
-# #
-# To disable autogeneration for this file entirely, delete this header. #
-################################################################################
-
-iree_add_all_subdirs()
-
-iree_cc_library(
- NAME
- registration
- HDRS
- "driver_module.h"
- SRCS
- "driver_module.c"
- DEPS
- iree::base
- iree::hal
- iree::hal::drivers::local_sync::sync_driver
- iree::hal::local
- iree::hal::local::loaders::vmvx_module_loader
- iree::vm
- DEFINES
- "IREE_HAVE_HAL_VMVX_SYNC_DRIVER_MODULE=1"
- PUBLIC
-)
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.c b/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.c
deleted file mode 100644
index 0daff0a..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.c
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2021 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#include "iree/hal/drivers/vmvx_sync/registration/driver_module.h"
-
-#include <inttypes.h>
-#include <stddef.h>
-
-#include "iree/base/api.h"
-#include "iree/hal/drivers/local_sync/sync_device.h"
-#include "iree/hal/drivers/local_sync/sync_driver.h"
-#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/vmvx_module_loader.h"
-#include "iree/vm/api.h"
-
-// TODO(#4298): remove this driver registration and wrapper.
-
-#define IREE_HAL_VMVX_SYNC_DRIVER_ID 0x53564D58u // SVMX
-
-static iree_status_t iree_hal_vmvx_sync_driver_factory_enumerate(
- void* self, const iree_hal_driver_info_t** out_driver_infos,
- iree_host_size_t* out_driver_info_count) {
- static const iree_hal_driver_info_t driver_infos[1] = {
- {
- .driver_id = IREE_HAL_VMVX_SYNC_DRIVER_ID,
- .driver_name = iree_string_view_literal("vmvx-sync"),
- .full_name = iree_string_view_literal(
- "synchronous VM-based reference backend"),
- },
- };
- *out_driver_info_count = IREE_ARRAYSIZE(driver_infos);
- *out_driver_infos = driver_infos;
- return iree_ok_status();
-}
-
-static iree_status_t iree_hal_vmvx_sync_driver_factory_try_create(
- void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
- iree_hal_driver_t** out_driver) {
- if (driver_id != IREE_HAL_VMVX_SYNC_DRIVER_ID) {
- return iree_make_status(IREE_STATUS_UNAVAILABLE,
- "no driver with ID %016" PRIu64
- " is provided by this factory",
- driver_id);
- }
-
- iree_vm_instance_t* instance = NULL;
- IREE_RETURN_IF_ERROR(iree_vm_instance_create(host_allocator, &instance));
-
- iree_hal_executable_loader_t* vmvx_loader = NULL;
- iree_status_t status = iree_hal_vmvx_module_loader_create(
- instance, host_allocator, &vmvx_loader);
- iree_hal_executable_loader_t* loaders[1] = {vmvx_loader};
-
- iree_hal_allocator_t* device_allocator = NULL;
- if (iree_status_is_ok(status)) {
- status = iree_hal_allocator_create_heap(iree_make_cstring_view("vmvx"),
- host_allocator, host_allocator,
- &device_allocator);
- }
-
- // Set parameters for the device created in the next step.
- iree_hal_sync_device_params_t default_params;
- iree_hal_sync_device_params_initialize(&default_params);
- if (iree_status_is_ok(status)) {
- status = iree_hal_sync_driver_create(
- iree_make_cstring_view("vmvx"), &default_params,
- IREE_ARRAYSIZE(loaders), loaders, device_allocator, host_allocator,
- out_driver);
- }
-
- iree_hal_allocator_release(device_allocator);
- iree_hal_executable_loader_release(vmvx_loader);
- iree_vm_instance_release(instance);
- return status;
-}
-
-IREE_API_EXPORT iree_status_t iree_hal_vmvx_sync_driver_module_register(
- iree_hal_driver_registry_t* registry) {
- static const iree_hal_driver_factory_t factory = {
- .self = NULL,
- .enumerate = iree_hal_vmvx_sync_driver_factory_enumerate,
- .try_create = iree_hal_vmvx_sync_driver_factory_try_create,
- };
- return iree_hal_driver_registry_register_factory(registry, &factory);
-}
diff --git a/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.h b/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.h
deleted file mode 100644
index 62a166d..0000000
--- a/runtime/src/iree/hal/drivers/vmvx_sync/registration/driver_module.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2021 The IREE Authors
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-#ifndef IREE_HAL_DRIVER_VMVX_SYNC_REGISTRATION_DRIVER_MODULE_H_
-#define IREE_HAL_DRIVER_VMVX_SYNC_REGISTRATION_DRIVER_MODULE_H_
-
-#include "iree/base/api.h"
-#include "iree/hal/api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-// DEPRECATED: this entire driver will be removed soon.
-// TODO(#3580): remove this entire driver w/ iree_hal_executable_library_t.
-IREE_API_EXPORT iree_status_t
-iree_hal_vmvx_sync_driver_module_register(iree_hal_driver_registry_t* registry);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // IREE_HAL_DRIVER_VMVX_SYNC_REGISTRATION_DRIVER_MODULE_H_
diff --git a/runtime/src/iree/modules/check/BUILD b/runtime/src/iree/modules/check/BUILD
index 33a94c4..6871759 100644
--- a/runtime/src/iree/modules/check/BUILD
+++ b/runtime/src/iree/modules/check/BUILD
@@ -39,7 +39,7 @@
"//runtime/src/iree/base/internal",
"//runtime/src/iree/base/internal:span",
"//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/vmvx/registration",
+ "//runtime/src/iree/hal/drivers/local_task/registration",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
diff --git a/runtime/src/iree/modules/check/CMakeLists.txt b/runtime/src/iree/modules/check/CMakeLists.txt
index 2195530..202e111 100644
--- a/runtime/src/iree/modules/check/CMakeLists.txt
+++ b/runtime/src/iree/modules/check/CMakeLists.txt
@@ -26,8 +26,7 @@
PUBLIC
)
-# Doesn't use bazel_to_cmake because IREE_HAL_DRIVER_VMVX filtering is custom logic
-if(IREE_HAL_DRIVER_VMVX)
+if(IREE_HAL_DRIVER_LOCAL_TASK)
iree_cc_test(
NAME
check_test
@@ -40,7 +39,7 @@
iree::base::internal
iree::base::internal::span
iree::hal
- iree::hal::drivers::vmvx::registration
+ iree::hal::drivers::local_task::registration
iree::modules::hal
iree::testing::gtest
iree::testing::gtest_main
diff --git a/runtime/src/iree/modules/check/check_test.cc b/runtime/src/iree/modules/check/check_test.cc
index 40a91f3..5388944 100644
--- a/runtime/src/iree/modules/check/check_test.cc
+++ b/runtime/src/iree/modules/check/check_test.cc
@@ -15,7 +15,7 @@
#include "iree/base/internal/span.h"
#include "iree/base/status_cc.h"
#include "iree/hal/api.h"
-#include "iree/hal/drivers/vmvx/registration/driver_module.h"
+#include "iree/hal/drivers/local_task/registration/driver_module.h"
#include "iree/modules/check/module.h"
#include "iree/modules/hal/module.h"
#include "iree/testing/gtest.h"
@@ -29,15 +29,16 @@
class CheckTest : public ::testing::Test {
protected:
static void SetUpTestSuite() {
- IREE_CHECK_OK(iree_hal_vmvx_driver_module_register(
+ IREE_CHECK_OK(iree_hal_local_task_driver_module_register(
iree_hal_driver_registry_default()));
// TODO(benvanik): move to instance-based registration.
IREE_ASSERT_OK(iree_hal_module_register_types());
iree_hal_driver_t* hal_driver = nullptr;
IREE_ASSERT_OK(iree_hal_driver_registry_try_create_by_name(
- iree_hal_driver_registry_default(), iree_make_cstring_view("vmvx"),
- iree_allocator_system(), &hal_driver));
+ iree_hal_driver_registry_default(),
+ iree_make_cstring_view("local-task"), iree_allocator_system(),
+ &hal_driver));
IREE_ASSERT_OK(iree_hal_driver_create_default_device(
hal_driver, iree_allocator_system(), &device_));
IREE_ASSERT_OK(
diff --git a/runtime/src/iree/modules/check/test/success.mlir b/runtime/src/iree/modules/check/test/success.mlir
index 4792c8f..6dc937a 100644
--- a/runtime/src/iree/modules/check/test/success.mlir
+++ b/runtime/src/iree/modules/check/test/success.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-check-module --driver=vmvx -
+// RUN: iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-check-module --driver=local-task -
// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vulkan-spirv --iree-mlir-to-vm-bytecode-module %s | iree-check-module --driver=vulkan -)
func.func @expect_true() {
diff --git a/runtime/src/iree/runtime/demo/BUILD b/runtime/src/iree/runtime/demo/BUILD
index 48f0c70..39aa4cd 100644
--- a/runtime/src/iree/runtime/demo/BUILD
+++ b/runtime/src/iree/runtime/demo/BUILD
@@ -35,7 +35,7 @@
iree_cmake_extra_content(
content = """
-if(NOT IREE_HAL_DRIVER_VMVX OR NOT IREE_TARGET_BACKEND_VMVX)
+if(NOT IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE OR NOT IREE_TARGET_BACKEND_VMVX)
return()
endif()
""",
diff --git a/runtime/src/iree/runtime/demo/CMakeLists.txt b/runtime/src/iree/runtime/demo/CMakeLists.txt
index 5b8313f..ec36832 100644
--- a/runtime/src/iree/runtime/demo/CMakeLists.txt
+++ b/runtime/src/iree/runtime/demo/CMakeLists.txt
@@ -12,7 +12,7 @@
iree::runtime::unified
)
-if(NOT IREE_HAL_DRIVER_VMVX OR NOT IREE_TARGET_BACKEND_VMVX)
+if(NOT IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE OR NOT IREE_TARGET_BACKEND_VMVX)
return()
endif()
diff --git a/runtime/src/iree/runtime/demo/hello_world_explained.c b/runtime/src/iree/runtime/demo/hello_world_explained.c
index 3abaca0..c3a94d7 100644
--- a/runtime/src/iree/runtime/demo/hello_world_explained.c
+++ b/runtime/src/iree/runtime/demo/hello_world_explained.c
@@ -124,7 +124,7 @@
// TODO(#5724): move device selection into the compiled modules.
iree_hal_device_t* device = NULL;
IREE_RETURN_IF_ERROR(iree_runtime_instance_try_create_default_device(
- instance, iree_make_cstring_view("vmvx"), &device));
+ instance, iree_make_cstring_view("local-task"), &device));
// Set up the session to run the demo module.
// Sessions are like OS processes and are used to isolate modules from each
diff --git a/runtime/src/iree/runtime/demo/hello_world_terse.c b/runtime/src/iree/runtime/demo/hello_world_terse.c
index 35ca476..22256d9 100644
--- a/runtime/src/iree/runtime/demo/hello_world_terse.c
+++ b/runtime/src/iree/runtime/demo/hello_world_terse.c
@@ -41,7 +41,7 @@
// TODO(#5724): move device selection into the compiled modules.
iree_hal_device_t* device = NULL;
IREE_CHECK_OK(iree_runtime_instance_try_create_default_device(
- instance, iree_make_cstring_view("vmvx"), &device));
+ instance, iree_make_cstring_view("local-task"), &device));
// Create one session per loaded module to hold the module state.
iree_runtime_session_options_t session_options;
diff --git a/runtime/src/iree/runtime/testdata/BUILD b/runtime/src/iree/runtime/testdata/BUILD
index e0f1ec4..5de5dc5 100644
--- a/runtime/src/iree/runtime/testdata/BUILD
+++ b/runtime/src/iree/runtime/testdata/BUILD
@@ -15,7 +15,7 @@
iree_cmake_extra_content(
content = """
-if(NOT IREE_HAL_DRIVER_VMVX OR NOT IREE_TARGET_BACKEND_VMVX)
+if(NOT IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE OR NOT IREE_TARGET_BACKEND_VMVX)
return()
endif()
""",
diff --git a/runtime/src/iree/runtime/testdata/CMakeLists.txt b/runtime/src/iree/runtime/testdata/CMakeLists.txt
index 4c947e3..653bdec 100644
--- a/runtime/src/iree/runtime/testdata/CMakeLists.txt
+++ b/runtime/src/iree/runtime/testdata/CMakeLists.txt
@@ -10,7 +10,7 @@
iree_add_all_subdirs()
-if(NOT IREE_HAL_DRIVER_VMVX OR NOT IREE_TARGET_BACKEND_VMVX)
+if(NOT IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE OR NOT IREE_TARGET_BACKEND_VMVX)
return()
endif()
diff --git a/runtime/src/iree/tools/utils/BUILD b/runtime/src/iree/tools/utils/BUILD
index bd412b2..1e7804c 100644
--- a/runtime/src/iree/tools/utils/BUILD
+++ b/runtime/src/iree/tools/utils/BUILD
@@ -43,7 +43,7 @@
iree_cmake_extra_content(
content = """
-if(IREE_HAL_DRIVER_VMVX)
+if(IREE_HAL_DRIVER_LOCAL_SYNC)
""",
inline = True,
)
@@ -55,7 +55,7 @@
":vm_util",
"//runtime/src/iree/base",
"//runtime/src/iree/hal",
- "//runtime/src/iree/hal/drivers/vmvx/registration",
+ "//runtime/src/iree/hal/drivers/local_sync/registration",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
diff --git a/runtime/src/iree/tools/utils/CMakeLists.txt b/runtime/src/iree/tools/utils/CMakeLists.txt
index 754a1e5..bbaceec 100644
--- a/runtime/src/iree/tools/utils/CMakeLists.txt
+++ b/runtime/src/iree/tools/utils/CMakeLists.txt
@@ -44,7 +44,7 @@
PUBLIC
)
-if(IREE_HAL_DRIVER_VMVX)
+if(IREE_HAL_DRIVER_LOCAL_SYNC)
iree_cc_test(
NAME
@@ -55,7 +55,7 @@
::vm_util
iree::base
iree::hal
- iree::hal::drivers::vmvx::registration
+ iree::hal::drivers::local_sync::registration
iree::modules::hal
iree::testing::gtest
iree::testing::gtest_main
diff --git a/runtime/src/iree/tools/utils/vm_util_test.cc b/runtime/src/iree/tools/utils/vm_util_test.cc
index f610013..03114c8 100644
--- a/runtime/src/iree/tools/utils/vm_util_test.cc
+++ b/runtime/src/iree/tools/utils/vm_util_test.cc
@@ -8,7 +8,7 @@
#include "iree/base/api.h"
#include "iree/hal/api.h"
-#include "iree/hal/drivers/vmvx/registration/driver_module.h"
+#include "iree/hal/drivers/local_sync/registration/driver_module.h"
#include "iree/modules/hal/module.h"
#include "iree/testing/gtest.h"
#include "iree/testing/status_matchers.h"
@@ -21,13 +21,13 @@
class VmUtilTest : public ::testing::Test {
protected:
static void SetUpTestSuite() {
- IREE_CHECK_OK(iree_hal_vmvx_driver_module_register(
+ IREE_CHECK_OK(iree_hal_local_sync_driver_module_register(
iree_hal_driver_registry_default()));
}
virtual void SetUp() {
IREE_ASSERT_OK(iree_hal_module_register_types());
- IREE_ASSERT_OK(CreateDevice("vmvx", &device_));
+ IREE_ASSERT_OK(CreateDevice("local-sync", &device_));
allocator_ = iree_hal_device_allocator(device_);
}
diff --git a/samples/simple_embedding/BUILD b/samples/simple_embedding/BUILD
index b58e2c2..a1b2dcd 100644
--- a/samples/simple_embedding/BUILD
+++ b/samples/simple_embedding/BUILD
@@ -16,7 +16,7 @@
iree_cmake_extra_content(
content = """
-if((IREE_HAL_DRIVER_VMVX OR IREE_HAL_DRIVER_VMVX_SYNC) AND
+if(IREE_HAL_DRIVER_LOCAL_SYNC AND IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE AND
(IREE_TARGET_BACKEND_VMVX OR DEFINED IREE_HOST_BINARY_ROOT))
""",
inline = True,
@@ -66,7 +66,7 @@
iree_cmake_extra_content(
content = """
-if((IREE_HAL_DRIVER_DYLIB OR IREE_HAL_DRIVER_DYLIB_SYNC) AND
+if(IREE_HAL_DRIVER_LOCAL_SYNC AND IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF AND
(IREE_TARGET_BACKEND_DYLIB_LLVM_AOT OR DEFINED IREE_HOST_BINARY_ROOT))
""",
inline = True,
@@ -184,7 +184,7 @@
iree_cmake_extra_content(
content = """
-if(IREE_HAL_DRIVER_DYLIB)
+if(IREE_HAL_DRIVER_LOCAL_TASK AND IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
""",
inline = True,
)
diff --git a/samples/simple_embedding/CMakeLists.txt b/samples/simple_embedding/CMakeLists.txt
index 56899e0..fe501a4 100644
--- a/samples/simple_embedding/CMakeLists.txt
+++ b/samples/simple_embedding/CMakeLists.txt
@@ -10,7 +10,7 @@
iree_add_all_subdirs()
-if((IREE_HAL_DRIVER_VMVX OR IREE_HAL_DRIVER_VMVX_SYNC) AND
+if(IREE_HAL_DRIVER_LOCAL_SYNC AND IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE AND
(IREE_TARGET_BACKEND_VMVX OR DEFINED IREE_HOST_BINARY_ROOT))
iree_cc_binary(
@@ -54,7 +54,7 @@
endif()
-if((IREE_HAL_DRIVER_DYLIB OR IREE_HAL_DRIVER_DYLIB_SYNC) AND
+if(IREE_HAL_DRIVER_LOCAL_SYNC AND IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF AND
(IREE_TARGET_BACKEND_DYLIB_LLVM_AOT OR DEFINED IREE_HOST_BINARY_ROOT))
iree_cc_binary(
@@ -183,7 +183,7 @@
::simple_embedding_embedded_sync
)
-if(IREE_HAL_DRIVER_DYLIB)
+if(IREE_HAL_DRIVER_LOCAL_TASK AND IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
iree_cc_binary(
NAME
diff --git a/samples/simple_embedding/device_vmvx_sync.c b/samples/simple_embedding/device_vmvx_sync.c
index d83a500..5aef183 100644
--- a/samples/simple_embedding/device_vmvx_sync.c
+++ b/samples/simple_embedding/device_vmvx_sync.c
@@ -4,7 +4,7 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-// A example of setting up the vmvx-sync driver.
+// A example of setting up the local-sync driver using VMVX for execution.
#include <stddef.h>
diff --git a/samples/static_library/CMakeLists.txt b/samples/static_library/CMakeLists.txt
index e5416e6..ff8728e 100644
--- a/samples/static_library/CMakeLists.txt
+++ b/samples/static_library/CMakeLists.txt
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
if(NOT IREE_TARGET_BACKEND_DYLIB_LLVM_AOT OR
- NOT IREE_HAL_DRIVER_DYLIB OR
+ NOT IREE_HAL_DRIVER_LOCAL_SYNC OR
NOT IREE_BUILD_COMPILER)
return()
endif()
diff --git a/samples/static_library/README.md b/samples/static_library/README.md
index b22a3f3..75e9ea2 100644
--- a/samples/static_library/README.md
+++ b/samples/static_library/README.md
@@ -44,7 +44,8 @@
-DIREE_TARGET_BACKEND_DEFAULTS=OFF \
-DIREE_TARGET_BACKEND_DYLIB_LLVM_AOT=ON \
-DIREE_HAL_DRIVER_DEFAULTS=OFF \
- -DIREE_HAL_DRIVER_DYLIB_SYNC=ON \
+ -DIREE_HAL_DRIVER_LOCAL_SYNC=ON \
+ -DIREE_HAL_EXECUTABLE_LOADER_DEFAULTS=OFF \
-DIREE_BUILD_COMPILER=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo .
```
diff --git a/samples/vision_inference/CMakeLists.txt b/samples/vision_inference/CMakeLists.txt
index 2da2ffa..89b2ae0 100644
--- a/samples/vision_inference/CMakeLists.txt
+++ b/samples/vision_inference/CMakeLists.txt
@@ -4,7 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-if(NOT IREE_TARGET_BACKEND_DYLIB_LLVM_AOT OR NOT IREE_HAL_DRIVER_DYLIB)
+if(NOT IREE_TARGET_BACKEND_DYLIB_LLVM_AOT OR
+ NOT IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT)
return()
endif()
diff --git a/samples/vision_inference/iree-run-mnist-module.c b/samples/vision_inference/iree-run-mnist-module.c
index 117666e..581ef09 100644
--- a/samples/vision_inference/iree-run-mnist-module.c
+++ b/samples/vision_inference/iree-run-mnist-module.c
@@ -26,7 +26,7 @@
// TODO(#5724): move device selection into the compiled modules.
iree_hal_device_t* device = NULL;
IREE_RETURN_IF_ERROR(iree_runtime_instance_try_create_default_device(
- instance, iree_make_cstring_view("dylib"), &device));
+ instance, iree_make_cstring_view("local-task"), &device));
// Create one session per loaded module to hold the module state.
iree_runtime_session_options_t session_options;
diff --git a/tests/e2e/linalg_ext_ops/BUILD b/tests/e2e/linalg_ext_ops/BUILD
index e92d3ab..1397466 100644
--- a/tests/e2e/linalg_ext_ops/BUILD
+++ b/tests/e2e/linalg_ext_ops/BUILD
@@ -49,7 +49,7 @@
],
include = ["*.mlir"],
),
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -65,7 +65,7 @@
],
include = ["*.mlir"],
),
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
diff --git a/tests/e2e/linalg_ext_ops/CMakeLists.txt b/tests/e2e/linalg_ext_ops/CMakeLists.txt
index e1fc7c5..df2f86d 100644
--- a/tests/e2e/linalg_ext_ops/CMakeLists.txt
+++ b/tests/e2e/linalg_ext_ops/CMakeLists.txt
@@ -41,7 +41,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
)
iree_check_single_backend_test_suite(
@@ -55,7 +55,7 @@
TARGET_BACKEND
"vmvx"
DRIVER
- "vmvx"
+ "local-task"
)
iree_check_single_backend_test_suite(
diff --git a/tests/e2e/matmul/BUILD b/tests/e2e/matmul/BUILD
index 8c1ac6f..3d4ae8b 100644
--- a/tests/e2e/matmul/BUILD
+++ b/tests/e2e/matmul/BUILD
@@ -27,8 +27,8 @@
"--shapes=small",
],
target_backends_and_drivers = [
- ("dylib-llvm-aot", "dylib"),
- ("vmvx", "vmvx"),
+ ("dylib-llvm-aot", "local-task"),
+ ("vmvx", "local-task"),
],
trace_runner = "//tools:iree-e2e-matmul-test",
) for lhs_rhs_type in [
@@ -48,7 +48,7 @@
"--shapes=small",
],
target_backends_and_drivers = [
- ("dylib-llvm-aot", "dylib"),
+ ("dylib-llvm-aot", "local-task"),
],
target_cpu_features_variants = ["default"] +
([
@@ -72,7 +72,7 @@
"--shapes=large",
],
target_backends_and_drivers = [
- ("dylib-llvm-aot", "dylib"),
+ ("dylib-llvm-aot", "local-task"),
],
target_cpu_features_variants = ["default"] +
([
@@ -100,7 +100,7 @@
"--shapes=%s" % size,
],
target_backends_and_drivers = [
- ("dylib-llvm-aot", "dylib"),
+ ("dylib-llvm-aot", "local-task"),
],
target_cpu_features_variants = ["default"] +
([
@@ -187,7 +187,7 @@
],
target_backends_and_drivers = [
("cuda", "cuda"),
- ("dylib-llvm-aot", "dylib"),
+ ("dylib-llvm-aot", "local-task"),
],
trace_runner = "//tools:iree-e2e-matmul-test",
) for lhs_rhs_type in [
diff --git a/tests/e2e/matmul/CMakeLists.txt b/tests/e2e/matmul/CMakeLists.txt
index f397c3f..4c79579 100644
--- a/tests/e2e/matmul/CMakeLists.txt
+++ b/tests/e2e/matmul/CMakeLists.txt
@@ -24,8 +24,8 @@
"dylib-llvm-aot"
"vmvx"
DRIVERS
- "dylib"
- "vmvx"
+ "local-task"
+ "local-task"
)
iree_generated_trace_runner_test(
@@ -42,8 +42,8 @@
"dylib-llvm-aot"
"vmvx"
DRIVERS
- "dylib"
- "vmvx"
+ "local-task"
+ "local-task"
)
iree_generated_trace_runner_test(
@@ -59,7 +59,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
TARGET_CPU_FEATURES_VARIANTS
@@ -81,7 +81,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
TARGET_CPU_FEATURES_VARIANTS
@@ -101,7 +101,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
TARGET_CPU_FEATURES_VARIANTS
@@ -123,7 +123,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
TARGET_CPU_FEATURES_VARIANTS
@@ -143,7 +143,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-codegen-mmt4d-use-intrinsics"
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
@@ -166,7 +166,7 @@
TARGET_BACKENDS
"dylib-llvm-aot"
DRIVERS
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-codegen-mmt4d-use-intrinsics"
"--iree-flow-mmt4d-target-options=enable_generic_slow #pass_options_variant#"
@@ -237,7 +237,7 @@
"dylib-llvm-aot"
DRIVERS
"cuda"
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-flow-split-matmul-reduction=4"
LABELS
diff --git a/tests/e2e/models/BUILD b/tests/e2e/models/BUILD
index ced2032..fae7567 100644
--- a/tests/e2e/models/BUILD
+++ b/tests/e2e/models/BUILD
@@ -54,7 +54,7 @@
name = "check_dylib-llvm-aot_dylib",
srcs = CHECK_FRAMEWORK_TESTS,
compiler_flags = ["--iree-input-type=mhlo"],
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -62,7 +62,7 @@
# iree_check_single_backend_test_suite(
# name = "check_vmvx_vmvx",
# srcs = CHECK_FRAMEWORK_TESTS,
-# driver = "vmvx",
+# driver = "local-task",
# target_backend = "vmvx",
# )
diff --git a/tests/e2e/models/CMakeLists.txt b/tests/e2e/models/CMakeLists.txt
index 6747500..54c1de4 100644
--- a/tests/e2e/models/CMakeLists.txt
+++ b/tests/e2e/models/CMakeLists.txt
@@ -39,7 +39,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
)
diff --git a/tests/e2e/regression/BUILD b/tests/e2e/regression/BUILD
index 8f64795..8bf3932 100644
--- a/tests/e2e/regression/BUILD
+++ b/tests/e2e/regression/BUILD
@@ -72,7 +72,7 @@
"lowering_config.mlir",
] + BACKEND_TESTS,
compiler_flags = ["--iree-input-type=mhlo"],
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -85,7 +85,7 @@
"linalg_quantized_matmul_vs_linalg_matmul.mlir",
],
compiler_flags = ["--iree-input-type=tosa"],
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -93,7 +93,7 @@
name = "check_regression_vmvx",
srcs = BACKEND_TESTS,
compiler_flags = ["--iree-input-type=mhlo"],
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
diff --git a/tests/e2e/regression/CMakeLists.txt b/tests/e2e/regression/CMakeLists.txt
index 7be1176..61a6ea9 100644
--- a/tests/e2e/regression/CMakeLists.txt
+++ b/tests/e2e/regression/CMakeLists.txt
@@ -47,7 +47,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
)
@@ -60,7 +60,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=tosa"
)
@@ -82,7 +82,7 @@
TARGET_BACKEND
"vmvx"
DRIVER
- "vmvx"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
)
diff --git a/tests/e2e/tensor_ops/BUILD b/tests/e2e/tensor_ops/BUILD
index e3b0d8f..c1d3cfd 100644
--- a/tests/e2e/tensor_ops/BUILD
+++ b/tests/e2e/tensor_ops/BUILD
@@ -42,7 +42,7 @@
"tensor_cast.mlir",
],
),
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
diff --git a/tests/e2e/tensor_ops/CMakeLists.txt b/tests/e2e/tensor_ops/CMakeLists.txt
index 8a8d7de..41ec1e4 100644
--- a/tests/e2e/tensor_ops/CMakeLists.txt
+++ b/tests/e2e/tensor_ops/CMakeLists.txt
@@ -33,7 +33,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
)
iree_check_single_backend_test_suite(
diff --git a/tests/e2e/tosa_ops/BUILD b/tests/e2e/tosa_ops/BUILD
index 6118ce2..92afeca 100644
--- a/tests/e2e/tosa_ops/BUILD
+++ b/tests/e2e/tosa_ops/BUILD
@@ -69,7 +69,7 @@
name = "check_dylib-llvm-aot_dylib",
srcs = LLVM_SRCS,
compiler_flags = ["--iree-input-type=tosa"],
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -127,7 +127,7 @@
compiler_flags = [
"--iree-input-type=tosa",
],
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
diff --git a/tests/e2e/tosa_ops/CMakeLists.txt b/tests/e2e/tosa_ops/CMakeLists.txt
index 6d2cc17..6dc3430 100644
--- a/tests/e2e/tosa_ops/CMakeLists.txt
+++ b/tests/e2e/tosa_ops/CMakeLists.txt
@@ -57,7 +57,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=tosa"
)
@@ -107,7 +107,7 @@
TARGET_BACKEND
"vmvx"
DRIVER
- "vmvx"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=tosa"
)
diff --git a/tests/e2e/xla_ops/BUILD b/tests/e2e/xla_ops/BUILD
index e77776f..4217c62 100644
--- a/tests/e2e/xla_ops/BUILD
+++ b/tests/e2e/xla_ops/BUILD
@@ -241,7 +241,7 @@
include = ["*.mlir"],
),
compiler_flags = ["--iree-input-type=mhlo"],
- driver = "dylib",
+ driver = "local-task",
target_backend = "dylib-llvm-aot",
)
@@ -312,7 +312,7 @@
],
),
compiler_flags = ["--iree-input-type=mhlo"],
- driver = "vmvx",
+ driver = "local-task",
target_backend = "vmvx",
)
@@ -537,7 +537,7 @@
"--iree-input-type=mhlo",
"--iree-llvm-target-cpu-features=host",
],
- driver = "dylib",
+ driver = "local-task",
# Building and testing must be on the same architecture, which doesn't work
# with remote execution in general.
tags = [
diff --git a/tests/e2e/xla_ops/CMakeLists.txt b/tests/e2e/xla_ops/CMakeLists.txt
index 83cf7b7..82c0ed7 100644
--- a/tests/e2e/xla_ops/CMakeLists.txt
+++ b/tests/e2e/xla_ops/CMakeLists.txt
@@ -225,7 +225,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
)
@@ -288,7 +288,7 @@
TARGET_BACKEND
"vmvx"
DRIVER
- "vmvx"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
)
@@ -490,7 +490,7 @@
TARGET_BACKEND
"dylib-llvm-aot"
DRIVER
- "dylib"
+ "local-task"
COMPILER_FLAGS
"--iree-input-type=mhlo"
"--iree-llvm-target-cpu-features=host"
diff --git a/tools/build_config_template.txt.in b/tools/build_config_template.txt.in
index ada1acd..33372cb 100644
--- a/tools/build_config_template.txt.in
+++ b/tools/build_config_template.txt.in
@@ -1,11 +1,7 @@
IREE_HAL_DRIVER_CUDA=${IREE_HAL_DRIVER_CUDA}
-IREE_HAL_DRIVER_DYLIB=${IREE_HAL_DRIVER_DYLIB}
-IREE_HAL_DRIVER_DYLIB_SYNC=${IREE_HAL_DRIVER_DYLIB_SYNC}
-IREE_HAL_DRIVER_EXPERIMENTAL_ROCM=${IREE_HAL_DRIVER_EXPERIMENTAL_ROCM}
-IREE_HAL_DRIVER_VMVX=${IREE_HAL_DRIVER_VMVX}
-IREE_HAL_DRIVER_VMVX_SYNC=${IREE_HAL_DRIVER_VMVX_SYNC}
IREE_HAL_DRIVER_LOCAL_SYNC=${IREE_HAL_DRIVER_LOCAL_SYNC}
IREE_HAL_DRIVER_LOCAL_TASK=${IREE_HAL_DRIVER_LOCAL_TASK}
+IREE_HAL_DRIVER_EXPERIMENTAL_ROCM=${IREE_HAL_DRIVER_EXPERIMENTAL_ROCM}
IREE_HAL_DRIVER_VULKAN=${IREE_HAL_DRIVER_VULKAN}
IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY=${IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY}
IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF=${IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF}
diff --git a/tools/iree-benchmark-module-main.cc b/tools/iree-benchmark-module-main.cc
index 37619f8..68db18b 100644
--- a/tools/iree-benchmark-module-main.cc
+++ b/tools/iree-benchmark-module-main.cc
@@ -91,7 +91,7 @@
"to run. If this is not set, all the exported functions will be "
"benchmarked and they are expected to not have input arguments.");
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
IREE_FLAG(bool, print_statistics, false,
"Prints runtime statistics to stderr on exit.");
diff --git a/tools/iree-benchmark-trace-main.c b/tools/iree-benchmark-trace-main.c
index 2b64550..16e86f8 100644
--- a/tools/iree-benchmark-trace-main.c
+++ b/tools/iree-benchmark-trace-main.c
@@ -21,7 +21,7 @@
#include "iree/tools/utils/yaml_util.h"
#include "iree/vm/api.h"
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
IREE_FLAG(bool, print_statistics, false,
"Prints runtime statistics to stderr on exit.");
diff --git a/tools/iree-check-module-main.cc b/tools/iree-check-module-main.cc
index 18522ce..66092c7 100644
--- a/tools/iree-check-module-main.cc
+++ b/tools/iree-check-module-main.cc
@@ -42,7 +42,7 @@
IREE_FLAG(bool, trace_execution, false, "Traces VM execution to stderr.");
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
IREE_FLAG(
bool, expect_failure, false,
diff --git a/tools/iree-e2e-matmul-test.c b/tools/iree-e2e-matmul-test.c
index 15c912b..50c51ad 100644
--- a/tools/iree-e2e-matmul-test.c
+++ b/tools/iree-e2e-matmul-test.c
@@ -24,7 +24,7 @@
IREE_FLAG(bool, trace_execution, false, "Traces VM execution to stderr.");
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
static const char* emoji(bool good) { return good ? "🦄" : "🐞"; }
diff --git a/tools/iree-run-mlir-main.cc b/tools/iree-run-mlir-main.cc
index 198f736..28c42e8 100644
--- a/tools/iree-run-mlir-main.cc
+++ b/tools/iree-run-mlir-main.cc
@@ -156,6 +156,10 @@
// Returns a driver name capable of handling input from the given backend.
std::string BackendToDriverName(std::string backend) {
+ // TODO(#9336): remove this or allow override for external drivers.
+ if (backend == "vmvx" || backend == "dylib-llvm-aot") {
+ return "local-task";
+ }
size_t dash = backend.find('-');
if (dash == std::string::npos) {
return backend;
diff --git a/tools/iree-run-module-main.cc b/tools/iree-run-module-main.cc
index 7f8f6f9..6deedec 100644
--- a/tools/iree-run-module-main.cc
+++ b/tools/iree-run-module-main.cc
@@ -35,7 +35,7 @@
IREE_FLAG(bool, trace_execution, false, "Traces VM execution to stderr.");
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
IREE_FLAG(int32_t, print_max_element_count, 1024,
"Prints up to the maximum number of elements of output tensors, "
diff --git a/tools/iree-run-trace-main.c b/tools/iree-run-trace-main.c
index 8d164ef..841e184 100644
--- a/tools/iree-run-trace-main.c
+++ b/tools/iree-run-trace-main.c
@@ -22,7 +22,7 @@
IREE_FLAG(bool, print_statistics, false,
"Prints runtime statistics to stderr on exit.");
-IREE_FLAG(string, driver, "vmvx", "Backend driver to use.");
+IREE_FLAG(string, driver, "local-task", "Backend driver to use.");
// Runs the trace in |file| using |root_path| as the base for any path lookups
// required for external files referenced in |file|.
diff --git a/tools/test/benchmark_flags.txt b/tools/test/benchmark_flags.txt
index 3ab3ebf..32b2343 100644
--- a/tools/test/benchmark_flags.txt
+++ b/tools/test/benchmark_flags.txt
@@ -2,7 +2,7 @@
// HELP: --module_file
// HELP: --benchmark_list_tests
-// RUN: ( iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --benchmark_list_tests --driver=vmvx --benchmark_list_tests ) | FileCheck --check-prefix=LIST-BENCHMARKS %s
+// RUN: ( iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --benchmark_list_tests --driver=local-task --benchmark_list_tests ) | FileCheck --check-prefix=LIST-BENCHMARKS %s
module {
// LIST-BENCHMARKS: BM_foo1
func.func @foo1() -> tensor<4xf32> {
diff --git a/tools/test/iree-benchmark-module.mlir b/tools/test/iree-benchmark-module.mlir
index 820d272..6bdd25f 100644
--- a/tools/test/iree-benchmark-module.mlir
+++ b/tools/test/iree-benchmark-module.mlir
@@ -1,6 +1,6 @@
-// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vmvx --entry_function=abs --function_input=f32=-2 | FileCheck %s
+// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task --entry_function=abs --function_input=f32=-2 | FileCheck %s
// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-compile --iree-hal-target-backends=vulkan-spirv --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vulkan --entry_function=abs --function_input=f32=-2 | FileCheck %s)
-// RUN: iree-compile --iree-hal-target-backends=dylib-llvm-aot --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=dylib --entry_function=abs --function_input=f32=-2 | FileCheck %s
+// RUN: iree-compile --iree-hal-target-backends=dylib-llvm-aot --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task --entry_function=abs --function_input=f32=-2 | FileCheck %s
// CHECK-LABEL: BM_abs
func.func @abs(%input : tensor<f32>) -> (tensor<f32>) {
diff --git a/tools/test/iree-run-module.mlir b/tools/test/iree-run-module.mlir
index d171c00..4df9434 100644
--- a/tools/test/iree-run-module.mlir
+++ b/tools/test/iree-run-module.mlir
@@ -1,6 +1,6 @@
-// RUN: (iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-run-module --driver=vmvx --entry_function=abs --function_input=f32=-2) | FileCheck %s
+// RUN: (iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-run-module --driver=local-task --entry_function=abs --function_input=f32=-2) | FileCheck %s
// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || ((iree-compile --iree-hal-target-backends=vulkan-spirv --iree-mlir-to-vm-bytecode-module %s | iree-run-module --driver=vulkan --entry_function=abs --function_input=f32=-2) | FileCheck %s)
-// RUN: (iree-compile --iree-hal-target-backends=dylib-llvm-aot --iree-mlir-to-vm-bytecode-module %s | iree-run-module --driver=dylib --entry_function=abs --function_input=f32=-2) | FileCheck %s
+// RUN: (iree-compile --iree-hal-target-backends=dylib-llvm-aot --iree-mlir-to-vm-bytecode-module %s | iree-run-module --driver=local-task --entry_function=abs --function_input=f32=-2) | FileCheck %s
// CHECK-LABEL: EXEC @abs
func.func @abs(%input : tensor<f32>) -> (tensor<f32>) {
diff --git a/tools/test/multiple_args.mlir b/tools/test/multiple_args.mlir
index 30a8c19..fa4760e 100644
--- a/tools/test/multiple_args.mlir
+++ b/tools/test/multiple_args.mlir
@@ -1,6 +1,6 @@
// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-run-module --entry_function=multi_input --function_input="2xi32=[1 2]" --function_input="2xi32=[3 4]" | FileCheck %s
// RUN: iree-run-mlir --iree-hal-target-backends=vmvx --function-input='2xi32=[1 2]' --function-input='2xi32=[3 4]' %s | FileCheck %s
-// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vmvx --entry_function=multi_input --function_input="2xi32=[1 2]" --function_input="2xi32=[3 4]" | FileCheck --check-prefix=BENCHMARK %s
+// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task --entry_function=multi_input --function_input="2xi32=[1 2]" --function_input="2xi32=[3 4]" | FileCheck --check-prefix=BENCHMARK %s
// BENCHMARK-LABEL: BM_multi_input
// CHECK-LABEL: EXEC @multi_input
diff --git a/tools/test/multiple_exported_functions.mlir b/tools/test/multiple_exported_functions.mlir
index c1190d1..a57f529 100644
--- a/tools/test/multiple_exported_functions.mlir
+++ b/tools/test/multiple_exported_functions.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vmvx | FileCheck %s
+// RUN: iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task | FileCheck %s
// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vulkan-spirv --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vulkan | FileCheck %s)
module {
diff --git a/tools/test/repeated_return.mlir b/tools/test/repeated_return.mlir
index b12eac3..238339a 100644
--- a/tools/test/repeated_return.mlir
+++ b/tools/test/repeated_return.mlir
@@ -1,5 +1,5 @@
// RUN: (iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-run-module --entry_function=many_tensor) | FileCheck %s
-// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vmvx --entry_function=many_tensor | FileCheck --check-prefix=BENCHMARK %s
+// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task --entry_function=many_tensor | FileCheck --check-prefix=BENCHMARK %s
// RUN: iree-run-mlir --iree-hal-target-backends=vmvx %s | FileCheck %s
// BENCHMARK-LABEL: BM_many_tensor
diff --git a/tools/test/scalars.mlir b/tools/test/scalars.mlir
index b224316..cf9e717 100644
--- a/tools/test/scalars.mlir
+++ b/tools/test/scalars.mlir
@@ -1,5 +1,5 @@
// RUN: (iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-run-module --entry_function=scalar --function_input=42) | FileCheck %s
-// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=vmvx --entry_function=scalar --function_input=42 | FileCheck --check-prefix=BENCHMARK %s
+// RUN: iree-compile --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --driver=local-task --entry_function=scalar --function_input=42 | FileCheck --check-prefix=BENCHMARK %s
// RUN: (iree-run-mlir --iree-hal-target-backends=vmvx --function-input=42 %s) | FileCheck %s
// BENCHMARK-LABEL: BM_scalar