From dc3daedffcb40914e277a35fdc58fda64c4e357d Mon Sep 17 00:00:00 2001 From: Jah-yee Date: Fri, 13 Mar 2026 15:44:38 +0800 Subject: [PATCH 1/3] fix: update llama.cpp submodule with chrono fix --- 3rdparty/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/llama.cpp b/3rdparty/llama.cpp index 1f86f058d..0e7e4f387 160000 --- a/3rdparty/llama.cpp +++ b/3rdparty/llama.cpp @@ -1 +1 @@ -Subproject commit 1f86f058de0c3f4098dedae2ae8653c335c868a1 +Subproject commit 0e7e4f387c4a49e15b06a26b98d353cb3402c435 From 248418967ae8fbe5ed97853d762546c8b1f9f023 Mon Sep 17 00:00:00 2001 From: SparkLabScout Date: Fri, 13 Mar 2026 20:56:15 +0800 Subject: [PATCH 2/3] Fix: sys.exit(1) runs unconditionally due to indentation bug In setup_env.py (line 107) and utils/e2e_benchmark.py (line 23), the sys.exit(1) was at the same indentation level as 'try', causing it to run unconditionally after subprocess completes - even when the command succeeds. This moves sys.exit(1) inside the except block where it belongs. Fixes: microsoft/BitNet#447 --- setup_env.py | 2 +- utils/e2e_benchmark.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_env.py b/setup_env.py index 3bf5fb8f7..4ef7683b8 100644 --- a/setup_env.py +++ b/setup_env.py @@ -104,7 +104,7 @@ def run_command(command, shell=False, log_step=None): subprocess.run(command, shell=shell, check=True) except subprocess.CalledProcessError as e: logging.error(f"Error occurred while running command: {e}") - sys.exit(1) + sys.exit(1) def prepare_model(): _, arch = system_info() diff --git a/utils/e2e_benchmark.py b/utils/e2e_benchmark.py index 07f93ed72..464780bd5 100644 --- a/utils/e2e_benchmark.py +++ b/utils/e2e_benchmark.py @@ -20,7 +20,7 @@ def run_command(command, shell=False, log_step=None): subprocess.run(command, shell=shell, check=True) except subprocess.CalledProcessError as e: logging.error(f"Error occurred while running command: {e}") - sys.exit(1) + sys.exit(1) def run_benchmark(): build_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "build") From 77bb5e963836681f1acdedc7a4b1ab2019151eff Mon Sep 17 00:00:00 2001 From: Jah-yee Date: Fri, 13 Mar 2026 22:39:10 +0800 Subject: [PATCH 3/3] Fix const-correctness error in ggml_vec_dot_i2_i8_s_Nx1 Line 811 initializes 'int8_t * y_col' from const pointer 'y', causing compilation error on Apple Clang: 'cannot initialize a variable of type int8_t * with an rvalue of type const int8_t *'. Changed to 'const int8_t * y_col' to match the const-correct usage pattern in the function (line 906 already uses const int8_t *). --- src/ggml-bitnet-mad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ggml-bitnet-mad.cpp b/src/ggml-bitnet-mad.cpp index 4ba9d6509..ad18bac04 100644 --- a/src/ggml-bitnet-mad.cpp +++ b/src/ggml-bitnet-mad.cpp @@ -808,7 +808,7 @@ void ggml_vec_dot_i2_i8_s_Nx1(int n, float * s, size_t bs, const void * vx, size accu[iy] = _mm256_setzero_si256(); } - int8_t * y_col = y + col * by; + const int8_t * y_col = y + col * by; for (int i = 0; i < group32_num; i++) { const uint8_t *px = x + i * 1024;