Skip to content

Commit

Permalink
[WebGPU EP] use LOGS_DEFAULT for device lost logging (#23353)
Browse files Browse the repository at this point in the history
### Description

use LOGS_DEFAULT for device lost logging.

Now since the GPU device lifecycle is managed by WebGpuContext, it's now
able to use ORT logging.
  • Loading branch information
fs-eire authored Jan 14, 2025
1 parent af4126c commit d9cd27a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions onnxruntime/core/providers/webgpu/webgpu_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ void WebGpuContext::Initialize(const WebGpuBufferCacheConfig& buffer_cache_confi
});
// TODO: revise temporary device lost handling
device_desc.SetDeviceLostCallback(wgpu::CallbackMode::AllowSpontaneous, [](const wgpu::Device& /*device*/, wgpu::DeviceLostReason reason, const char* message) {
// cannot use ORT logger because it may be already destroyed
std::cerr << "WebGPU device lost (" << int(reason) << "): " << message;
LOGS_DEFAULT(INFO) << "WebGPU device lost (" << int(reason) << "): " << message;
});

ORT_ENFORCE(wgpu::WaitStatus::Success == instance_.WaitAny(adapter_.RequestDevice(
Expand Down

0 comments on commit d9cd27a

Please sign in to comment.