Renaming embedded_library_loader to embedded_elf_loader.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99a3f4d..253b883 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,15 +110,15 @@
# TODO(#9336): remove legacy driver names.
# Existing builds assume that dylib-sync doesn't use the system loader.
-set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY_DEFAULT OFF)
+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_LIBRARY_DEFAULT ON)
+ 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_LIBRARY_DEFAULT ON)
+ 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)
@@ -126,7 +126,7 @@
# Emscripten builds don't support embedded ELF libraries.
if(EMSCRIPTEN)
- set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY_DEFAULT OFF)
+ set(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF_DEFAULT OFF)
endif()
# If forcing system libraries (for TSAN/debugging tools/etc) then ensure the
@@ -135,7 +135,7 @@
set(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY_DEFAULT ON)
endif()
-option(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY "Enables the embedded dynamic library loader for local HAL drivers" ${IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY_DEFAULT})
+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})
@@ -166,8 +166,8 @@
endif()
message(STATUS "IREE HAL local executable library loaders:")
-if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
- message(STATUS " - embedded-library")
+if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
+ message(STATUS " - embedded-elf")
endif()
if(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY)
message(STATUS " - system-library")
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/BUILD b/runtime/src/iree/hal/drivers/dylib/registration/BUILD
index d9890c5..9957c78 100644
--- a/runtime/src/iree/hal/drivers/dylib/registration/BUILD
+++ b/runtime/src/iree/hal/drivers/dylib/registration/BUILD
@@ -25,7 +25,7 @@
"//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_library_loader",
+ "//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
index 087ac35..1a8392b 100644
--- a/runtime/src/iree/hal/drivers/dylib/registration/CMakeLists.txt
+++ b/runtime/src/iree/hal/drivers/dylib/registration/CMakeLists.txt
@@ -23,7 +23,7 @@
iree::hal
iree::hal::drivers::local_task::task_driver
iree::hal::local
- iree::hal::local::loaders::embedded_library_loader
+ iree::hal::local::loaders::embedded_elf_loader
iree::hal::local::loaders::system_library_loader
iree::task::api
DEFINES
diff --git a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c b/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c
index 0a6390d..de16581 100644
--- a/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c
+++ b/runtime/src/iree/hal/drivers/dylib/registration/driver_module.c
@@ -14,7 +14,7 @@
#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_library_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"
@@ -61,7 +61,7 @@
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_library_loader_create(
+ status = iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator,
&loaders[loader_count++]);
}
diff --git a/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD b/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD
index 8a9f554..1e36d37 100644
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD
+++ b/runtime/src/iree/hal/drivers/dylib_sync/registration/BUILD
@@ -24,6 +24,6 @@
"//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_library_loader",
+ "//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
index 817922a..5bbe83c 100644
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/CMakeLists.txt
+++ b/runtime/src/iree/hal/drivers/dylib_sync/registration/CMakeLists.txt
@@ -22,7 +22,7 @@
iree::hal
iree::hal::drivers::local_sync::sync_driver
iree::hal::local
- iree::hal::local::loaders::embedded_library_loader
+ iree::hal::local::loaders::embedded_elf_loader
DEFINES
"IREE_HAVE_HAL_DYLIB_SYNC_DRIVER_MODULE=1"
PUBLIC
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
index 8179735..c444a83 100644
--- a/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.c
+++ b/runtime/src/iree/hal/drivers/dylib_sync/registration/driver_module.c
@@ -13,7 +13,7 @@
#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_library_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
@@ -52,7 +52,7 @@
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_library_loader_create(
+ status = iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator,
&loaders[0]);
}
diff --git a/runtime/src/iree/hal/local/loaders/BUILD b/runtime/src/iree/hal/local/loaders/BUILD
index 349c1da..1e90ce9 100644
--- a/runtime/src/iree/hal/local/loaders/BUILD
+++ b/runtime/src/iree/hal/local/loaders/BUILD
@@ -14,17 +14,17 @@
iree_cmake_extra_content(
content = """
-if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
+if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
""",
inline = True,
)
iree_runtime_cc_library(
- name = "embedded_library_loader",
- srcs = ["embedded_library_loader.c"],
- hdrs = ["embedded_library_loader.h"],
+ name = "embedded_elf_loader",
+ srcs = ["embedded_elf_loader.c"],
+ hdrs = ["embedded_elf_loader.h"],
defines = [
- "IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY=1",
+ "IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF=1",
],
deps = [
"//runtime/src/iree/base",
diff --git a/runtime/src/iree/hal/local/loaders/CMakeLists.txt b/runtime/src/iree/hal/local/loaders/CMakeLists.txt
index fdf5516..783125c 100644
--- a/runtime/src/iree/hal/local/loaders/CMakeLists.txt
+++ b/runtime/src/iree/hal/local/loaders/CMakeLists.txt
@@ -10,15 +10,15 @@
iree_add_all_subdirs()
-if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
+if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
iree_cc_library(
NAME
- embedded_library_loader
+ embedded_elf_loader
HDRS
- "embedded_library_loader.h"
+ "embedded_elf_loader.h"
SRCS
- "embedded_library_loader.c"
+ "embedded_elf_loader.c"
DEPS
iree::base
iree::base::core_headers
@@ -28,7 +28,7 @@
iree::hal::local::elf::elf_module
iree::hal::local::executable_library
DEFINES
- "IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY=1"
+ "IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF=1"
PUBLIC
)
diff --git a/runtime/src/iree/hal/local/loaders/embedded_library_loader.c b/runtime/src/iree/hal/local/loaders/embedded_elf_loader.c
similarity index 91%
rename from runtime/src/iree/hal/local/loaders/embedded_library_loader.c
rename to runtime/src/iree/hal/local/loaders/embedded_elf_loader.c
index 017579e..e15b323 100644
--- a/runtime/src/iree/hal/local/loaders/embedded_library_loader.c
+++ b/runtime/src/iree/hal/local/loaders/embedded_elf_loader.c
@@ -4,7 +4,7 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "iree/hal/local/loaders/embedded_library_loader.h"
+#include "iree/hal/local/loaders/embedded_elf_loader.h"
#include <stdbool.h>
#include <stddef.h>
@@ -298,18 +298,18 @@
};
//===----------------------------------------------------------------------===//
-// iree_hal_embedded_library_loader_t
+// iree_hal_embedded_elf_loader_t
//===----------------------------------------------------------------------===//
-typedef struct iree_hal_embedded_library_loader_t {
+typedef struct iree_hal_embedded_elf_loader_t {
iree_hal_executable_loader_t base;
iree_allocator_t host_allocator;
-} iree_hal_embedded_library_loader_t;
+} iree_hal_embedded_elf_loader_t;
static const iree_hal_executable_loader_vtable_t
- iree_hal_embedded_library_loader_vtable;
+ iree_hal_embedded_elf_loader_vtable;
-iree_status_t iree_hal_embedded_library_loader_create(
+iree_status_t iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_t import_provider,
iree_allocator_t host_allocator,
iree_hal_executable_loader_t** out_executable_loader) {
@@ -317,13 +317,13 @@
*out_executable_loader = NULL;
IREE_TRACE_ZONE_BEGIN(z0);
- iree_hal_embedded_library_loader_t* executable_loader = NULL;
+ iree_hal_embedded_elf_loader_t* executable_loader = NULL;
iree_status_t status = iree_allocator_malloc(
host_allocator, sizeof(*executable_loader), (void**)&executable_loader);
if (iree_status_is_ok(status)) {
- iree_hal_executable_loader_initialize(
- &iree_hal_embedded_library_loader_vtable, import_provider,
- &executable_loader->base);
+ iree_hal_executable_loader_initialize(&iree_hal_embedded_elf_loader_vtable,
+ import_provider,
+ &executable_loader->base);
executable_loader->host_allocator = host_allocator;
*out_executable_loader = (iree_hal_executable_loader_t*)executable_loader;
}
@@ -332,10 +332,10 @@
return status;
}
-static void iree_hal_embedded_library_loader_destroy(
+static void iree_hal_embedded_elf_loader_destroy(
iree_hal_executable_loader_t* base_executable_loader) {
- iree_hal_embedded_library_loader_t* executable_loader =
- (iree_hal_embedded_library_loader_t*)base_executable_loader;
+ iree_hal_embedded_elf_loader_t* executable_loader =
+ (iree_hal_embedded_elf_loader_t*)base_executable_loader;
iree_allocator_t host_allocator = executable_loader->host_allocator;
IREE_TRACE_ZONE_BEGIN(z0);
@@ -344,20 +344,20 @@
IREE_TRACE_ZONE_END(z0);
}
-static bool iree_hal_embedded_library_loader_query_support(
+static bool iree_hal_embedded_elf_loader_query_support(
iree_hal_executable_loader_t* base_executable_loader,
iree_hal_executable_caching_mode_t caching_mode,
iree_string_view_t executable_format) {
- return iree_string_view_equal(
+ return iree_string_view_starts_with(
executable_format, iree_make_cstring_view("embedded-elf-" IREE_ARCH));
}
-static iree_status_t iree_hal_embedded_library_loader_try_load(
+static iree_status_t iree_hal_embedded_elf_loader_try_load(
iree_hal_executable_loader_t* base_executable_loader,
const iree_hal_executable_params_t* executable_params,
iree_hal_executable_t** out_executable) {
- iree_hal_embedded_library_loader_t* executable_loader =
- (iree_hal_embedded_library_loader_t*)base_executable_loader;
+ iree_hal_embedded_elf_loader_t* executable_loader =
+ (iree_hal_embedded_elf_loader_t*)base_executable_loader;
IREE_TRACE_ZONE_BEGIN(z0);
// Perform the load of the ELF and wrap it in an executable handle.
@@ -370,8 +370,8 @@
}
static const iree_hal_executable_loader_vtable_t
- iree_hal_embedded_library_loader_vtable = {
- .destroy = iree_hal_embedded_library_loader_destroy,
- .query_support = iree_hal_embedded_library_loader_query_support,
- .try_load = iree_hal_embedded_library_loader_try_load,
+ iree_hal_embedded_elf_loader_vtable = {
+ .destroy = iree_hal_embedded_elf_loader_destroy,
+ .query_support = iree_hal_embedded_elf_loader_query_support,
+ .try_load = iree_hal_embedded_elf_loader_try_load,
};
diff --git a/runtime/src/iree/hal/local/loaders/embedded_library_loader.h b/runtime/src/iree/hal/local/loaders/embedded_elf_loader.h
similarity index 79%
rename from runtime/src/iree/hal/local/loaders/embedded_library_loader.h
rename to runtime/src/iree/hal/local/loaders/embedded_elf_loader.h
index 7d75396..3627719 100644
--- a/runtime/src/iree/hal/local/loaders/embedded_library_loader.h
+++ b/runtime/src/iree/hal/local/loaders/embedded_elf_loader.h
@@ -4,8 +4,8 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#ifndef IREE_HAL_LOCAL_LOADERS_ELF_LIBRARY_LOADER_H_
-#define IREE_HAL_LOCAL_LOADERS_ELF_LIBRARY_LOADER_H_
+#ifndef IREE_HAL_LOCAL_LOADERS_EMBEDDED_ELF_LOADER_H_
+#define IREE_HAL_LOCAL_LOADERS_EMBEDDED_ELF_LOADER_H_
#include <stdbool.h>
#include <stdint.h>
@@ -21,7 +21,7 @@
// libraries on any platform. This allows us to use a single file format across
// all operating systems at the cost of some missing debugging/profiling
// features.
-iree_status_t iree_hal_embedded_library_loader_create(
+iree_status_t iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_t import_provider,
iree_allocator_t host_allocator,
iree_hal_executable_loader_t** out_executable_loader);
@@ -30,4 +30,4 @@
} // extern "C"
#endif // __cplusplus
-#endif // IREE_HAL_LOCAL_LOADERS_ELF_LIBRARY_LOADER_H_
+#endif // IREE_HAL_LOCAL_LOADERS_EMBEDDED_ELF_LOADER_H_
diff --git a/runtime/src/iree/hal/local/loaders/registration/BUILD b/runtime/src/iree/hal/local/loaders/registration/BUILD
index bf5de11..85b82f7 100644
--- a/runtime/src/iree/hal/local/loaders/registration/BUILD
+++ b/runtime/src/iree/hal/local/loaders/registration/BUILD
@@ -14,7 +14,7 @@
)
ALL_EXECUTABLE_LOADERS = [
- "embedded-library",
+ "embedded-elf",
"system-library",
"vmvx-module",
]
@@ -22,7 +22,7 @@
string_list_flag(
name = "enabled_executable_loaders",
build_setting_default = [
- "embedded-library",
+ "embedded-elf",
"system-library",
"vmvx-module",
],
@@ -43,16 +43,16 @@
srcs = ["init.c"],
hdrs = ["init.h"],
deps = [
- "//runtime/src/iree/base",
- "//runtime/src/iree/hal/local",
- ] + select({
- ":embedded-library_enabled": ["//runtime/src/iree/hal/local/loaders:embedded_library_loader"],
- "//conditions:default": [],
- }) + select({
- ":system-library_enabled": ["//runtime/src/iree/hal/local/loaders:system_library_loader"],
- "//conditions:default": [],
- }) + select({
- ":vmvx-module_enabled": ["//runtime/src/iree/hal/local/loaders:vmvx_module_loader"],
- "//conditions:default": [],
- }),
+ "//runtime/src/iree/base",
+ "//runtime/src/iree/hal/local",
+ ] + select({
+ ":embedded-elf_enabled": ["//runtime/src/iree/hal/local/loaders:embedded_elf_loader"],
+ "//conditions:default": [],
+ }) + select({
+ ":system-library_enabled": ["//runtime/src/iree/hal/local/loaders:system_library_loader"],
+ "//conditions:default": [],
+ }) + select({
+ ":vmvx-module_enabled": ["//runtime/src/iree/hal/local/loaders:vmvx_module_loader"],
+ "//conditions:default": [],
+ }),
)
diff --git a/runtime/src/iree/hal/local/loaders/registration/CMakeLists.txt b/runtime/src/iree/hal/local/loaders/registration/CMakeLists.txt
index ede96f6..a808483 100644
--- a/runtime/src/iree/hal/local/loaders/registration/CMakeLists.txt
+++ b/runtime/src/iree/hal/local/loaders/registration/CMakeLists.txt
@@ -5,8 +5,8 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
set(IREE_HAL_EXECUTABLE_LOADER_MODULES)
-if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
- list(APPEND IREE_HAL_EXECUTABLE_LOADER_MODULES iree::hal::local::loaders::embedded_library_loader)
+if(IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
+ list(APPEND IREE_HAL_EXECUTABLE_LOADER_MODULES iree::hal::local::loaders::embedded_elf_loader)
endif()
if(IREE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY)
list(APPEND IREE_HAL_EXECUTABLE_LOADER_MODULES iree::hal::local::loaders::system_library_loader)
diff --git a/runtime/src/iree/hal/local/loaders/registration/init.c b/runtime/src/iree/hal/local/loaders/registration/init.c
index 94767c2..33d31ac 100644
--- a/runtime/src/iree/hal/local/loaders/registration/init.c
+++ b/runtime/src/iree/hal/local/loaders/registration/init.c
@@ -8,16 +8,16 @@
// NOTE: we register in a specific order to allow for prioritization:
// - system-library: used when embedded is not desired (TSAN/debugging/etc).
-// - embedded-library: default codegen portable ELF output format.
+// - embedded-elf: default codegen portable ELF output format.
// - vmvx-module: reference fallback path using the IREE bytecode VM.
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY)
#include "iree/hal/local/loaders/system_library_loader.h"
#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY
-#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
-#include "iree/hal/local/loaders/embedded_library_loader.h"
-#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY
+#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
+#include "iree/hal/local/loaders/embedded_elf_loader.h"
+#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_VMVX_MODULE)
#include "iree/hal/local/loaders/vmvx_module_loader.h"
@@ -34,9 +34,9 @@
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY)
++required_capacity;
#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY
-#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
+#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
++required_capacity;
-#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY
+#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_VMVX_MODULE)
++required_capacity;
#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_VMVX_MODULE
@@ -57,13 +57,13 @@
}
#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY
-#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
+#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
if (iree_status_is_ok(status)) {
- status = iree_hal_embedded_library_loader_create(
+ status = iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator,
&loaders[count++]);
}
-#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY
+#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_VMVX_MODULE)
if (iree_status_is_ok(status)) {
@@ -85,13 +85,13 @@
IREE_API_EXPORT iree_status_t iree_hal_create_executable_loader_by_name(
iree_string_view_t name, iree_allocator_t host_allocator,
iree_hal_executable_loader_t** out_executable_loader) {
-#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY)
+#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF)
if (iree_string_view_starts_with(name, IREE_SV("embedded-elf"))) {
- return iree_hal_embedded_library_loader_create(
+ return iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator,
out_executable_loader);
}
-#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY
+#endif // IREE_HAVE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF
#if defined(IREE_HAVE_HAL_EXECUTABLE_LOADER_SYSTEM_LIBRARY)
if (iree_string_view_starts_with(name, IREE_SV("system-library"))) {
diff --git a/runtime/src/iree/hal/local/loaders/system_library_loader.c b/runtime/src/iree/hal/local/loaders/system_library_loader.c
index ebd0213..7590e8a 100644
--- a/runtime/src/iree/hal/local/loaders/system_library_loader.c
+++ b/runtime/src/iree/hal/local/loaders/system_library_loader.c
@@ -477,7 +477,7 @@
iree_hal_executable_loader_t* base_executable_loader,
iree_hal_executable_caching_mode_t caching_mode,
iree_string_view_t executable_format) {
- return iree_string_view_equal(
+ return iree_string_view_starts_with(
executable_format,
iree_make_cstring_view("system-" IREE_PLATFORM_DYLIB_TYPE "-" IREE_ARCH));
}
diff --git a/samples/simple_embedding/BUILD b/samples/simple_embedding/BUILD
index 4d566d5..b58e2c2 100644
--- a/samples/simple_embedding/BUILD
+++ b/samples/simple_embedding/BUILD
@@ -88,7 +88,7 @@
"//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_library_loader",
+ "//runtime/src/iree/hal/local/loaders:embedded_elf_loader",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:bytecode_module",
@@ -203,7 +203,7 @@
"//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_library_loader",
+ "//runtime/src/iree/hal/local/loaders:embedded_elf_loader",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/task:api",
"//runtime/src/iree/vm",
diff --git a/samples/simple_embedding/CMakeLists.txt b/samples/simple_embedding/CMakeLists.txt
index a09afff..56899e0 100644
--- a/samples/simple_embedding/CMakeLists.txt
+++ b/samples/simple_embedding/CMakeLists.txt
@@ -73,7 +73,7 @@
iree::hal
iree::hal::drivers::local_sync::sync_driver
iree::hal::local
- iree::hal::local::loaders::embedded_library_loader
+ iree::hal::local::loaders::embedded_elf_loader
iree::modules::hal
iree::vm
iree::vm::bytecode_module
@@ -199,7 +199,7 @@
iree::hal
iree::hal::drivers::local_task::task_driver
iree::hal::local
- iree::hal::local::loaders::embedded_library_loader
+ iree::hal::local::loaders::embedded_elf_loader
iree::modules::hal
iree::task::api
iree::vm
diff --git a/samples/simple_embedding/README.md b/samples/simple_embedding/README.md
index 7c5fd68..d9081cb 100644
--- a/samples/simple_embedding/README.md
+++ b/samples/simple_embedding/README.md
@@ -64,7 +64,7 @@
iree_hal_sync_device_params_t params;
iree_hal_sync_device_params_initialize(¶ms);
iree_hal_executable_loader_t* loader = NULL;
- IREE_RETURN_IF_ERROR(iree_hal_embedded_library_loader_create(
+ IREE_RETURN_IF_ERROR(iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), iree_allocator_system(),
&loader));
diff --git a/samples/simple_embedding/device_dylib.c b/samples/simple_embedding/device_dylib.c
index 89a6e9f..3e13118 100644
--- a/samples/simple_embedding/device_dylib.c
+++ b/samples/simple_embedding/device_dylib.c
@@ -12,7 +12,7 @@
#include "iree/hal/api.h"
#include "iree/hal/drivers/local_task/task_device.h"
#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/embedded_library_loader.h"
+#include "iree/hal/local/loaders/embedded_elf_loader.h"
#include "iree/task/api.h"
// Compiled module embedded here to avoid file IO:
@@ -27,7 +27,7 @@
iree_hal_task_device_params_initialize(¶ms);
iree_hal_executable_loader_t* loader = NULL;
- IREE_RETURN_IF_ERROR(iree_hal_embedded_library_loader_create(
+ IREE_RETURN_IF_ERROR(iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator, &loader));
iree_task_executor_t* executor = NULL;
diff --git a/samples/simple_embedding/device_embedded_sync.c b/samples/simple_embedding/device_embedded_sync.c
index d71dfb0..eee1746 100644
--- a/samples/simple_embedding/device_embedded_sync.c
+++ b/samples/simple_embedding/device_embedded_sync.c
@@ -12,7 +12,7 @@
#include "iree/hal/api.h"
#include "iree/hal/drivers/local_sync/sync_device.h"
#include "iree/hal/local/executable_loader.h"
-#include "iree/hal/local/loaders/embedded_library_loader.h"
+#include "iree/hal/local/loaders/embedded_elf_loader.h"
// Compiled module embedded here to avoid file IO:
#if IREE_ARCH_ARM_32
@@ -34,7 +34,7 @@
iree_hal_sync_device_params_initialize(¶ms);
iree_hal_executable_loader_t* loader = NULL;
- IREE_RETURN_IF_ERROR(iree_hal_embedded_library_loader_create(
+ IREE_RETURN_IF_ERROR(iree_hal_embedded_elf_loader_create(
iree_hal_executable_import_provider_null(), host_allocator, &loader));
// Use the default host allocator for buffer allocations.
diff --git a/tools/build_config_template.txt.in b/tools/build_config_template.txt.in
index 2d10c2c..ada1acd 100644
--- a/tools/build_config_template.txt.in
+++ b/tools/build_config_template.txt.in
@@ -8,7 +8,7 @@
IREE_HAL_DRIVER_LOCAL_TASK=${IREE_HAL_DRIVER_LOCAL_TASK}
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_LIBRARY=${IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_LIBRARY}
+IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF=${IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF}
IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=${IREE_HAL_EXECUTABLE_LOADER_VMVX_MODULE}
IREE_TARGET_BACKEND_DYLIB-LLVM-AOT=${IREE_TARGET_BACKEND_DYLIB-LLVM-AOT}
IREE_TARGET_BACKEND_METAL-SPIRV=${IREE_TARGET_BACKEND_METAL-SPIRV}