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#pragma once 2#include "../D3D/device.h" 3#include "TensorShape.h" 4 5namespace DirectCompute 6{ 7// 96 bytes dynamic constant buffers, with dimensions and VRAM layout of 2-3 tensors 8class ConstantBuffer 9 { 10CComPtr < ID3D11Buffer > buffer ; 11 12public : 13HRESULT create (); 14HRESULT update (const TensorShape & t0 ); 15HRESULT update (const TensorShape & t0 ,const TensorShape & t1 ); 16HRESULT update (const TensorShape & t0 ,const TensorShape & t1 ,const TensorShape & t2 ); 17 18void bind ()const ; 19 20__m128i getMemoryUse ()const 21 { 22return bufferMemoryUsage (buffer ); 23 } 24 }; 25}