summaryrefslogtreecommitdiffstats
path: root/Whisper/D3D/shaderNames.cpp
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-01-16 14:52:43 +0100
committerKonstantin <const@const.me>2023-01-16 14:52:43 +0100
commit8c4603c73675958efc960fbd4bb599a2909d106a (patch)
tree714dc6fc9a1672d5fd7f89676b97e10959662abc /Whisper/D3D/shaderNames.cpp
parent990a8d0dbaefc996244097397259e92758b15cce (diff)
Source codes
Diffstat (limited to 'Whisper/D3D/shaderNames.cpp')
-rw-r--r--Whisper/D3D/shaderNames.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/Whisper/D3D/shaderNames.cpp b/Whisper/D3D/shaderNames.cpp
new file mode 100644
index 0000000..b52f5db
--- /dev/null
+++ b/Whisper/D3D/shaderNames.cpp
@@ -0,0 +1,53 @@
+// This source file is generated by a tool
+#include "stdafx.h"
+#include "shaderNames.h"
+
+static const std::array<const char*, 38> s_shaderNames =
+{
+ "add",
+ "addInPlace",
+ "addRepeat",
+ "addRepeatGelu",
+ "addRepeatScale",
+ "addRows",
+ "convolutionMain",
+ "convolutionMain2",
+ "convolutionMain2Fixed",
+ "convolutionPrep1",
+ "convolutionPrep2",
+ "copyConvert",
+ "copyTranspose",
+ "diagMaskInf",
+ "flashAttention",
+ "flashAttentionCompat1",
+ "flashAttentionCompat2",
+ "flashAttentionCompat3",
+ "fmaRepeat1",
+ "fmaRepeat2",
+ "matReshapePanels",
+ "mulMatByRow",
+ "mulMatByRowTiled",
+ "mulMatByRowTiledEx",
+ "mulMatByScalar",
+ "mulMatDotMain",
+ "mulMatDotReshape",
+ "mulMatMadMain",
+ "mulMatTiled",
+ "mulMatTiledEx",
+ "norm",
+ "normCompat",
+ "normFixed",
+ "scaleInPlace",
+ "softMax",
+ "softMaxCompat",
+ "softMaxFixed",
+ "zeroMemory",
+};
+
+const char* DirectCompute::computeShaderName( eComputeShader cs )
+{
+ const uint16_t i = (uint16_t)cs;
+ if( i < s_shaderNames.size() )
+ return s_shaderNames[ i ];
+ return nullptr;
+} \ No newline at end of file