Skip to content

[LLM:Perf] Enable Transformer C4 graphs across backends#4621

Closed
wangzhaode wants to merge 1 commit into
masterfrom
sync/20260714-1306
Closed

[LLM:Perf] Enable Transformer C4 graphs across backends#4621
wangzhaode wants to merge 1 commit into
masterfrom
sync/20260714-1306

Conversation

@wangzhaode

Copy link
Copy Markdown
Collaborator

GitOrigin-RevId: 256d8e74969a9de52dfe910386f4fb60abc1df54

Description

Module

Type

  • Feature
  • Bugfix
  • Perf
  • Refact
  • Style
  • Doc
  • Test
  • Chore

Checklist

  • Commit message follows [Module:Type] Description format
  • Code compiles without errors
  • Tested on relevant platform(s)
  • No unrelated format or style changes included

GitOrigin-RevId: 256d8e74969a9de52dfe910386f4fb60abc1df54
@wangzhaode
wangzhaode requested a review from jxt1234 July 14, 2026 05:08
for (int c = 0; c < channelBlock; ++c) {
int count = ALIMIN(pack, channel - c * pack);
auto srcOffset = ((channelBlockOffset + c) * seqLen + token) * pack * bytes;
::memcpy(dst + c * pack * bytes, src + srcOffset, count * bytes);
for (int c = 0; c < channelBlock; ++c) {
int count = ALIMIN(pack, channel - c * pack);
auto dstOffset = (c * seqLen + token) * pack * bytes;
::memcpy(dst + dstOffset, src + c * pack * bytes, count * bytes);
buf->free(mTmpQC4);
mTmpKC4 = buf->alloc(threadNumber * mKvNumHead * mHeadDim * bytes);
buf->free(mTmpKC4);
mTmpQOutput = buf->alloc(threadNumber * mNumHead * mHeadDim * bytes);
mTmpKC4 = buf->alloc(threadNumber * mKvNumHead * mHeadDim * bytes);
buf->free(mTmpKC4);
mTmpQOutput = buf->alloc(threadNumber * mNumHead * mHeadDim * bytes);
mTmpKOutput = buf->alloc(threadNumber * mKvNumHead * mHeadDim * bytes);
@wangzhaode wangzhaode closed this Jul 14, 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.

2 participants