Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-sycl/base.hpp # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-sycl / base.hpp` 43 lines ยท 1289 bytes Raw Blame History 1 #ifndef GGML_SYCL_BASE_HPP 2 #define GGML_SYCL_BASE_HPP 3 4 /** 5 * Module: base 6 * 7 * Description: 8 * Provides zero-dependency, foundational primitives, core abstractions, 9 * and low-level system interfaces. This module acts as the lowest layer 10 * of the architecture and is consumed globally across all subsystems. 11 * 12 * Constraints: 13 * - STRICTLY zero upstream dependencies (leaf module). 14 * - High stability and backward compatibility required. 15 */ 16 17 #include 18 19 extern int g_ggml_sycl_debug; 20 extern int g_ggml_sycl_dev_debug; 21 22 #if defined(__clang__) && __has_builtin(__builtin_expect) 23 // Hint the optimizer to pipeline the more likely following instruction in branches 24 # define LIKELY(expr) __builtin_expect(expr, true) 25 # define UNLIKELY(expr) __builtin_expect(expr, false) 26 #else 27 # define LIKELY(expr) (expr) 28 # define UNLIKELY(expr) (expr) 29 #endif 30 31 #define GGML_SYCL_DEBUG(...) \ 32 do { \ 33 if (UNLIKELY(g_ggml_sycl_debug)) \ 34 fprintf(stderr, __VA_ARGS__); \ 35 } while (0) 36 37 #define GGML_SYCL_DEV_DEBUG(...) \ 38 do { \ 39 if (UNLIKELY(g_ggml_sycl_dev_debug)) \ 40 fprintf(stderr, __VA_ARGS__); \ 41 } while (0) 42 43 #endif // GGML_SYCL_BASE_HPP