Making iree_hal_dim_t track iree_device_size_t, and making that size_t.
This is the least surprising behavior while still allowing overriding
of the sizes via custom configuration. dim is tied to size because they
both come from index in MLIR.
diff --git a/runtime/bindings/python/vm.cc b/runtime/bindings/python/vm.cc
index d5b7cc6..9a268c1 100644
--- a/runtime/bindings/python/vm.cc
+++ b/runtime/bindings/python/vm.cc
@@ -318,7 +318,7 @@
// Extract dims from the buffer view.
size_t rank = 0;
- std::vector<int32_t> dims(6);
+ std::vector<iree_hal_dim_t> dims(6);
iree_status_t status = iree_hal_buffer_view_shape(
buffer_view, dims.capacity(), dims.data(), &rank);
if (iree_status_is_out_of_range(status)) {
@@ -436,7 +436,8 @@
} else if (iree_hal_buffer_view_isa(variant.ref)) {
auto hal_bv = iree_hal_buffer_view_deref(variant.ref);
out += "HalBufferView(";
- std::vector<int32_t> shape(iree_hal_buffer_view_shape_rank(hal_bv));
+ std::vector<iree_hal_dim_t> shape(
+ iree_hal_buffer_view_shape_rank(hal_bv));
iree_hal_buffer_view_shape(hal_bv, shape.size(), shape.data(), nullptr);
for (size_t i = 0; i < shape.size(); ++i) {
if (i > 0) out += 'x';