yum-archive/TaSTT-Whisper
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper
8c4603c
master
1RWBuffer < float > result :register ( u0 ); 2 3cbuffer Constants :register ( b0 ) 4{ 5uint elements :packoffset ( c0 . x ); 6} 7 8// Thread group index is 16 bits per coordinate: 9// https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-dispatch 10// We want this shader to support buffers up to 2 GB. 11#ifndef THREADS 12static const uint THREADS = 512 ; 13#endif 14#ifndef ITERATIONS 15static const uint ITERATIONS = 128 ; 16#endif 17 18static const uint itemsPerGroup = THREADS * ITERATIONS ; 19 20[ numthreads ( THREADS , 1 , 1 )] 21void main ( uint3 group : SV_GroupID , uint thread : SV_GroupIndex ) 22{ 23uint rdi = group . x * itemsPerGroup ; 24const uint rdiEnd = min ( rdi + itemsPerGroup , elements ); 25for ( rdi += thread ; rdi < rdiEnd ; rdi += THREADS ) 26result [ rdi ] = 0.0 ; 27}