Skip to content

Commit 80032c1

Browse files
yomaytkcnsiva
authored andcommitted
Remove extra conditional check on debug mode. (ggml-org#21798)
1 parent 29eabce commit 80032c1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

ggml/src/ggml-webgpu/ggml-webgpu.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,7 @@ static void ggml_backend_webgpu_debug(webgpu_global_context & ctx) {
534534
encoder.CopyBufferToBuffer(ctx->debug_dev_buf, 0, ctx->debug_host_buf, 0, ctx->debug_host_buf.GetSize());
535535
wgpu::CommandBuffer commands = encoder.Finish();
536536
ctx->queue.Submit(1, &commands);
537-
if (!ggml_backend_webgpu_map_buffer(ctx, ctx->debug_host_buf, wgpu::MapMode::Read, 0,
538-
ctx->debug_host_buf.GetSize())) {
539-
GGML_LOG_ERROR("ggml_webgpu: Debug buffer map failed\n");
540-
return;
541-
}
537+
ggml_backend_webgpu_map_buffer(ctx, ctx->debug_host_buf, wgpu::MapMode::Read, 0, ctx->debug_host_buf.GetSize());
542538
const float * debug_data = (const float *) ctx->debug_host_buf.GetConstMappedRange();
543539
std::cout << "debug[0]: " << debug_data[0] << "\n";
544540
ctx->debug_host_buf.Unmap();

0 commit comments

Comments
 (0)