Removing iree_hal_driver_id_t in favor of just string names. (#9389)

Progress on #9343 (URI schemas => driver names).
diff --git a/build_tools/cmake/iree_hal_cts_test_suite.cmake b/build_tools/cmake/iree_hal_cts_test_suite.cmake
index 7b76720..7c8f2fe 100644
--- a/build_tools/cmake/iree_hal_cts_test_suite.cmake
+++ b/build_tools/cmake/iree_hal_cts_test_suite.cmake
@@ -13,7 +13,7 @@
 #
 # Parameters:
 #   DRIVER_NAME: The name of the driver to test. Used for both target names and
-#       for `iree_hal_driver_registry_try_create_by_name()` within test code.
+#       for `iree_hal_driver_registry_try_create()` within test code.
 #   VARIANT_SUFFIX: Suffix to add to the test names, separate from the driver
 #       name. Useful when specifying multiple configurations using `ARGS` or
 #       other parameters.
diff --git a/compiler/src/iree/compiler/ConstEval/Runtime.cpp b/compiler/src/iree/compiler/ConstEval/Runtime.cpp
index 6aa3867..4d1ba31 100644
--- a/compiler/src/iree/compiler/ConstEval/Runtime.cpp
+++ b/compiler/src/iree/compiler/ConstEval/Runtime.cpp
@@ -264,7 +264,7 @@
 
   // Create driver and device.
   iree_hal_driver_t* driver = nullptr;
-  IREE_CHECK_OK(iree_hal_driver_registry_try_create_by_name(
+  IREE_CHECK_OK(iree_hal_driver_registry_try_create(
       runtime.registry, iree_make_cstring_view("local-task"),
       iree_allocator_system(), &driver));
   IREE_CHECK_OK(iree_hal_driver_create_default_device(
diff --git a/docs/website/docs/bindings/c-api.md b/docs/website/docs/bindings/c-api.md
index f1a5009..e976bf1 100644
--- a/docs/website/docs/bindings/c-api.md
+++ b/docs/website/docs/bindings/c-api.md
@@ -112,7 +112,7 @@
 // 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_CHECK_OK(iree_hal_driver_registry_try_create(
     iree_hal_driver_registry_default(),
     iree_string_view_literal("local-task"),
     iree_allocator_system(), &driver));
diff --git a/experimental/rocm/registration/driver_module.c b/experimental/rocm/registration/driver_module.c
index 8b4b9cc..7835eb0 100644
--- a/experimental/rocm/registration/driver_module.c
+++ b/experimental/rocm/registration/driver_module.c
@@ -13,14 +13,11 @@
 #include "iree/base/api.h"
 #include "iree/base/tracing.h"
 
-#define IREE_HAL_ROCM_DRIVER_ID 0x524f434d0au  // ROCM
-
 static iree_status_t iree_hal_rocm_driver_factory_enumerate(
     void *self, const iree_hal_driver_info_t **out_driver_infos,
     iree_host_size_t *out_driver_info_count) {
   // NOTE: we could query supported ROCM versions or featuresets here.
   static const iree_hal_driver_info_t driver_infos[1] = {{
-      .driver_id = IREE_HAL_ROCM_DRIVER_ID,
       .driver_name = iree_string_view_literal("rocm"),
       .full_name = iree_string_view_literal("ROCM (dynamic)"),
   }};
@@ -30,25 +27,20 @@
 }
 
 static iree_status_t iree_hal_rocm_driver_factory_try_create(
-    void *self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
+    void *self, iree_string_view_t driver_name, iree_allocator_t host_allocator,
     iree_hal_driver_t **out_driver) {
   IREE_ASSERT_ARGUMENT(out_driver);
   *out_driver = NULL;
-  if (driver_id != IREE_HAL_ROCM_DRIVER_ID) {
+  if (!iree_string_view_equal(driver_name, IREE_SV("rocm"))) {
     return iree_make_status(IREE_STATUS_UNAVAILABLE,
-                            "no driver with ID %016" PRIu64
-                            " is provided by this factory",
-                            driver_id);
+                            "no driver '%.*s' is provided by this factory",
+                            (int)driver_name.size, driver_name.data);
   }
   IREE_TRACE_ZONE_BEGIN(z0);
-  // When we expose more than one driver (different rocm versions, etc) we
-  // can name them here:
-  iree_string_view_t identifier = iree_make_cstring_view("rocm");
-
   iree_hal_rocm_driver_options_t driver_options;
   iree_hal_rocm_driver_options_initialize(&driver_options);
   iree_status_t status = iree_hal_rocm_driver_create(
-      identifier, &driver_options, host_allocator, out_driver);
+      driver_name, &driver_options, host_allocator, out_driver);
   IREE_TRACE_ZONE_END(z0);
   return status;
 }
diff --git a/runtime/bindings/python/hal.cc b/runtime/bindings/python/hal.cc
index 6983d4e..234aa63 100644
--- a/runtime/bindings/python/hal.cc
+++ b/runtime/bindings/python/hal.cc
@@ -228,7 +228,7 @@
 
 HalDriver HalDriver::Create(const std::string& driver_name) {
   iree_hal_driver_t* driver;
-  CheckApiStatus(iree_hal_driver_registry_try_create_by_name(
+  CheckApiStatus(iree_hal_driver_registry_try_create(
                      iree_hal_driver_registry_default(),
                      {driver_name.data(), driver_name.size()},
                      iree_allocator_system(), &driver),
diff --git a/runtime/bindings/tflite/interpreter.c b/runtime/bindings/tflite/interpreter.c
index b98c2b4..28c132a 100644
--- a/runtime/bindings/tflite/interpreter.c
+++ b/runtime/bindings/tflite/interpreter.c
@@ -48,7 +48,7 @@
 
   // TODO(benvanik): switch to iree_hal_driver_registry_try_create when
   // implemented.
-  iree_status_t status = iree_hal_driver_registry_try_create_by_name(
+  iree_status_t status = iree_hal_driver_registry_try_create(
       driver_registry, driver_name, interpreter->allocator,
       &interpreter->driver);
   iree_allocator_free(interpreter->allocator, driver_infos);
diff --git a/runtime/src/iree/hal/cts/cts_test_base.h b/runtime/src/iree/hal/cts/cts_test_base.h
index 32e4431..faf6cb7 100644
--- a/runtime/src/iree/hal/cts/cts_test_base.h
+++ b/runtime/src/iree/hal/cts/cts_test_base.h
@@ -148,7 +148,7 @@
 
     // No existing driver, attempt to create.
     iree_hal_driver_t* driver = NULL;
-    iree_status_t status = iree_hal_driver_registry_try_create_by_name(
+    iree_status_t status = iree_hal_driver_registry_try_create(
         iree_hal_driver_registry_default(),
         iree_make_string_view(driver_name.data(), driver_name.size()),
         iree_allocator_system(), &driver);
diff --git a/runtime/src/iree/hal/driver.c b/runtime/src/iree/hal/driver.c
index cb1f9a8..31acb22 100644
--- a/runtime/src/iree/hal/driver.c
+++ b/runtime/src/iree/hal/driver.c
@@ -53,7 +53,7 @@
   *out_device = NULL;
   IREE_TRACE_ZONE_BEGIN(z0);
   iree_status_t status = _VTABLE_DISPATCH(driver, create_device)(
-      driver, IREE_HAL_DRIVER_ID_INVALID, host_allocator, out_device);
+      driver, IREE_HAL_DEVICE_ID_INVALID, host_allocator, out_device);
   IREE_TRACE_ZONE_END(z0);
   return status;
 }
diff --git a/runtime/src/iree/hal/driver.h b/runtime/src/iree/hal/driver.h
index cb7390a..105f07d 100644
--- a/runtime/src/iree/hal/driver.h
+++ b/runtime/src/iree/hal/driver.h
@@ -22,11 +22,6 @@
 // Types and Enums
 //===----------------------------------------------------------------------===//
 
-// An opaque factory-specific handle to identify different drivers.
-typedef uint64_t iree_hal_driver_id_t;
-
-#define IREE_HAL_DRIVER_ID_INVALID 0ull
-
 // Describes a driver providing device enumeration and creation.
 // The lifetime of memory referenced by this structure (such as strings) is
 // dependent on where it originated.
@@ -40,9 +35,6 @@
 typedef struct iree_hal_driver_info_t {
   IREE_API_UNSTABLE
 
-  // Opaque handle used by factories. Unique across all factories.
-  iree_hal_driver_id_t driver_id;
-
   // Canonical name of the driver as used in command lines, documentation, etc.
   // Examples: 'metal', 'vulkan'
   iree_string_view_t driver_name;
diff --git a/runtime/src/iree/hal/driver_registry.c b/runtime/src/iree/hal/driver_registry.c
index e1f6013..81c0bf5 100644
--- a/runtime/src/iree/hal/driver_registry.c
+++ b/runtime/src/iree/hal/driver_registry.c
@@ -262,40 +262,6 @@
 }
 
 IREE_API_EXPORT iree_status_t iree_hal_driver_registry_try_create(
-    iree_hal_driver_registry_t* registry, iree_hal_driver_id_t driver_id,
-    iree_allocator_t host_allocator, iree_hal_driver_t** out_driver) {
-  IREE_ASSERT_ARGUMENT(registry);
-  if (driver_id == IREE_HAL_DRIVER_ID_INVALID) {
-    return iree_make_status(IREE_STATUS_INVALID_ARGUMENT, "invalid driver id");
-  }
-  IREE_TRACE_ZONE_BEGIN(z0);
-  IREE_TRACE_ZONE_APPEND_VALUE(z0, driver_id);
-
-  *out_driver = NULL;
-
-  iree_status_t status = iree_ok_status();
-  iree_slim_mutex_lock(&registry->mutex);
-
-  // TODO(benvanik): figure out a good way of lining this up. The issue is that
-  // the driver_id is something we return during enumeration but we really
-  // want it to be something dynamic. We could pack an epoch into it that is
-  // bumped each time the registry factory list is modified so we could tell
-  // when a factory was added/removed, etc. So:
-  //   driver_id = [3 byte epoch] [1 byte index into factory list] [4 byte id]
-  // Not sure which status code to return if the epoch is a mismatch, maybe
-  // IREE_STATUS_UNAVAILABLE? If you are mutating the registry from multiple
-  // threads while also enumerating, that may just be enough of a footgun to
-  // bail and force the caller to resolve :)
-  status =
-      iree_make_status(IREE_STATUS_UNIMPLEMENTED, "driver creation by id nyi");
-
-  iree_slim_mutex_unlock(&registry->mutex);
-
-  IREE_TRACE_ZONE_END(z0);
-  return status;
-}
-
-IREE_API_EXPORT iree_status_t iree_hal_driver_registry_try_create_by_name(
     iree_hal_driver_registry_t* registry, iree_string_view_t driver_name,
     iree_allocator_t host_allocator, iree_hal_driver_t** out_driver) {
   IREE_ASSERT_ARGUMENT(registry);
@@ -314,7 +280,6 @@
   // NOTE: we scan in reverse so that we prefer the first hit in the most
   // recently registered factory.
   const iree_hal_driver_factory_t* hit_factory = NULL;
-  iree_hal_driver_id_t hit_driver_id = IREE_HAL_DRIVER_ID_INVALID;
   for (iree_host_size_t i = 0; i < registry->factory_count; ++i) {
     // Reach inside and grab the internal factory data structures.
     const iree_hal_driver_factory_t* factory =
@@ -333,20 +298,19 @@
           &driver_infos[driver_info_count - j - 1];
       if (iree_string_view_equal(driver_name, driver_info->driver_name)) {
         hit_factory = factory;
-        hit_driver_id = driver_info->driver_id;
         break;
       }
     }
     // Since we are scanning in reverse we stop searching when we find the first
     // hit (aka the most recently added driver).
-    if (hit_driver_id != IREE_HAL_DRIVER_ID_INVALID) break;
+    if (hit_factory != NULL) break;
   }
 
   // If we found a driver during the scan try to create it now.
   // This may block the caller (with the lock held!), and may fail if for
   // example a delay-loaded driver cannot be created even if it was enumerated.
-  if (hit_driver_id != IREE_HAL_DRIVER_ID_INVALID) {
-    status = hit_factory->try_create(hit_factory->self, hit_driver_id,
+  if (hit_factory != NULL) {
+    status = hit_factory->try_create(hit_factory->self, driver_name,
                                      host_allocator, out_driver);
   } else {
     status =
diff --git a/runtime/src/iree/hal/driver_registry.h b/runtime/src/iree/hal/driver_registry.h
index c6c36b4..65e055e 100644
--- a/runtime/src/iree/hal/driver_registry.h
+++ b/runtime/src/iree/hal/driver_registry.h
@@ -68,7 +68,7 @@
   //
   // Called with the driver registry lock held; may be called from any thread.
   iree_status_t(IREE_API_PTR* try_create)(void* self,
-                                          iree_hal_driver_id_t driver_id,
+                                          iree_string_view_t driver_name,
                                           iree_allocator_t host_allocator,
                                           iree_hal_driver_t** out_driver);
 } iree_hal_driver_factory_t;
@@ -138,17 +138,6 @@
     iree_hal_driver_info_t** out_driver_infos,
     iree_host_size_t* out_driver_info_count);
 
-// Attempts to create a driver registered with the driver registry by a specific
-// ID as returned during enumeration in iree_hal_driver_info_t::driver_id.
-// This can be used to specify the exact driver to create in cases where there
-// may be multiple factories providing drivers with the same name.
-//
-// Thread-safe. May block the caller if the driver is delay-loaded and needs to
-// perform additional loading/verification/etc before returning.
-IREE_API_EXPORT iree_status_t iree_hal_driver_registry_try_create(
-    iree_hal_driver_registry_t* registry, iree_hal_driver_id_t driver_id,
-    iree_allocator_t host_allocator, iree_hal_driver_t** out_driver);
-
 // Attempts to create a driver registered with the given canonical driver name.
 // Effectively enumerate + find by name + try_create if found. Factories are
 // searched in most-recently-added order such that it's possible to override
@@ -157,7 +146,7 @@
 //
 // Thread-safe. May block the caller if the driver is delay-loaded and needs to
 // perform additional loading/verification/etc before returning.
-IREE_API_EXPORT iree_status_t iree_hal_driver_registry_try_create_by_name(
+IREE_API_EXPORT iree_status_t iree_hal_driver_registry_try_create(
     iree_hal_driver_registry_t* registry, iree_string_view_t driver_name,
     iree_allocator_t host_allocator, iree_hal_driver_t** out_driver);
 
diff --git a/runtime/src/iree/hal/drivers/cuda/registration/driver_module.c b/runtime/src/iree/hal/drivers/cuda/registration/driver_module.c
index 27cf2f3..cf7d1ce 100644
--- a/runtime/src/iree/hal/drivers/cuda/registration/driver_module.c
+++ b/runtime/src/iree/hal/drivers/cuda/registration/driver_module.c
@@ -14,8 +14,6 @@
 #include "iree/base/tracing.h"
 #include "iree/hal/drivers/cuda/api.h"
 
-#define IREE_HAL_CUDA_DRIVER_ID 0x43554441u  // CUDA
-
 // Force using CUDA streams until we support command buffer caching to avoid the
 // overhead of graph creation.
 IREE_FLAG(
@@ -33,7 +31,6 @@
     iree_host_size_t* out_driver_info_count) {
   // NOTE: we could query supported cuda versions or featuresets here.
   static const iree_hal_driver_info_t driver_infos[1] = {{
-      .driver_id = IREE_HAL_CUDA_DRIVER_ID,
       .driver_name = iree_string_view_literal("cuda"),
       .full_name = iree_string_view_literal("CUDA (dynamic)"),
   }};
@@ -43,15 +40,14 @@
 }
 
 static iree_status_t iree_hal_cuda_driver_factory_try_create(
-    void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
+    void* self, iree_string_view_t driver_name, iree_allocator_t host_allocator,
     iree_hal_driver_t** out_driver) {
   IREE_ASSERT_ARGUMENT(out_driver);
   *out_driver = NULL;
-  if (driver_id != IREE_HAL_CUDA_DRIVER_ID) {
+  if (!iree_string_view_equal(driver_name, IREE_SV("cuda"))) {
     return iree_make_status(IREE_STATUS_UNAVAILABLE,
-                            "no driver with ID %016" PRIu64
-                            " is provided by this factory",
-                            driver_id);
+                            "no driver '%.*s' is provided by this factory",
+                            (int)driver_name.size, driver_name.data);
   }
   IREE_TRACE_ZONE_BEGIN(z0);
 
@@ -67,9 +63,9 @@
   iree_hal_cuda_driver_options_initialize(&driver_options);
   driver_options.default_device_index = FLAG_cuda_default_index;
 
-  iree_string_view_t identifier = iree_make_cstring_view("cuda");
-  iree_status_t status = iree_hal_cuda_driver_create(
-      identifier, &default_params, &driver_options, host_allocator, out_driver);
+  iree_status_t status =
+      iree_hal_cuda_driver_create(driver_name, &default_params, &driver_options,
+                                  host_allocator, out_driver);
   IREE_TRACE_ZONE_END(z0);
   return status;
 }
diff --git a/runtime/src/iree/hal/drivers/local_sync/registration/driver_module.c b/runtime/src/iree/hal/drivers/local_sync/registration/driver_module.c
index 5304c29..eab407d 100644
--- a/runtime/src/iree/hal/drivers/local_sync/registration/driver_module.c
+++ b/runtime/src/iree/hal/drivers/local_sync/registration/driver_module.c
@@ -13,13 +13,10 @@
 #include "iree/hal/drivers/local_sync/sync_driver.h"
 #include "iree/hal/local/loaders/registration/init.h"
 
-#define IREE_HAL_LOCAL_SYNC_DRIVER_ID 0x53594E43u  // SYNC
-
 static iree_status_t iree_hal_local_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_LOCAL_SYNC_DRIVER_ID,
       .driver_name = IREE_SVL("local-sync"),
       .full_name = IREE_SVL("Local executable execution using a lightweight "
                             "inline synchronous queue"),
@@ -30,13 +27,12 @@
 }
 
 static iree_status_t iree_hal_local_sync_driver_factory_try_create(
-    void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
+    void* self, iree_string_view_t driver_name, iree_allocator_t host_allocator,
     iree_hal_driver_t** out_driver) {
-  if (driver_id != IREE_HAL_LOCAL_SYNC_DRIVER_ID) {
+  if (!iree_string_view_equal(driver_name, IREE_SV("local-sync"))) {
     return iree_make_status(IREE_STATUS_UNAVAILABLE,
-                            "no driver with ID %016" PRIu64
-                            " is provided by this factory",
-                            driver_id);
+                            "no driver '%.*s' is provided by this factory",
+                            (int)driver_name.size, driver_name.data);
   }
 
   iree_hal_sync_device_params_t default_params;
@@ -56,8 +52,8 @@
 
   if (iree_status_is_ok(status)) {
     status = iree_hal_sync_driver_create(
-        iree_make_cstring_view("local-sync"), &default_params, loader_count,
-        loaders, device_allocator, host_allocator, out_driver);
+        driver_name, &default_params, loader_count, loaders, device_allocator,
+        host_allocator, out_driver);
   }
 
   iree_hal_allocator_release(device_allocator);
diff --git a/runtime/src/iree/hal/drivers/local_task/registration/driver_module.c b/runtime/src/iree/hal/drivers/local_task/registration/driver_module.c
index 8896baa..393b6bb 100644
--- a/runtime/src/iree/hal/drivers/local_task/registration/driver_module.c
+++ b/runtime/src/iree/hal/drivers/local_task/registration/driver_module.c
@@ -14,14 +14,11 @@
 #include "iree/hal/local/loaders/registration/init.h"
 #include "iree/task/api.h"
 
-#define IREE_HAL_LOCAL_TASK_DRIVER_ID 0x5441534Bu  // TASK
-
 static iree_status_t iree_hal_local_task_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_LOCAL_TASK_DRIVER_ID,
           .driver_name = IREE_SVL("local-task"),
           .full_name = IREE_SVL("Local executable execution using the "
                                 "IREE multithreading task system"),
@@ -33,13 +30,12 @@
 }
 
 static iree_status_t iree_hal_local_task_driver_factory_try_create(
-    void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
+    void* self, iree_string_view_t driver_name, iree_allocator_t host_allocator,
     iree_hal_driver_t** out_driver) {
-  if (driver_id != IREE_HAL_LOCAL_TASK_DRIVER_ID) {
+  if (!iree_string_view_equal(driver_name, IREE_SV("local-task"))) {
     return iree_make_status(IREE_STATUS_UNAVAILABLE,
-                            "no driver with ID %016" PRIu64
-                            " is provided by this factory",
-                            driver_id);
+                            "no driver '%.*s' is provided by this factory",
+                            (int)driver_name.size, driver_name.data);
   }
 
   iree_hal_task_device_params_t default_params;
@@ -64,8 +60,8 @@
 
   if (iree_status_is_ok(status)) {
     status = iree_hal_task_driver_create(
-        iree_make_cstring_view("local-task"), &default_params, executor,
-        loader_count, loaders, device_allocator, host_allocator, out_driver);
+        driver_name, &default_params, executor, loader_count, loaders,
+        device_allocator, host_allocator, out_driver);
   }
 
   iree_hal_allocator_release(device_allocator);
diff --git a/runtime/src/iree/hal/drivers/vulkan/registration/driver_module.cc b/runtime/src/iree/hal/drivers/vulkan/registration/driver_module.cc
index d280779..b4dce37 100644
--- a/runtime/src/iree/hal/drivers/vulkan/registration/driver_module.cc
+++ b/runtime/src/iree/hal/drivers/vulkan/registration/driver_module.cc
@@ -14,8 +14,6 @@
 #include "iree/base/tracing.h"
 #include "iree/hal/drivers/vulkan/api.h"
 
-#define IREE_HAL_VULKAN_1_X_DRIVER_ID 0x564C4B31u  // VLK1
-
 IREE_FLAG(bool, vulkan_validation_layers, true,
           "Enables standard Vulkan validation layers.");
 IREE_FLAG(bool, vulkan_debug_utils, true,
@@ -79,7 +77,6 @@
     iree_host_size_t* out_driver_info_count) {
   // NOTE: we could query supported vulkan versions or featuresets here.
   static const iree_hal_driver_info_t driver_infos[1] = {{
-      /*driver_id=*/IREE_HAL_VULKAN_1_X_DRIVER_ID,
       /*driver_name=*/iree_make_cstring_view("vulkan"),
       /*full_name=*/iree_make_cstring_view("Vulkan 1.x (dynamic)"),
   }};
@@ -89,20 +86,14 @@
 }
 
 static iree_status_t iree_hal_vulkan_driver_factory_try_create(
-    void* self, iree_hal_driver_id_t driver_id, iree_allocator_t host_allocator,
+    void* self, iree_string_view_t driver_name, iree_allocator_t host_allocator,
     iree_hal_driver_t** out_driver) {
-  if (driver_id != IREE_HAL_VULKAN_1_X_DRIVER_ID) {
+  if (!iree_string_view_equal(driver_name, IREE_SV("vulkan"))) {
     return iree_make_status(IREE_STATUS_UNAVAILABLE,
-                            "no driver with ID %016" PRIu64
-                            " is provided by this factory",
-                            driver_id);
+                            "no driver '%.*s' is provided by this factory",
+                            (int)driver_name.size, driver_name.data);
   }
-
-  // When we expose more than one driver (different vulkan versions, etc) we
-  // can name them here:
-  iree_string_view_t identifier = iree_make_cstring_view("vulkan");
-
-  return iree_hal_vulkan_create_driver_with_flags(identifier, host_allocator,
+  return iree_hal_vulkan_create_driver_with_flags(driver_name, host_allocator,
                                                   out_driver);
 }
 
diff --git a/runtime/src/iree/modules/check/check_test.cc b/runtime/src/iree/modules/check/check_test.cc
index 5388944..bb353b6 100644
--- a/runtime/src/iree/modules/check/check_test.cc
+++ b/runtime/src/iree/modules/check/check_test.cc
@@ -35,7 +35,7 @@
     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_ASSERT_OK(iree_hal_driver_registry_try_create(
         iree_hal_driver_registry_default(),
         iree_make_cstring_view("local-task"), iree_allocator_system(),
         &hal_driver));
diff --git a/runtime/src/iree/runtime/instance.c b/runtime/src/iree/runtime/instance.c
index 352bfc5..3bf51f4 100644
--- a/runtime/src/iree/runtime/instance.c
+++ b/runtime/src/iree/runtime/instance.c
@@ -153,8 +153,8 @@
       iree_runtime_instance_host_allocator(instance);
   iree_hal_driver_t* driver = NULL;
   IREE_RETURN_AND_END_ZONE_IF_ERROR(
-      z0, iree_hal_driver_registry_try_create_by_name(
-              driver_registry, driver_name, host_allocator, &driver));
+      z0, iree_hal_driver_registry_try_create(driver_registry, driver_name,
+                                              host_allocator, &driver));
 
   // Create the default device on that driver.
   iree_status_t status =
diff --git a/runtime/src/iree/tools/utils/trace_replay.c b/runtime/src/iree/tools/utils/trace_replay.c
index a05c99e..0e0a43f 100644
--- a/runtime/src/iree/tools/utils/trace_replay.c
+++ b/runtime/src/iree/tools/utils/trace_replay.c
@@ -79,7 +79,7 @@
 
   // Try to create a device from the driver.
   iree_hal_driver_t* driver = NULL;
-  IREE_RETURN_IF_ERROR(iree_hal_driver_registry_try_create_by_name(
+  IREE_RETURN_IF_ERROR(iree_hal_driver_registry_try_create(
       iree_hal_driver_registry_default(), driver_name, host_allocator,
       &driver));
   iree_status_t status =
diff --git a/runtime/src/iree/tools/utils/vm_util.cc b/runtime/src/iree/tools/utils/vm_util.cc
index 27f6037..190d9ba 100644
--- a/runtime/src/iree/tools/utils/vm_util.cc
+++ b/runtime/src/iree/tools/utils/vm_util.cc
@@ -240,11 +240,11 @@
 Status CreateDevice(const char* driver_name, iree_hal_device_t** out_device) {
   IREE_LOG(INFO) << "Creating driver and device for '" << driver_name << "'...";
   iree_hal_driver_t* driver = nullptr;
-  IREE_RETURN_IF_ERROR(iree_hal_driver_registry_try_create_by_name(
-                           iree_hal_driver_registry_default(),
-                           iree_make_cstring_view(driver_name),
-                           iree_allocator_system(), &driver),
-                       "creating driver '%s'", driver_name);
+  IREE_RETURN_IF_ERROR(
+      iree_hal_driver_registry_try_create(iree_hal_driver_registry_default(),
+                                          iree_make_cstring_view(driver_name),
+                                          iree_allocator_system(), &driver),
+      "creating driver '%s'", driver_name);
   IREE_RETURN_IF_ERROR(iree_hal_driver_create_default_device(
                            driver, iree_allocator_system(), out_device),
                        "creating default device for driver '%s'", driver_name);
diff --git a/samples/simple_embedding/device_cuda.c b/samples/simple_embedding/device_cuda.c
index e864c9c..be70f0c 100644
--- a/samples/simple_embedding/device_cuda.c
+++ b/samples/simple_embedding/device_cuda.c
@@ -24,7 +24,7 @@
   // Create the HAL driver from the name.
   iree_hal_driver_t* driver = NULL;
   iree_string_view_t identifier = iree_make_cstring_view("cuda");
-  iree_status_t status = iree_hal_driver_registry_try_create_by_name(
+  iree_status_t status = iree_hal_driver_registry_try_create(
       iree_hal_driver_registry_default(), identifier, host_allocator, &driver);
 
   // Create the default device (primary GPU).
diff --git a/samples/simple_embedding/device_vulkan.c b/samples/simple_embedding/device_vulkan.c
index becea49..424144e 100644
--- a/samples/simple_embedding/device_vulkan.c
+++ b/samples/simple_embedding/device_vulkan.c
@@ -24,7 +24,7 @@
   // Create the HAL driver from the name.
   iree_hal_driver_t* driver = NULL;
   iree_string_view_t identifier = iree_make_cstring_view("vulkan");
-  iree_status_t status = iree_hal_driver_registry_try_create_by_name(
+  iree_status_t status = iree_hal_driver_registry_try_create(
       iree_hal_driver_registry_default(), identifier, host_allocator, &driver);
 
   // Create the default device (primary GPU).