Skip to content

Avoid allocations when touching graph LRU entries#155

Open
LiangSu8899 wants to merge 1 commit into
mainfrom
fix/exec-lru-touch-allocation
Open

Avoid allocations when touching graph LRU entries#155
LiangSu8899 wants to merge 1 commit into
mainfrom
fix/exec-lru-touch-allocation

Conversation

@LiangSu8899

Copy link
Copy Markdown
Member

Summary

  • move an existing graph key to the MRU position with std::list::splice
  • preserve the insertion path for previously unseen keys
  • add a focused allocation contract test

Why

Graph replay touches the selected shape key on every invocation. Erasing and reinserting an existing list node performs a host free/allocation pair in the hot path. Splicing the existing node preserves ordering without allocating.

Boundaries

  • no ABI or exported symbol changes
  • no graph selection, eviction, capture, or replay semantic changes
  • no model- or provider-specific behavior
  • new-key insertion remains allocation-permitted setup behavior

Validation

  • Release exec build passed
  • graph LRU allocation test passed
  • 1,000 existing-key touches performed zero allocations
  • unseen-key insertion remained functional and allocation-visible
  • git diff --check passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant