From 8d09cdbef4f645001cc6e6bfc45eb1ca86d8ba27 Mon Sep 17 00:00:00 2001 From: Digant Desai Date: Fri, 30 Oct 2026 16:28:42 -0700 Subject: [PATCH] Update [ghstack-poisoned] --- .ci/scripts/test-native.sh | 5 +++-- .github/workflows/test-native.yml | 9 ++++++--- backends/native/test/CMakeLists.txt | 11 +++++++---- backends/native/test/runtime/ggml/BUCK | 10 ++++++---- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.ci/scripts/test-native.sh b/.ci/scripts/test-native.sh index 98139a453e2..fadbfe75840 100644 --- a/.ci/scripts/test-native.sh +++ b/.ci/scripts/test-native.sh @@ -36,8 +36,9 @@ case "${component}" in -DEXECUTORCH_BUILD_NATIVE_VISION_RUNNER=ON -DGGML_NATIVE=OFF ) - targets+=(run_hf_llm_ggml native_ggml_engine_test native_llm_runner_utils_test run_classification_ggml_cpu) - test_regex='^native_(ggml_engine|llm_runner_utils)_test$' + # TODO: run the other sample tests once they pass. + targets+=(run_hf_llm_ggml native_ggml_engine_test native_llm_runner_utils_test run_classification_ggml_cpu native_output_check_test native_ggml_sample_test) + test_regex='^native_(ggml_engine|llm_runner_utils|output_check)_test$|^native_ggml_sample_test_act_quant$' ;; vulkan) cmake_args+=( diff --git a/.github/workflows/test-native.yml b/.github/workflows/test-native.yml index c7a7aae2f0c..71d051f1679 100644 --- a/.github/workflows/test-native.yml +++ b/.github/workflows/test-native.yml @@ -17,6 +17,8 @@ on: - backends/cpu/CMakeLists.txt - backends/cpu/runtime/** - backends/native/** + - backends/cadence/utils/FACTO + - backends/test/suite/operators/test_linear.py - backends/vulkan/CMakeLists.txt - backends/vulkan/cmake/** - backends/vulkan/runtime/api/** @@ -113,9 +115,10 @@ jobs: if [[ "${NATIVE_COMPONENT}" == "ggml" ]]; then ./install_requirements.sh --use-pt-pinned-commit - # The LLM runner test imports executorch from src/ without installing the - # wheel, so install its export-time dependencies directly. - pip install flatbuffers ruamel.yaml tabulate \ + # The LLM runner test and the op sample generator import executorch from + # src/ without installing the wheel, so install their export-time + # dependencies directly. + pip install flatbuffers gguf ruamel.yaml tabulate \ "$(grep -E '^transformers\b' requirements-examples.txt)" fi diff --git a/backends/native/test/CMakeLists.txt b/backends/native/test/CMakeLists.txt index 3fdc35066d2..6efaef06591 100644 --- a/backends/native/test/CMakeLists.txt +++ b/backends/native/test/CMakeLists.txt @@ -154,10 +154,13 @@ if(EXECUTORCH_BUILD_NATIVE_GGML) --device=cpu ) # native_ggml_sample_test_act_quant lets ggml quantize the activations of - # weight-only quantized linears, judged against golden-int8_act. - add_test(NAME native_ggml_sample_test_act_quant - COMMAND native_ggml_sample_test --packages=${_native_op_samples} - --device=cpu --allow_activation_quant_for_weight_only + # weight-only quantized linears, judged against golden-int8_act. ggml + # quantizes them symmetrically per block, not asymmetrically per token like + # the golden, so the biases get one more standard error. + add_test( + NAME native_ggml_sample_test_act_quant + COMMAND native_ggml_sample_test --packages=${_native_op_samples} + --device=cpu --allow_activation_quant_for_weight_only --sigmas=7 ) target_compile_options( native_ggml_sample_test diff --git a/backends/native/test/runtime/ggml/BUCK b/backends/native/test/runtime/ggml/BUCK index 064ee4a1254..84696757b65 100644 --- a/backends/native/test/runtime/ggml/BUCK +++ b/backends/native/test/runtime/ggml/BUCK @@ -94,7 +94,9 @@ _VARIANTS = [ ] # ggml_sample_test_act_quant lets ggml quantize the activations of weight-only -# quantized linears, judged against golden-int8_act. +# quantized linears, judged against golden-int8_act. ggml quantizes them +# symmetrically per block, not asymmetrically per token like the golden, so the +# biases get one more standard error. [ fbcode_target( _kind = runtime.cxx_test, @@ -105,8 +107,8 @@ _VARIANTS = [ ] + flags, env = v.get("env", {}) | v.get("sample_env", {}), remote_execution = v.get("remote_execution"), - # TODO: run in CI once they pass. - labels = ci.labels(ci.map(ci.skip_test())), + # TODO: run the others in CI once they pass. + labels = [] if v["suffix"] + name == "_act_quant" else ci.labels(ci.map(ci.skip_test())), test_main = "//executorch/backends/native/test/samples:sample_test_main", deps = [":ggml_engine_host" + v["suffix"]], **v.get("compat", {}) @@ -114,7 +116,7 @@ _VARIANTS = [ for v in _VARIANTS for name, flags in [ ("", []), - ("_act_quant", ["--allow_activation_quant_for_weight_only"]), + ("_act_quant", ["--allow_activation_quant_for_weight_only", "--sigmas=7"]), ] ]