From: Masashi Yoshimura Date: Mon, 13 Apr 2026 03:13:04 +0000 (+0900) Subject: Remove extra conditional check on debug mode. (#21798) X-Git-Tag: upstream/0.0.10438~1666 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=bafae276541279aca751c25651462bc7b9134be3;p=pkg%2Fggml%2Fsources%2Fllama.cpp Remove extra conditional check on debug mode. (#21798) --- diff --git a/ggml/src/ggml-webgpu/ggml-webgpu.cpp b/ggml/src/ggml-webgpu/ggml-webgpu.cpp index e979783f0..634201bc6 100644 --- a/ggml/src/ggml-webgpu/ggml-webgpu.cpp +++ b/ggml/src/ggml-webgpu/ggml-webgpu.cpp @@ -534,11 +534,7 @@ static void ggml_backend_webgpu_debug(webgpu_global_context & ctx) { encoder.CopyBufferToBuffer(ctx->debug_dev_buf, 0, ctx->debug_host_buf, 0, ctx->debug_host_buf.GetSize()); wgpu::CommandBuffer commands = encoder.Finish(); ctx->queue.Submit(1, &commands); - if (!ggml_backend_webgpu_map_buffer(ctx, ctx->debug_host_buf, wgpu::MapMode::Read, 0, - ctx->debug_host_buf.GetSize())) { - GGML_LOG_ERROR("ggml_webgpu: Debug buffer map failed\n"); - return; - } + ggml_backend_webgpu_map_buffer(ctx, ctx->debug_host_buf, wgpu::MapMode::Read, 0, ctx->debug_host_buf.GetSize()); const float * debug_data = (const float *) ctx->debug_host_buf.GetConstMappedRange(); std::cout << "debug[0]: " << debug_data[0] << "\n"; ctx->debug_host_buf.Unmap();