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 <stdint.h> 3#include <assert.h> 4 5namespace DirectCompute 6{ 7enum struct eDataType :uint8_t 8 { 9FP16 , 10FP32 , 11U32 , 12 }; 13 14inline size_t elementSize (eDataType dt ) 15 { 16assert (dt == eDataType ::FP16 || dt == eDataType ::FP32 || dt == eDataType ::U32 ); 17 18return (dt == eDataType ::FP16 ) ?2 :4 ; 19 } 20 21DXGI_FORMAT viewFormat (eDataType dt ); 22 23enum struct eBufferUse :uint8_t 24 { 25// Immutable tensor, readable from GPU 26Immutable , 27// Read+write tensor, readable and writable on GPU 28ReadWrite , 29// Read+write tensor, readable and writable on GPU, which supports downloads from GPU 30ReadWriteDownload , 31// The tensor is accessible by both GPU (read only) and CPU (write only). Optimized for resources frequently updated from CPU. 32Dynamic , 33 }; 34}