Skip to content

Commit

Permalink
Fix iree:span construction error using C++20 (iree-org#15489)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianwa authored Nov 9, 2023
1 parent 675aafb commit 9b4606b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions runtime/src/iree/modules/check/module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ TransferBuffersToHost(
static Status TransferToHost(iree_hal_device_t* device,
vm::ref<iree_hal_buffer_view_t>& buffer_view) {
IREE_TRACE_SCOPE();
IREE_ASSIGN_OR_RETURN(auto target_views,
TransferBuffersToHost(device, {buffer_view}));
IREE_ASSIGN_OR_RETURN(
auto target_views,
TransferBuffersToHost(
device,
iree::span<const vm::ref<iree_hal_buffer_view_t>>({buffer_view})));
buffer_view = std::move(target_views[0]);
return OkStatus();
}
Expand All @@ -243,7 +246,9 @@ static Status TransferToHost(iree_hal_device_t* device,
IREE_TRACE_SCOPE();
IREE_ASSIGN_OR_RETURN(
auto target_views,
TransferBuffersToHost(device, {buffer_view_a, buffer_view_b}));
TransferBuffersToHost(device,
iree::span<const vm::ref<iree_hal_buffer_view_t>>(
{buffer_view_a, buffer_view_b})));
buffer_view_a = std::move(target_views[0]);
buffer_view_b = std::move(target_views[1]);
return OkStatus();
Expand Down

0 comments on commit 9b4606b

Please sign in to comment.