CMakePresets.json 4.31 KB
Newer Older
Michael Yang's avatar
Michael Yang committed
1
2
3
4
5
6
7
8
{
  "version": 3,
  "configurePresets": [
    {
      "name": "Default",
      "binaryDir": "${sourceDir}/build",
      "installDir": "${sourceDir}/dist",
      "cacheVariables": {
9
10
        "CMAKE_BUILD_TYPE": "Release",
        "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded"
Michael Yang's avatar
Michael Yang committed
11
12
13
14
15
16
17
18
19
20
      }
    },
    {
      "name": "CPU",
      "inherits": [ "Default" ]
    },
    {
      "name": "CUDA",
      "inherits": [ "Default" ]
    },
21
22
23
24
25
    {
      "name": "CUDA 11",
      "inherits": [ "CUDA" ],
      "cacheVariables": {
        "CMAKE_CUDA_ARCHITECTURES": "50-virtual;60-virtual;61-virtual;70-virtual;75-virtual;80-virtual;86-virtual;87-virtual;89-virtual;90-virtual",
26
27
        "CMAKE_CUDA_FLAGS": "-Wno-deprecated-gpu-targets -t 2",
        "OLLAMA_RUNNER_DIR": "cuda_v11"
28
29
      }
    },
Michael Yang's avatar
Michael Yang committed
30
31
32
33
    {
      "name": "CUDA 12",
      "inherits": [ "CUDA" ],
      "cacheVariables": {
34
        "CMAKE_CUDA_ARCHITECTURES": "50;52;60;61;70;75;80;86;89;90;90a;120",
35
36
        "CMAKE_CUDA_FLAGS": "-Wno-deprecated-gpu-targets -t 2",
        "OLLAMA_RUNNER_DIR": "cuda_v12"
Michael Yang's avatar
Michael Yang committed
37
38
      }
    },
39
40
41
42
    {
      "name": "CUDA 13",
      "inherits": [ "CUDA" ],
      "cacheVariables": {
43
        "CMAKE_CUDA_ARCHITECTURES": "75-virtual;80-virtual;86-virtual;87-virtual;89-virtual;90-virtual;90a-virtual;100-virtual;103-virtual;110-virtual;120-virtual;121-virtual",
44
        "CMAKE_CUDA_FLAGS": "-t 4",
45
        "OLLAMA_RUNNER_DIR": "cuda_v13"
46
47
      }
    },
Michael Yang's avatar
Michael Yang committed
48
49
50
51
    {
      "name": "JetPack 5",
      "inherits": [ "CUDA" ],
      "cacheVariables": {
52
53
        "CMAKE_CUDA_ARCHITECTURES": "72;87",
        "OLLAMA_RUNNER_DIR": "cuda_jetpack5"
Michael Yang's avatar
Michael Yang committed
54
55
56
57
58
59
      }
    },
    {
      "name": "JetPack 6",
      "inherits": [ "CUDA" ],
      "cacheVariables": {
60
61
        "CMAKE_CUDA_ARCHITECTURES": "87",
        "OLLAMA_RUNNER_DIR": "cuda_jetpack6"
Michael Yang's avatar
Michael Yang committed
62
63
64
65
66
67
68
69
70
71
72
73
74
      }
    },
    {
      "name": "ROCm",
      "inherits": [ "Default" ],
      "cacheVariables": {
        "CMAKE_HIP_PLATFORM": "amd"
      }
    },
    {
      "name": "ROCm 6",
      "inherits": [ "ROCm" ],
      "cacheVariables": {
Daniel Hiltgen's avatar
Daniel Hiltgen committed
75
        "CMAKE_HIP_FLAGS": "-parallel-jobs=4",
76
77
        "AMDGPU_TARGETS": "gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102;gfx1151;gfx1200;gfx1201;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-",
        "OLLAMA_RUNNER_DIR": "rocm"
Michael Yang's avatar
Michael Yang committed
78
      }
79
80
81
    },
    {
      "name": "Vulkan",
82
83
84
85
      "inherits": [ "Default" ],
      "cacheVariables": {
        "OLLAMA_RUNNER_DIR": "vulkan"
      }
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
    },
    {
      "name": "MLX",
      "inherits": [ "Default" ],
      "cacheVariables": {
        "MLX_ENGINE": "ON",
        "OLLAMA_RUNNER_DIR": "mlx"
      }
    },
    {
      "name": "MLX CUDA 12",
      "inherits": [ "MLX", "CUDA 12" ],
      "cacheVariables": {
        "OLLAMA_RUNNER_DIR": "mlx_cuda_v12"
      }
    },
    {
      "name": "MLX CUDA 13",
      "inherits": [ "MLX", "CUDA 13" ],
      "cacheVariables": {
        "OLLAMA_RUNNER_DIR": "mlx_cuda_v13"
      }
Michael Yang's avatar
Michael Yang committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
    }
  ],
  "buildPresets": [
    {
      "name": "Default",
      "configurePreset": "Default",
      "configuration": "Release"
    },
    {
      "name": "CPU",
      "configurePreset": "Default",
      "targets": [ "ggml-cpu" ]
    },
    {
      "name": "CUDA",
      "configurePreset": "CUDA",
      "targets": [ "ggml-cuda" ]
    },
126
127
128
129
130
    {
      "name": "CUDA 11",
      "inherits": [ "CUDA" ],
      "configurePreset": "CUDA 11"
    },
Michael Yang's avatar
Michael Yang committed
131
132
133
134
135
    {
      "name": "CUDA 12",
      "inherits": [ "CUDA" ],
      "configurePreset": "CUDA 12"
    },
136
137
138
139
140
    {
      "name": "CUDA 13",
      "inherits": [ "CUDA" ],
      "configurePreset": "CUDA 13"
    },
Michael Yang's avatar
Michael Yang committed
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
    {
      "name": "JetPack 5",
      "inherits": [ "CUDA" ],
      "configurePreset": "JetPack 5"
    },
    {
      "name": "JetPack 6",
      "inherits": [ "CUDA" ],
      "configurePreset": "JetPack 6"
    },
    {
      "name": "ROCm",
      "configurePreset": "ROCm",
      "targets": [ "ggml-hip" ]
    },
    {
      "name": "ROCm 6",
      "inherits": [ "ROCm" ],
      "configurePreset": "ROCm 6"
160
161
162
163
164
    },
    {
      "name": "Vulkan",
      "targets": [ "ggml-vulkan" ],
      "configurePreset": "Vulkan"
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
    },
    {
      "name": "MLX",
      "targets": [ "mlx", "mlxc" ],
      "configurePreset": "MLX"
    },
    {
      "name": "MLX CUDA 12",
      "targets": [ "mlx", "mlxc" ],
      "configurePreset": "MLX CUDA 12"
    },
    {
      "name": "MLX CUDA 13",
      "targets": [ "mlx", "mlxc" ],
      "configurePreset": "MLX CUDA 13"
Michael Yang's avatar
Michael Yang committed
180
181
182
    }
  ]
}