Skip to content

Avoid copying embedding table in static shape runner - #85

Closed
blevine1 wants to merge 2 commits into
apple:mainfrom
blevine1:avoid-embedding-table-copy
Closed

Avoid copying embedding table in static shape runner#85
blevine1 wants to merge 2 commits into
apple:mainfrom
blevine1:avoid-embedding-table-copy

Conversation

@blevine1

@blevine1 blevine1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

We currently provide a pre-allocated output view for the embedding table to CoreAI, which has it copy the embedding table into it. However since it's a constant, if we don't use the pre-allocated output view flow, it'll return an NDArray backed by the constant directly without making a copy.

@blevine1
blevine1 requested a review from tjia1818 July 6, 2026 18:41
@blevine1

blevine1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author
  • I'm investigating a potential perf issue being observed with this change. Please do not merge it

@tjia1818

Copy link
Copy Markdown
Contributor

Closing (too long since open). Pls reopen once ready

@tjia1818 tjia1818 closed this Aug 23, 2026
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.

3 participants