mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 14:21:06 -10:00
Engine component version 0.1.56 (CMake, Metal, packaging defaults, RAM_KEEP_MIN_ENGINE and its test)
This commit is contained in:
1 parent
b90ee03815
commit
72a0cc1d5e
7 files changed
+15
-15
No files matched your search
+1
-1
@@ -8,7 +8,7 @@
|
||||
# below refuses anything older: silently building for a pre-Ampere arch would produce a binary that runs
|
||||
# and is wrong about its own performance, which is the worst of both outcomes.
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(strata VERSION 0.1.55.1 LANGUAGES CXX)
|
||||
project(strata VERSION 0.1.56 LANGUAGES CXX)
|
||||
# EXPERIMENTAL: the Intel Arc engine, the SYCL port in sycl/ (PR #423; icpx + oneMKL, docs/INTEL_ARC.md). It is its
|
||||
# own project that takes the unported sources from src/; with this on, nothing below is configured.
|
||||
option(STRATA_ENABLE_SYCL "EXPERIMENTAL: build the Intel Arc (SYCL) engine from sycl/ - docs/INTEL_ARC.md" OFF)
|
||||
|
||||
@@ -106,9 +106,9 @@ export function resourceSettings(config,hardware,profile,model={},values={}){
|
||||
* (5 at 24 GB, 7 at 32 GB, 8 at 64 GB and above). The engine adds it to the arena's need and, when the arena does not fit, leaves it free beside the RAM copy. It is sent as the env variable STRATA_RAM_KEEP_GIB. */
|
||||
export const ramKeepGib=ram=>Math.min(8,Math.max(5,Math.ceil((Number(ram)||0)*.2)));
|
||||
|
||||
/** The first engine version that reads STRATA_RAM_KEEP_GIB / --ram-keep-gib (the setting was added in 0.1.55.1, the version of the 0.2.9 update's engine; the released 0.2.9 engine is 0.1.55). An engine older than this, or one whose version cannot be read, gets the
|
||||
/** The first engine version that reads STRATA_RAM_KEEP_GIB / --ram-keep-gib (the setting was added in 0.1.56, the engine of the 0.2.9 update; the released 0.2.9 engine is 0.1.55). An engine older than this, or one whose version cannot be read, gets the
|
||||
* rule of 0.2.9 instead. Lower it (or raise the engine's version) only together with the release that carries the setting. */
|
||||
export const RAM_KEEP_MIN_ENGINE='0.1.55.1';
|
||||
export const RAM_KEEP_MIN_ENGINE='0.1.56';
|
||||
/** True when the engine with this version string knows the setting. Unknown or unreadable: false (the 0.2.9 rule works on every engine, an ignored env variable would keep no room). */
|
||||
export function engineKnowsRamKeep(version){
|
||||
const have=parseEngineVersion(version),need=parseEngineVersion(RAM_KEEP_MIN_ENGINE);
|
||||
|
||||
@@ -11,9 +11,9 @@ const flag = (args, name) => args[args.indexOf(name) + 1];
|
||||
const old279 = (ram, arena = 50.3) => Math.max(8, Math.min(Math.floor(ram * .8) - 10, Math.floor(arena / 1.073741824))); // the 0.2.9 rule
|
||||
|
||||
test('which engines know the setting: RAM_KEEP_MIN_ENGINE and newer; unknown or unreadable versions are treated as older', () => {
|
||||
assert.equal(RAM_KEEP_MIN_ENGINE, '0.1.55.1');
|
||||
for (const v of ['0.1.55.1', '0.1.55.2', '0.1.56', '0.1.56.1', '0.1.57', '0.2.0', 'v0.1.56', '1.0']) assert.equal(engineKnowsRamKeep(v), true, v);
|
||||
for (const v of ['0.1.52', '0.1.54', '0.1.55', '0.1.5', '0.1', null, undefined, '', 'local', 'dev']) assert.equal(engineKnowsRamKeep(v), false, String(v));
|
||||
assert.equal(RAM_KEEP_MIN_ENGINE, '0.1.56');
|
||||
for (const v of ['0.1.56', '0.1.56.1', '0.1.57', '0.2.0', 'v0.1.56', '1.0']) assert.equal(engineKnowsRamKeep(v), true, v);
|
||||
for (const v of ['0.1.52', '0.1.54', '0.1.55', '0.1.55.1', '0.1.55.2', '0.1.5', '0.1', null, undefined, '', 'local', 'dev']) assert.equal(engineKnowsRamKeep(v), false, String(v));
|
||||
assert.equal(engineVersionOfExe('C:\\Users\\x\\AppData\\Local\\Strata\\components\\engine\\0.1.54-windows-x86_64-cuda-cuda13\\strata.exe'), '0.1.54');
|
||||
assert.equal(engineVersionOfExe('/home/u/.strata/components/engine/0.1.56-linux-x86_64-cuda/strata'), '0.1.56');
|
||||
assert.equal(engineVersionOfExe('component:strata-engine'), null);
|
||||
@@ -29,7 +29,7 @@ test('an engine that knows the setting: "leave 20% for my work" asks it to keep
|
||||
});
|
||||
|
||||
test('an older engine (0.1.52, 0.1.54, 0.1.55 in the Engine tab) gets the 0.2.9 rule unchanged and never an argument it does not know', () => {
|
||||
for (const v of ['0.1.52', '0.1.54', '0.1.55']) {
|
||||
for (const v of ['0.1.52', '0.1.54', '0.1.55', '0.1.55.1']) {
|
||||
const w = resourceSettings(config, pc64, 'work', { arenaGb: 50.3, engineVersion: v });
|
||||
assert.equal(flag(w.args, '--resident-budget-gib'), String(old279(63)), `${v}: the 80% budget`);
|
||||
assert.equal(w.env.STRATA_RESIDENT_HEADROOM_GIB, '13', `${v}: 20% of 63 GB, rounded up`);
|
||||
|
||||
@@ -114,7 +114,7 @@ file(GLOB STRATA_METAL_ENGINE_SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_D
|
||||
add_library(strata_metal_host STATIC ${STRATA_METAL_HOST_SOURCES})
|
||||
target_include_directories(strata_metal_host PUBLIC ${STRATA_ROOT}/include ${S}/core ${STRATA_ROOT}/third_party/ggml
|
||||
${STRATA_GGML_DIR}/ggml/include ${STRATA_GGML_DIR}/ggml/src ${STRATA_GGML_DIR}/ggml/src/ggml-cpu)
|
||||
target_compile_definitions(strata_metal_host PUBLIC STRATA_NATIVE_EXPERTS=1 STRATA_HAVE_DFLASH2=1 STRATA_VERSION="0.1.55-metal")
|
||||
target_compile_definitions(strata_metal_host PUBLIC STRATA_NATIVE_EXPERTS=1 STRATA_HAVE_DFLASH2=1 STRATA_VERSION="0.1.56-metal")
|
||||
target_compile_options(strata_metal_host PRIVATE -Wno-unused-parameter -Wno-deprecated-declarations)
|
||||
target_link_libraries(strata_metal_host PUBLIC strata_gpu_metal ggml-cpu ggml-base)
|
||||
|
||||
@@ -181,7 +181,7 @@ if(NOT STRATA_BUILD_ID)
|
||||
set(STRATA_BUILD_ID unknown)
|
||||
endif()
|
||||
set_source_files_properties(${DS4}/ds4_main.cpp PROPERTIES COMPILE_DEFINITIONS "DS4_BUILD_ID=\"${STRATA_BUILD_ID}\"")
|
||||
# -DSTRATA_DS4_VERSION=0.1.55-metal: the version this DeepSeek engine reports, when its package is released apart from the Qwen engine's
|
||||
# -DSTRATA_DS4_VERSION=0.1.56-metal: the version this DeepSeek engine reports, when its package is released apart from the Qwen engine's
|
||||
if(STRATA_DS4_VERSION)
|
||||
set_source_files_properties(${DS4}/ds4_main.cpp PROPERTIES COMPILE_OPTIONS "-USTRATA_VERSION;-DSTRATA_VERSION=\"${STRATA_DS4_VERSION}\"")
|
||||
endif()
|
||||
@@ -6,7 +6,7 @@
|
||||
# VARIANT=rx7900 rx9070 (gfx1200 gfx1201) | rx7900 (gfx1100 gfx1101 gfx1102: built, NOT tested on a real RX 7000 card) | a name + ARCHS=
|
||||
# ARCHS="gfx1100;gfx1101;gfx1102" the code objects (default: the variant's); BUILD.json "archs" and the manifest list exactly these
|
||||
# SRC=<this checkout> LLAMA=<llama.cpp checkout at the pinned commit> HP=<ROCm devel root> CORE=<ROCm core root> LIBW=<ROCm libraries root>
|
||||
# OUT=<work folder> PKGVER=0.1.55 COMMIT=<source commit for the build id> JOBS=16
|
||||
# OUT=<work folder> PKGVER=0.1.56 COMMIT=<source commit for the build id> JOBS=16
|
||||
# NO_PACKAGE=1 stop after the stage folder
|
||||
#
|
||||
# Output: $OUT/components/dsv41/<ver>-linux-x86_64-hip-<variant>/ (sign it with packaging/feed_tool.py sign-package, then pack-engine --prefix strata-dsv41).
|
||||
@@ -19,7 +19,7 @@ HP=${HP:?HP=<ROCm devel root>}
|
||||
CORE=${CORE:-$HP}
|
||||
LIBW=${LIBW:-$HP}
|
||||
OUT=${OUT:-$PWD/work-dsv41-$V}
|
||||
PKGVER=${PKGVER:-0.1.55}
|
||||
PKGVER=${PKGVER:-0.1.56}
|
||||
COMMIT=${COMMIT:-unknown}
|
||||
JOBS=${JOBS:-16}
|
||||
case "$V" in
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# SRC=<this checkout> the Strata source (default: the checkout this script is in)
|
||||
# LLAMA=<llama.cpp checkout> at the pinned commit (setup.py LLAMA_CPP_COMMIT); mtmd and ggml come from it
|
||||
# HP=<ROCm devel root> CORE=<ROCm core root> LIBW=<ROCm libraries root> (TheRock: _rocm_sdk_devel, _rocm_sdk_core, _rocm_sdk_libraries_*)
|
||||
# OUT=<work folder> PKGVER=0.1.55 COMMIT=<source commit for the build id> JOBS=16
|
||||
# OUT=<work folder> PKGVER=0.1.56 COMMIT=<source commit for the build id> JOBS=16
|
||||
# VISION_ONLY=1 build only the two readers (no engine, no package)
|
||||
# DSV41=1|0 also build strata-dsv41 (the DeepSeek-V4.1 engine, tools/dsv41/build_hip_linux.sh's flags) and ship it beside
|
||||
# strata: default 1 for the rx9070 variant (gfx1200 gfx1201; built and run on an R9700), 0 for the others
|
||||
@@ -26,7 +26,7 @@ HP=${HP:?HP=<ROCm devel root>}
|
||||
CORE=${CORE:-$HP}
|
||||
LIBW=${LIBW:-$HP}
|
||||
OUT=${OUT:-$PWD/work-$V}
|
||||
PKGVER=${PKGVER:-0.1.55}
|
||||
PKGVER=${PKGVER:-0.1.56}
|
||||
COMMIT=${COMMIT:-unknown}
|
||||
JOBS=${JOBS:-16}
|
||||
case "$V" in
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Build the DeepSeek-V4.1-Flash engine component for Apple Silicon (strata-dsv41, backend metal).
|
||||
#
|
||||
# bash packaging/mac/build_dsv41_engine.sh [--version 0.1.55] [--build DIR] [--out DIR] [--build-id ID]
|
||||
# bash packaging/mac/build_dsv41_engine.sh [--version 0.1.56] [--build DIR] [--out DIR] [--build-id ID]
|
||||
#
|
||||
# Run it in the source tree on the Mac. It configures and builds the `strata_ds4` target (metal/CMakeLists.txt) when the binary is
|
||||
# missing, stages it as `strata-dsv41` beside the kernel sources the engine compiles at start-up, packages them with
|
||||
@@ -18,7 +18,7 @@
|
||||
# <exe>/metal/ggml-common.h
|
||||
set -u
|
||||
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
VERSION=0.1.55
|
||||
VERSION=0.1.56
|
||||
BUILD="$ROOT/build-metal"
|
||||
OUT="$ROOT/pkg/engine"
|
||||
BUILD_ID=""
|
||||
|
||||
Reference in new issue
Block a user