Skip to content

GPUProfiling

Overview

GPU profiling of tests.

NOTE: Launch Chrome with the below command line parameters to enable the timestamp query feature:

open -a "Google Chrome Canary" --args --enable-dawn-features=allow_unsafe_apis --enable-webgpu-developer-features --disable-dawn-features=timestamp_quantization

or to dump shaders also: open -a "Google Chrome Canary" --args --enable-dawn-features=allow_unsafe_apis,dump_shaders --enable-webgpu-developer-features --disable-dawn-features=timestamp_quantization

NOTE: Potentially add dump_shaders - Dumped shaders will be log via EmitLog, thus printed " "in Chrome console or consumed by user-defined callback function.", "https://crbug.com/dawn/792"

TODO: try disable_workgroup_init sometime, to see if we can get more parallelism, maybe record_detailed_timing_in_trace_events, disable_timestamp_query_conversion TODO: --disable-dawn-features=timestamp_quantization

Note: Dawn toggles at https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn/native/Toggles.cpp

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class GPUProfiling

import { GPUProfiling } from 'scenerystack/alpenglow';

Static Methods

test() : Promise<void>

loopingTest( profilerFactories : ( ( deviceContext: DeviceContext ) => Promise<GPUProfiler> )[] ) : Promise<void>

getRadixProfiler( deviceContext : DeviceContext, numbers : number[], options : {

  combineStrategy: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">boolean</span>;
  radixWorkgroupSize: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
  radixGrainSize: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
  scanWorkgroupSize: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
  scanGrainSize: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
  bitsPerPass: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
  bitsPerInnerPass: <span style="color: hsla(calc(var(--md-hue) + 180deg),80%,40%,1);">number</span>;
}</span> ) : <span style="font-weight: 400;">Promise&lt;GPUProfiler&gt;</span> {: #getRadixProfiler data-toc-label='getRadixProfiler' }

Source Code

See the source for GPUProfiling.ts in the alpenglow repository.