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

KonstantinOptional startup flags to override performance-related defaults for the compute shaders11c399b

master
731 B21 linesraw
1#include "stdafx.h"
2#include "modelFactory.h"
3#include "API/iContext.cl.h"
4
5HRESULT COMLIGHTCALL Whisper::loadModel( const wchar_t* path, eModelImplementation impl, uint32_t flags, const sLoadModelCallbacks* callbacks, iModel** pp )
6{
7	switch( impl )
8	{
9	case eModelImplementation::GPU:
10		return loadGpuModel( path, false, flags, callbacks, pp );
11	case eModelImplementation::Hybrid:
12		return loadGpuModel( path, true, flags, callbacks, pp );
13	case eModelImplementation::Reference:
14		if( 0 != flags )
15			logWarning( u8"The reference model doesn’t currently use any flags, argument ignored" );
16		return loadReferenceCpuModel( path, pp );
17	}
18
19	logError( u8"Unknown model implementation 0x%X", (int)impl );
20	return E_INVALIDARG;
21}