diff options
| author | Konstantin <const@const.me> | 2023-01-18 20:35:30 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-18 20:35:30 +0100 |
| commit | 11c399b70c7ad5664b6060b39632e6b9fa815350 (patch) | |
| tree | 763afed51699017749d3f0398f16928aad7544a4 /Whisper/API | |
| parent | ad097a744759c6a78e1b33ea9d2b4b2af01c529d (diff) | |
Optional startup flags to override performance-related defaults for the compute shaders
Diffstat (limited to 'Whisper/API')
| -rw-r--r-- | Whisper/API/eGpuModelFlags.h | 13 | ||||
| -rw-r--r-- | Whisper/API/iContext.cl.h | 3 | ||||
| -rw-r--r-- | Whisper/API/iContext.h | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Whisper/API/eGpuModelFlags.h b/Whisper/API/eGpuModelFlags.h new file mode 100644 index 0000000..96f5a76 --- /dev/null +++ b/Whisper/API/eGpuModelFlags.h @@ -0,0 +1,13 @@ +#pragma once +#include <stdint.h> + +namespace Whisper +{ + enum struct eGpuModelFlags : uint32_t + { + Wave32 = 1, + Wave64 = 2, + NoReshapedMatMul = 4, + UseReshapedMatMul = 8, + }; +}
\ No newline at end of file diff --git a/Whisper/API/iContext.cl.h b/Whisper/API/iContext.cl.h index 97d34c7..fdb15ce 100644 --- a/Whisper/API/iContext.cl.h +++ b/Whisper/API/iContext.cl.h @@ -5,6 +5,7 @@ #include "loggerApi.h" #include "sLanguageList.h" #include "sLoadModelCallbacks.h" +#include "eGpuModelFlags.h" namespace Whisper { @@ -55,7 +56,7 @@ namespace Whisper }; HRESULT COMLIGHTCALL setupLogger( const sLoggerSetup& setup ); - HRESULT COMLIGHTCALL loadModel( const wchar_t* path, eModelImplementation impl, const sLoadModelCallbacks* callbacks, iModel** pp ); + HRESULT COMLIGHTCALL loadModel( const wchar_t* path, eModelImplementation impl, uint32_t flags, const sLoadModelCallbacks* callbacks, iModel** pp ); uint32_t COMLIGHTCALL findLanguageKeyW( const wchar_t* lang ); uint32_t COMLIGHTCALL findLanguageKeyA( const char* lang ); diff --git a/Whisper/API/iContext.h b/Whisper/API/iContext.h index 9661093..d6ca29c 100644 --- a/Whisper/API/iContext.h +++ b/Whisper/API/iContext.h @@ -4,6 +4,7 @@ #include "loggerApi.h" #include "sLanguageList.h" #include "sLoadModelCallbacks.h" +#include "eGpuModelFlags.h" namespace Whisper { @@ -50,7 +51,7 @@ namespace Whisper }; HRESULT __stdcall setupLogger( const sLoggerSetup& setup ); - HRESULT __stdcall loadModel( const wchar_t* path, eModelImplementation impl, const sLoadModelCallbacks* callbacks, iModel** pp ); + HRESULT __stdcall loadModel( const wchar_t* path, eModelImplementation impl, uint32_t flags, const sLoadModelCallbacks* callbacks, iModel** pp ); uint32_t __stdcall findLanguageKeyW( const wchar_t* lang ); uint32_t __stdcall findLanguageKeyA( const char* lang ); |
