-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakePresets.json
More file actions
82 lines (82 loc) · 3.61 KB
/
Copy pathCMakePresets.json
File metadata and controls
82 lines (82 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"version": 6,
"configurePresets": [
{
"name": "debug",
"binaryDir": "${sourceDir}/build/debug",
"description": "AddressSanitizer + UBSan. The verification preset.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_FLAGS": "-fsanitize=address,undefined -fno-omit-frame-pointer -O1 -g",
"CMAKE_CXX_FLAGS": "-fsanitize=address,undefined -fno-omit-frame-pointer -O1 -g",
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address,undefined"
}
},
{
"name": "release",
"binaryDir": "${sourceDir}/build/release",
"description": "Default release build. Portable + fast CPU: builds every ggml-cpu ISA variant (SSE..AVX-512) and selects the best at runtime. We deliberately do NOT default to -march=native: it is fragile across machines, and Nix's NIX_ENFORCE_NO_NATIVE strips it, leaving a SCALAR build ~13x slower. For a single-target native binary on non-Nix, use `release-native`.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"GGML_NATIVE": "OFF",
"GGML_BACKEND_DL": "ON",
"GGML_CPU_ALL_VARIANTS": "ON",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/release/bin"
}
},
{
"name": "release-portable",
"inherits": "release",
"binaryDir": "${sourceDir}/build/release-portable",
"description": "Alias of `release` (the portable default), kept for scripts/muscle-memory; identical flags in a separate build dir.",
"cacheVariables": {
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/release-portable/bin"
}
},
{
"name": "release-native",
"binaryDir": "${sourceDir}/build/release-native",
"description": "Single-target -march=native build (one self-contained binary, no runtime ISA dispatch). Fastest on the build machine, but NOT portable, and scalar under Nix (native is stripped) -- use only off-Nix.",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release", "GGML_NATIVE": "ON" }
},
{
"name": "vulkan",
"binaryDir": "${sourceDir}/build/vulkan",
"description": "Release build with the ggml Vulkan backend (GPU parity).",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"FREE_SPLATTER_VULKAN": "ON"
}
},
{
"name": "profile",
"binaryDir": "${sourceDir}/build/profile",
"cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" }
},
{
"name": "fuzz",
"binaryDir": "${sourceDir}/build/fuzz",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"FREE_SPLATTER_FUZZ": "ON"
}
}
],
"buildPresets": [
{ "name": "debug", "configurePreset": "debug" },
{ "name": "release", "configurePreset": "release" },
{ "name": "release-portable", "configurePreset": "release-portable" },
{ "name": "release-native", "configurePreset": "release-native" },
{ "name": "vulkan", "configurePreset": "vulkan" },
{ "name": "profile", "configurePreset": "profile" },
{ "name": "fuzz", "configurePreset": "fuzz" }
],
"testPresets": [
{ "name": "debug", "configurePreset": "debug", "output": { "outputOnFailure": true } },
{ "name": "release", "configurePreset": "release", "output": { "outputOnFailure": true } },
{ "name": "release-portable", "configurePreset": "release-portable", "output": { "outputOnFailure": true } },
{ "name": "vulkan", "configurePreset": "vulkan", "output": { "outputOnFailure": true } }
]
}