[fuzz] Use a cache for IR modules in WGSL fuzzer The WGSL fuzzer also runs the IR fuzzing passes via an adaptor. As-is this adaptor requires re-lowering of the WGSL to IR per pass, which can cause significant performance issues. This change, if the IR binary format is available, caches the IR module as a protobuf and re-decodes it per pass, which is significantly faster (~3x for the timeout case I was looking at). The IR module cannot be cache'd/cloned directly, so this re-decoding pattern is the samething the IR natively does. If the IR binary format is not available the fuzzer falls back gracefully to the existing lower per pass behaviour. Fixes: 561406003 Change-Id: I85bd9ab6530245ee24cfa3d43670924170420f96 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/341835 Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Commit-Queue: James Price <jrprice@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.