mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-25 22:26:24 +00:00
[webgpu] fix compiling error (#23139)
### Description <!-- Describe your changes. --> ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
parent
4aca8f33df
commit
29bccad96d
2 changed files with 4 additions and 4 deletions
|
|
@ -321,8 +321,8 @@ void BufferManager::Download(WGPUBuffer src, void* dst, size_t size) {
|
|||
|
||||
// TODO: revise wait in whole project
|
||||
|
||||
ORT_ENFORCE(context_.Wait(staging_buffer.MapAsync(wgpu::MapMode::Read, 0, buffer_size, wgpu::CallbackMode::WaitAnyOnly, [](wgpu::MapAsyncStatus status, const char* message) {
|
||||
ORT_ENFORCE(status == wgpu::MapAsyncStatus::Success, "Failed to download data from buffer: ", message);
|
||||
ORT_ENFORCE(context_.Wait(staging_buffer.MapAsync(wgpu::MapMode::Read, 0, buffer_size, wgpu::CallbackMode::WaitAnyOnly, [](wgpu::MapAsyncStatus status, wgpu::StringView message) {
|
||||
ORT_ENFORCE(status == wgpu::MapAsyncStatus::Success, "Failed to download data from buffer: ", std::string_view{message});
|
||||
})) == Status::OK());
|
||||
|
||||
auto mapped_data = staging_buffer.GetConstMappedRange();
|
||||
|
|
|
|||
|
|
@ -532,8 +532,8 @@ void WebGpuContext::CollectProfilingData(profiling::Events& events) {
|
|||
0,
|
||||
query_read_buffer.GetSize(),
|
||||
wgpu::CallbackMode::WaitAnyOnly,
|
||||
[](wgpu::MapAsyncStatus status, const char* message) {
|
||||
ORT_ENFORCE(status == wgpu::MapAsyncStatus::Success, "Failed to download data from buffer: ", message);
|
||||
[](wgpu::MapAsyncStatus status, wgpu::StringView message) {
|
||||
ORT_ENFORCE(status == wgpu::MapAsyncStatus::Success, "Failed to download data from buffer: ", std::string_view{message});
|
||||
})) == Status::OK());
|
||||
auto mapped_data = static_cast<const uint64_t*>(query_read_buffer.GetConstMappedRange());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue