mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-06-28 04:30:15 -05:00
Update autofix and presets (#1867)
* Add configuration files for format, presets and examples * add clang in pre-commit config * remove clang configurations * Refactor .gitignore for consistency in formatting
This commit is contained in:
parent
0c45696db4
commit
9f7ba245ab
4
.flake8
4
.flake8
@ -10,8 +10,10 @@ exclude =
|
||||
.git,
|
||||
# There's no value in checking cache directories
|
||||
__pycache__,
|
||||
# No need to include the build path
|
||||
# No need to include generated build directories
|
||||
build,
|
||||
build_*,
|
||||
build-*,
|
||||
# This contains builds that we don't want to check
|
||||
dist # This is generated with `python build .` for package releases
|
||||
# max-complexity = 10
|
||||
|
||||
107
.gitignore
vendored
107
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
*.a
|
||||
*.bat
|
||||
*.bin
|
||||
*.d
|
||||
*.dll
|
||||
*.dot
|
||||
*.etag
|
||||
@ -19,13 +20,13 @@
|
||||
*.so
|
||||
*.swp
|
||||
*.tmp
|
||||
*.DS_Store
|
||||
|
||||
# IDE / OS
|
||||
|
||||
.cache/
|
||||
.ccls-cache/
|
||||
.direnv/
|
||||
.DS_Store
|
||||
.envrc
|
||||
.idea/
|
||||
.swiftpm
|
||||
@ -33,7 +34,6 @@
|
||||
.vscode/
|
||||
nppBackup
|
||||
|
||||
|
||||
# Coverage
|
||||
|
||||
gcovr-report/
|
||||
@ -41,29 +41,22 @@ lcov-report/
|
||||
|
||||
# Build Artifacts
|
||||
|
||||
tags
|
||||
.build/
|
||||
build*
|
||||
!build-info.cmake
|
||||
!build-info.cpp.in
|
||||
!build-info.sh
|
||||
!build.zig
|
||||
!docs/build.md
|
||||
!scripts/build-*.sh
|
||||
!scripts/build-*.bat
|
||||
/tags
|
||||
/.build/
|
||||
/build*
|
||||
/cmake-build-*
|
||||
/release
|
||||
/debug
|
||||
/CMakeSettings.json
|
||||
/compile_commands.json
|
||||
/libllama.so
|
||||
/llama-*
|
||||
/vulkan-shaders-gen
|
||||
android-ndk-*
|
||||
arm_neon.h
|
||||
cmake-build-*
|
||||
CMakeSettings.json
|
||||
compile_commands.json
|
||||
ggml-metal-embed.metal
|
||||
llama-batched-swift
|
||||
/rpc-server
|
||||
out/
|
||||
tmp/
|
||||
/out/
|
||||
/tmp/
|
||||
/autogen-*.md
|
||||
/common/build-info.cpp
|
||||
|
||||
# Deprecated
|
||||
|
||||
@ -72,38 +65,43 @@ tmp/
|
||||
|
||||
# CI
|
||||
|
||||
!.github/workflows/*.yml
|
||||
!/.github/workflows/*.yml
|
||||
|
||||
# Models
|
||||
|
||||
models/*
|
||||
models-mnt
|
||||
!models/.editorconfig
|
||||
!models/ggml-vocab-*.gguf*
|
||||
/models/*
|
||||
/models-mnt
|
||||
!/models/.editorconfig
|
||||
!/models/ggml-vocab-*.gguf*
|
||||
!/models/templates
|
||||
|
||||
# Zig
|
||||
zig-out/
|
||||
zig-cache/
|
||||
|
||||
# Logs
|
||||
|
||||
ppl-*.txt
|
||||
qnt-*.txt
|
||||
perf-*.txt
|
||||
/zig-out/
|
||||
/zig-cache/
|
||||
|
||||
# Examples
|
||||
|
||||
examples/jeopardy/results.txt
|
||||
examples/server/*.css.hpp
|
||||
examples/server/*.html.hpp
|
||||
examples/server/*.js.hpp
|
||||
examples/server/*.mjs.hpp
|
||||
!build_64.sh
|
||||
!examples/*.bat
|
||||
!examples/*/*.kts
|
||||
!examples/*/*/*.kts
|
||||
!examples/sycl/*.bat
|
||||
!examples/sycl/*.sh
|
||||
/examples/jeopardy/results.txt
|
||||
/examples/server/*.css.hpp
|
||||
/examples/server/*.html.hpp
|
||||
/examples/server/*.js.hpp
|
||||
/examples/server/*.mjs.hpp
|
||||
/examples/server/*.gz.hpp
|
||||
!/build_64.sh
|
||||
!/examples/*.bat
|
||||
!/examples/*/*.kts
|
||||
!/examples/*/*/*.kts
|
||||
!/examples/sycl/*.bat
|
||||
!/examples/sycl/*.sh
|
||||
|
||||
# Server Web UI temporary files
|
||||
|
||||
/examples/server/webui_llamacpp/.svelte-kit
|
||||
/examples/server/webui_llamacpp/node_modules
|
||||
/examples/server/webui_llamacpp/build
|
||||
/examples/server/webui_llamacpp/test-results
|
||||
/examples/server/webui_llamacpp/storybook-static
|
||||
|
||||
# Python
|
||||
|
||||
@ -111,11 +109,16 @@ examples/server/*.mjs.hpp
|
||||
__pycache__/
|
||||
*/poetry.lock
|
||||
poetry.toml
|
||||
poetry.lock
|
||||
uv.lock
|
||||
|
||||
# Nix
|
||||
|
||||
flake.lock
|
||||
/result
|
||||
|
||||
# Test binaries
|
||||
|
||||
/tests/test-backend-ops
|
||||
/tests/test-double-float
|
||||
/tests/test-grad0
|
||||
@ -131,17 +134,31 @@ poetry.toml
|
||||
/tests/test-tokenizer-1-spm
|
||||
|
||||
# Scripts
|
||||
|
||||
!/scripts/install-oneapi.bat
|
||||
/examples/server/webui_llamacpp/.gitignore
|
||||
|
||||
# Generated by scripts
|
||||
/hellaswag_val_full.txt
|
||||
/winogrande-debiased-eval.csv
|
||||
/wikitext-2-raw/
|
||||
|
||||
# Test models for lora adapters
|
||||
|
||||
/lora-tests
|
||||
|
||||
# Local scripts
|
||||
|
||||
/run-vim.sh
|
||||
/run-chat.sh
|
||||
/run-spec.sh
|
||||
.ccache/
|
||||
|
||||
# IDE
|
||||
|
||||
*.code-workspace
|
||||
.windsurf/
|
||||
# emscripten
|
||||
a.out
|
||||
a.out.*
|
||||
.dev
|
||||
.github
|
||||
|
||||
@ -9,8 +9,9 @@ repos:
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 7.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-no-print]
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-print]
|
||||
|
||||
@ -2,64 +2,143 @@
|
||||
"version": 4,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.."
|
||||
}
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sycl-base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CMAKE_CXX_COMPILER": "icx",
|
||||
"CMAKE_C_COMPILER": "cl",
|
||||
"GGML_SYCL": "ON",
|
||||
"CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.."
|
||||
}
|
||||
"name": "debug",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{ "name": "debug", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
|
||||
{ "name": "release", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } },
|
||||
{ "name": "reldbg", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
|
||||
{ "name": "static", "hidden": true, "cacheVariables": { "GGML_STATIC": "ON" } },
|
||||
|
||||
{
|
||||
"name": "arm64-windows-msvc", "hidden": true,
|
||||
"architecture": { "value": "arm64", "strategy": "external" },
|
||||
"toolset": { "value": "host=x86_64", "strategy": "external" },
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/arm64-windows-msvc.cmake"
|
||||
}
|
||||
"name": "release",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "arm64-windows-llvm", "hidden": true,
|
||||
"architecture": { "value": "arm64", "strategy": "external" },
|
||||
"toolset": { "value": "host=x86_64", "strategy": "external" },
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/arm64-windows-llvm.cmake"
|
||||
}
|
||||
"name": "reldbg",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
|
||||
{ "name": "arm64-windows-llvm-debug" , "inherits": [ "base", "arm64-windows-llvm", "debug" ] },
|
||||
{ "name": "arm64-windows-llvm-release", "inherits": [ "base", "arm64-windows-llvm", "reldbg" ] },
|
||||
{ "name": "arm64-windows-llvm+static-release", "inherits": [ "base", "arm64-windows-llvm", "reldbg", "static" ] },
|
||||
|
||||
{ "name": "arm64-windows-msvc-debug" , "inherits": [ "base", "arm64-windows-msvc", "debug" ] },
|
||||
{ "name": "arm64-windows-msvc-release", "inherits": [ "base", "arm64-windows-msvc", "reldbg" ] },
|
||||
{ "name": "arm64-windows-msvc+static-release", "inherits": [ "base", "arm64-windows-msvc", "reldbg", "static" ] },
|
||||
|
||||
{ "name": "x64-windows-msvc-debug" , "inherits": [ "base", "debug" ] },
|
||||
{ "name": "x64-windows-msvc-release", "inherits": [ "base", "reldbg" ] },
|
||||
{ "name": "x64-windows-msvc+static-release", "inherits": [ "base", "reldbg", "static" ] },
|
||||
|
||||
{ "name": "x64-windows-sycl-debug" , "inherits": [ "sycl-base", "debug" ] },
|
||||
{ "name": "x64-windows-sycl-release", "inherits": [ "sycl-base", "release" ] }
|
||||
{
|
||||
"name": "cpu-avx2-base",
|
||||
"hidden": true,
|
||||
"inherits": "base",
|
||||
"cacheVariables": {
|
||||
"GGML_NATIVE": "OFF",
|
||||
"GGML_AVX": "ON",
|
||||
"GGML_AVX2": "ON",
|
||||
"GGML_FMA": "ON",
|
||||
"GGML_F16C": "ON",
|
||||
"GGML_BLAS": "OFF",
|
||||
"GGML_CUDA": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cuda-base",
|
||||
"hidden": true,
|
||||
"inherits": "base",
|
||||
"cacheVariables": {
|
||||
"GGML_CUDA": "ON",
|
||||
"GGML_BLAS": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-debug",
|
||||
"inherits": [
|
||||
"cpu-avx2-base",
|
||||
"debug"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_cpu_avx2_debug"
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-release",
|
||||
"inherits": [
|
||||
"cpu-avx2-base",
|
||||
"release"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_cpu_avx2_release"
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-reldbg",
|
||||
"inherits": [
|
||||
"cpu-avx2-base",
|
||||
"reldbg"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_cpu_avx2_reldbg"
|
||||
},
|
||||
{
|
||||
"name": "cuda-debug",
|
||||
"inherits": [
|
||||
"cuda-base",
|
||||
"debug"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_debug"
|
||||
},
|
||||
{
|
||||
"name": "cuda-release",
|
||||
"inherits": [
|
||||
"cuda-base",
|
||||
"release"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_release"
|
||||
},
|
||||
{
|
||||
"name": "cuda-reldbg",
|
||||
"inherits": [
|
||||
"cuda-base",
|
||||
"reldbg"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build_cuda_reldbg"
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "parallel-build",
|
||||
"hidden": true,
|
||||
"jobs": 0
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-debug",
|
||||
"configurePreset": "cpu-avx2-debug",
|
||||
"inherits": "parallel-build"
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-release",
|
||||
"configurePreset": "cpu-avx2-release",
|
||||
"inherits": "parallel-build"
|
||||
},
|
||||
{
|
||||
"name": "cpu-avx2-reldbg",
|
||||
"configurePreset": "cpu-avx2-reldbg",
|
||||
"inherits": "parallel-build"
|
||||
},
|
||||
{
|
||||
"name": "cuda-debug",
|
||||
"configurePreset": "cuda-debug",
|
||||
"inherits": "parallel-build"
|
||||
},
|
||||
{
|
||||
"name": "cuda-release",
|
||||
"configurePreset": "cuda-release",
|
||||
"inherits": "parallel-build"
|
||||
},
|
||||
{
|
||||
"name": "cuda-reldbg",
|
||||
"configurePreset": "cuda-reldbg",
|
||||
"inherits": "parallel-build"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
set(ARCH_FLAGS "")
|
||||
if (NOT MSVC)
|
||||
if (NOT MSVC AND GGML_NATIVE)
|
||||
list(APPEND ARCH_FLAGS -march=native)
|
||||
endif()
|
||||
message(STATUS "ARCH_FLAGS = ${ARCH_FLAGS}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user