Repository navigation
Conversation
…and AscendLean models - Narrow operator-verify to standalone and numericbridge_companion single-operator modes (remove heuristic audit_scan.py and repo_audit mode) to mirror operator-optimize - Expand AscendLean.UBModel (alignUp32, ubDisjoint, ubCastSafe) and AscendLean.TritonModel (runOnline_fixed_all_neginf, sumRow lemmas) - Enrich L1-L4 taxonomy and harden triage.py classification priority and input validation - Harden lean_check.py against guillemet-quoted axioms and debug.skipKernelTC, support attributed theorems, and probe toolchain versions in project cwd - Sync top-level docs (AGENTS.md, README*.md, docs/project-architecture.md) and references (tcb.md, handoff.md)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the sixth installable skill,
operator-verify, providing offline Lean 4 formal verification for discrete accelerator operator invariants (Triton-Ascend, Ascend C, Triton, CUDA) on a single localized operator without requiring target NPU/GPU hardware.operator-verifyis intentionally scoped as a crisp single-operator mirror tooperator-optimizeandprecision-compare:precision-compare/operator-optimize: on-device quantitative floating-point rounding accuracy (vs FP64) and paired runtime speed (kernel_check.py).operator-verify: offline qualitative/discrete safety and equivalence proofs (index_and_mask,resource_capacity,pipeline_sync,semantic_equivalence) plus machine-checked counterexamples for bugs that routine dense/power-of-2 unit tests routinely miss (triage.py+lean_check.py+lean_lib/AscendLean/).What's Added
skills/operator-verify/SKILL.mdandreferences/{taxonomy,handoff,tcb}.md:index_and_mask,resource_capacity,pipeline_sync,semantic_equivalencevsnumeric_roundingrouted back to dynamic tools), JSON schemas (verify-request.json,verify-report.json), two single-operator entry modes (standaloneandnumericbridge_companionacceptingresult/optimize/<operator>/handoff.json), and explicit TCB disclosure rules.skills/operator-verify/scripts/):triage.py: scope classifier andverify-request.jsonbuilder (routesnumeric_roundingback toprecision-compare).lean_check.py: Lean 4 type-checker and soundness auditor (rejects empty/theorem-less files,sorry/sorryAx/admit, customaxiom,native_decide/unsafe/opaque/implemented_by/extern/ofReduceBool/trustCompiler, and compilersorrywarnings; records SHA-256 provenance, toolchain version, public theorems, preconditions, and TCB assumptions).skills/operator-verify/lean_lib/AscendLean/) (leanprover/lean4:v4.36.0, pure Lean 4 core with no Mathlib solake buildcompletes in seconds offline):PipeModel.lean: 4 Ascend DaVinci pipelines (PIPE_MTE2,PIPE_V,PIPE_MTE3,PIPE_S) and all 12 directed FIFOHardEvents detecting cross-pipe RAW/WAR/WAW hazards, wait underflow, and leaked tokens.UBModel.lean: Ascend A3 (192 KiB) / A5 (248 KiB) UB capacity bounds,INT32_MAX/INT64_MAX, unboundednextPow2withle_nextPow2,le_ceilDiv_mul,alignUp32,ubDisjoint,ubCastSafe(mixed-width & partial-overlap UB aliasing), and AscendC packed vector mask model.TritonModel.lean:BitVec 64bitwise select,ExtInttiled reductions, IEEE-754 online-softmax(-inf) - (-inf) = NaNabstract domain (runOnline_fixed_all_neginf), masked-loadLaneValUB padding taint (sumRow,sumRow_zero_padded,sumRow_undef_poisons), andindexedLoadSafe..gitignore(ignore.lake/),scripts/install.py(bundleoperator-verify, exclude.lake/and__pycache__/),AGENTS.md,README.md,README.zh-CN.md,docs/project-architecture.md, andtools/README.md.Verification
cd skills/operator-verify/lean_lib && lake build— passed (10/10 jobs).python3 -B -m scripts validate— passed (6 skills valid; checked 246 local links in 41 Markdown files.).python3 -B -m scripts smoke-install— passed (Clean installation of 6 skills...).tools/anonymize_scan.pyon all 14 source files inskills/operator-verify/— clean (0 findings).sgl-kernel-npu,vllm-ascend,RL-Kernel, andFlagGems(40 paired Lean 4 refutations and universal proofs, 133 public theorems / 144 total including private helpers, zerosorry/ custom axioms).Optional Follow-ups for Maintainer Alignment (Non-blocking)
This Draft PR intentionally leaves
skills/numericbridge/references/workflow.mdand server-side community schemas untouched to stay zero-invasive. Would appreciate alignment on two optional next steps:skills/numericbridge/references/workflow.md): Whether to add an optional offline pre-gate jump tooperator-verifyduringDiagnose/Precision optimization(including whenoperator-optimizeauthors a new Triton/Ascend C kernel) when discrete structural/boundary/sync invariants apply, or keepoperator-verifyexplicitly invoked for now.operator-verificationevidence & badge): Todaycommunity/acceptsnative-runtime/retained-measurementsandoperator-optimizationbundles. In a follow-up, would it make sense to add an optionaloperator-verificationevidence bundle type pointing toverify-report.json(schema inskills/operator-verify/references/handoff.md) so#/casescan surface formal verification receipts alongside dynamic runs?