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
1// GGML_TASK_INIT step for matrix*matrix product, where nb01 >= nb00; 2// Dispatch with [ ne11, ne12 ] groups 3Buffer < float > arg0 :register ( t0 ); 4RWBuffer < float > result :register ( u0 ); 5 6cbuffer Constants :register ( b0 ) 7{ 8uint4 src0_elements :packoffset ( c0 ); 9uint4 src0_strides :packoffset ( c1 ); 10} 11 12#include "miscUtils.hlsli" 13 14// Each thread group of this shader copies a single rows of the matrix 15[ numthreads ( 32 , 1 , 1 ) ] 16void main ( uint3 group : SV_GroupID , uint thread : SV_GroupIndex ) 17{ 18const uint i12 = group . y ; 19const uint i11 = group . x ; 20const uint ne10 = src0_elements . x ; 21const uint ne11 = src0_elements . y ; 22const uint nb12 = src0_strides . z ; 23const uint nb11 = src0_strides . y ; 24 25uint rdi = i11 * ne10 + i12 * ne10 * ne11 ; 26const uint rdiEnd = rdi + ne10 ; 27uint rsi = i12 * nb12 + i11 * nb11 ; 28rdi += thread ; 29rsi += thread ; 30 31for ( ; rdi < rdiEnd ; rdi += 32 , rsi += 32 ) 32result [ rdi ] = adjustFp16 ( arg0 [ rsi ] ); 33}