We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fad388 commit 068aff6Copy full SHA for 068aff6
ggml.c
@@ -1,5 +1,6 @@
1
#define _GNU_SOURCE // Defines CLOCK_MONOTONIC on Linux
2
#define _CRT_SECURE_NO_DEPRECATE // Disables ridiculous "unsafe" warnigns on Windows
3
+#define _USE_MATH_DEFINES // For M_PI on MSVC
4
5
#include "ggml.h"
6
@@ -12093,8 +12094,10 @@ static void ggml_compute_forward_clamp(
12093
12094
12095
// ggml_compute_forward_rope
12096
12097
+#ifndef _MSC_VER
12098
// use -ffast-math so MIN and MAX are optimized to vminss and vmaxss
12099
__attribute__((optimize("-ffast-math"), always_inline))
12100
+#endif
12101
static inline float ggml_rope_ntkv2_ramp(const float low, const float high, const int i0) {
12102
const float y = (i0 / 2 - low) / MIN(0.001f, high - low);
12103
return 1 - MIN(1, MAX(0, y));
0 commit comments