Skip to content

Commit

Permalink
ggml : fix ifdefs and MIN / MAX again
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Nov 3, 2023
1 parent d7735f8 commit a237db6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ggml-quants.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <intrin.h>
#else
#if !defined(__riscv) && !defined(__s390__)
#if defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__) || defined(__SSE3__)
#if !defined(__riscv)
#include <immintrin.h>
#endif
#endif
Expand Down
12 changes: 6 additions & 6 deletions ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@

#include <windows.h>

#undef MIN
#undef MAX

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))

typedef volatile LONG atomic_int;
typedef atomic_int atomic_bool;

Expand Down Expand Up @@ -149,6 +143,12 @@ void ggml_print_backtrace(void) {
}
#endif

#undef MIN
#undef MAX

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))

/*#define GGML_PERF*/
#define GGML_DEBUG 0
#define GGML_GELU_FP16
Expand Down

0 comments on commit a237db6

Please sign in to comment.