perf: reduce compile and IO overhead - #12
Closed
alvgeppetto wants to merge 1 commit into
Closed
Conversation
- Make ACCUM_STEPS configurable via ANE_ACCUM_STEPS env var (default 10) Higher values = fewer exec() restarts, better effective throughput - Make MAX_COMPILES configurable via ANE_MAX_COMPILES env var (default 100) Allows tuning for different hardware/OS versions - IOSurface pooling: reuse freed surfaces by size instead of creating new Avoids repeated IOSurfaceCreate/CFRelease on every recompile cycle Pool capacity: 128 surfaces with swap-remove for O(n) lookup
ebowwa
pushed a commit
to ebowwa/ANE
that referenced
this pull request
Aug 4, 2026
…uristics ane_mil.parse() extracts funcs (signature inputs/outputs) and statements (op, args, attrs, output dtype/shape) via balanced bracket matching; ane_mil.validate() checks the Orion catalog precisely — banned ops (concat/gelu) by op-name, conv bias=, matmul transpose-const (maderix#12), 32K-channel conv (maderix#16), output liveness (maderix#14), multi-output uniform (#2) + alphabetical binding (maderix#3), multi-input alphabetical (maderix#19). ane_lint.lint_mil uses the parser as primary and falls back to the regex checks when a program won't parse; size checks (maderix#4 min / maderix#18 input-uniform) and perf advisories always run. End-to-end via /raw/lint (func-wrapped gelu -> ANE010, relu -> ok). 71 tests (9 new parser tests). Co-Authored-By: Claude <noreply@anthropic.com>
ebowwa
pushed a commit
to ebowwa/ANE
that referenced
this pull request
Aug 4, 2026
maderix#9 GraphDescriptor: operation entries now include op.args (graph dependencies). Constants use their BLOBFILE/file attr as digest instead of placeholder "const". maderix#10 IR pipeline: rejects unparseable MIL at the tensor-IR level (rejected_at_tensor_ir) before reaching ANE-IR lint — previously reported "validated" for meaningless input. maderix#11 ExecutionPlan + PlanSegment: frozen=True (immutable as documented). __post_init__ uses object.__setattr__ for the auto-generated id. maderix#12 Communication: recv() now verifies consumer_exec_id + checksum before returning data. maderix#13 Transforms: docstring honestly states these are VariantIntents (metadata), not transformed graphs — quantize() labels int8, doesn't produce int8 MIL. maderix#14 Autotuner: select_and_benchmark now passes weights to bridge.bench (previously discarded). Evidence keyed by real mil-hash fingerprint + shape, not "auto"/"default". All-failed case returns best_variant=None instead of picking an infinite-latency variant. bridge.bench now accepts a weights param (for constant-weight autotuning). 138 tests. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Reduce compile and IO overhead in the training loop.
Changes:
Both make train and make train_large compile cleanly on macOS.