Removing the use of hal.ex.shared_device from tensorlist. (#6241)

diff --git a/iree/compiler/Dialect/HAL/Utils/TypeUtils.cpp b/iree/compiler/Dialect/HAL/Utils/TypeUtils.cpp
index bc2937a..0c923bf 100644
--- a/iree/compiler/Dialect/HAL/Utils/TypeUtils.cpp
+++ b/iree/compiler/Dialect/HAL/Utils/TypeUtils.cpp
@@ -103,9 +103,8 @@
   if (!elementType) return {};
   auto shape = IREE::HAL::getShapeDims(loc, value, builder);
   if (!shape) return {};
-  auto deviceValue = builder.createOrFold<IREE::HAL::ExSharedDeviceOp>(loc);
-  auto allocatorValue =
-      builder.createOrFold<IREE::HAL::DeviceAllocatorOp>(loc, deviceValue);
+  auto allocatorValue = builder.createOrFold<IREE::HAL::BufferAllocatorOp>(
+      loc, IREE::HAL::AllocatorType::get(builder.getContext()), value);
   return builder.createOrFold<IREE::HAL::AllocatorComputeSizeOp>(
       loc, allocatorValue, *shape, elementType.getValue());
 }