Repository navigation
Perf: cache hash and prefetch chain in TensorMap lookup/insert - #5
Open
chenshengxin2026 wants to merge 3 commits into
Open
chenshengxin2026 wants to merge 3 commits into
chenshengxin2026 wants to merge 3 commits into
Conversation
…-sys#456) The pin-commit retry was inside device_worker_main (subprocess), so a segfault in ChipWorker killed the subprocess before the retry could run. - Split run_hw_tasks_subprocess into sim (no retry) and hw (3 retries) - Move PTO-ISA pin retry to main() where the parent process controls it - Subprocess runs once and exits; all retry decisions made by parent - Remove --max-attempts CLI arg (subprocess always single-shot) Co-authored-by: Chao Wang <26245345+ChaoWao@users.noreply.github.com>
…e-sys#462) - Quarantine device on first failure; re-enqueue task for healthy devices (up to MAX_RETRIES across devices), matching ci.sh semantics - Print subprocess logs on failure: sim during pin-commit retry, hw on last retry during pin-commit - Add progress logging ([n/total] PASS/FAIL) for both sim and hw paths - Remove unused `--parallel` flag (parallelism determined by `-d` device count) - Remove unused `PYTHONDONTWRITEBYTECODE` env setting Co-authored-by: Chao Wang <26245345+ChaoWao@users.noreply.github.com>
chenshengxin2026
force-pushed
the
perf/orch-lookup-prefetch-hash-cache
branch
from
April 7, 2026 09:23
7bbd763 to
c6601f7
Compare
- Cache the hash(addr) result from lookup() and reuse it in the subsequent insert() call for INOUT tensors, eliminating a redundant 64-bit multiply per tensor - Add software prefetch of next_in_bucket during chain traversal to hide memory latency on chains longer than one entry - Add lookup/insert/link_entry overloads that accept precomputed hash Benchmarked on Ascend910 (device 11, 100 rounds, 3 runs averaged): benchmark_bgemm -3.8%, other workloads -0.2% to -0.7%.
chenshengxin2026
force-pushed
the
perf/orch-lookup-prefetch-hash-cache
branch
from
April 7, 2026 11:24
b688858 to
a0eff4b
Compare
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
hash(addr)result fromlookup()and reuse it in the subsequentinsert()call for INOUT tensors, eliminating a redundant 64-bit multiply per tensornext_in_bucketduring chain traversal to hide memory latency on chains longer than one entrylookup/insert/link_entryoverloads that accept precomputed hashBenchmark Results
Ascend910 (device 11, 100 rounds, 3 runs averaged):
The bgemm improvement is expected: it has the highest
lookup+deppercentage (45.8% of orch time) and uses INOUT tensors extensively.Testing