We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82bb648 commit fb5000aCopy full SHA for fb5000a
exllamav2/exllamav2_ext/cpp/sampling_avx2.cpp
@@ -9,9 +9,12 @@
9
#include <chrono>
10
#include <map>
11
#include "avx2_target.h"
12
-#include "avx_mathfun.h"
13
#include "profiling.h"
14
+#ifdef USE_AVX2
15
+ #include "avx_mathfun.h"
16
+#endif
17
+
18
AVX2_TARGET
19
int softmax_cpu_avx2
20
(
@@ -23,6 +26,10 @@ int softmax_cpu_avx2
23
26
float* output
24
27
)
25
28
{
29
+ #ifndef USE_AVX2
30
+ return 0;
31
+ #else
32
33
profile_start("softmax_cpu (AVX2)");
34
35
int vocab_size_aligned = ((vocab_size + 31) / 32) * 32;
@@ -141,4 +148,5 @@ int softmax_cpu_avx2
141
148
// }
142
149
// printf("sum: %f\n\n", summ);
143
150
return maxi;
151
+ #endif
144
152
}
0 commit comments