[WebGPU EP] use LOGS_DEFAULT for device lost logging (#23353)

### 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.
This commit is contained in:
Yulong Wang 2025-01-14 08:12:55 -08:00 committed by GitHub
parent af4126c2f1
commit d9cd27a0a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(