Skip to content

MNN:Refractor: Don't copy kvcache when meta is not the same#4102

Merged
wangzhaode merged 1 commit intoalibaba:masterfrom
jxt1234:feature/clone_opt
Mar 10, 2026
Merged

MNN:Refractor: Don't copy kvcache when meta is not the same#4102
wangzhaode merged 1 commit intoalibaba:masterfrom
jxt1234:feature/clone_opt

Conversation

@jxt1234
Copy link
Collaborator

@jxt1234 jxt1234 commented Jan 7, 2026

  1. 根据 KVMeta 是否一致,来判断是否在 clone attention 时共享 kvcache
  2. 支持用户在 clone module 时传入 runtimemanager

@wangzhaode
Copy link
Collaborator

@jxt1234 这个现在是否还需要修改?

@jxt1234
Copy link
Collaborator Author

jxt1234 commented Mar 9, 2026

不需要修改了,可以合

@wangzhaode wangzhaode merged commit 24e5457 into alibaba:master Mar 10, 2026
6 checks passed
@jxt1234 jxt1234 deleted the feature/clone_opt branch March 10, 2026 09:54
wangzhaode added a commit that referenced this pull request Mar 11, 2026
1. Fix CloneContext::getOrClone removed but still used in ConvBNReluFusedModule
   (from #4102: Don't copy kvcache when meta is not the same)
2. Fix null pointer crash in PTQ calibration when debug mode is off
   (from #4151: Fix cosine distance calculation error in offline quantization)
3. Fix Shape op defaultDimentionFormat forced to NCHW breaking TF models
   (from #4230: Fix shape op compute onnx's NC4HW4 input error)
4. Fix ShapeOnnx converter always setting OpParameter_ShapeParam, causing new
   models without start/end to be incompatible with old engines
   (from #4217: Support ONNX Shape start/end)

Discussed-in: Merge-Request 26261909 , URL: https://code.alibaba-inc.com/AliNN/AliNNPrivate/codereview/26261909
GitOrigin-RevId: 853d4f4d6b794e24023b8ac758e3377b49db580f
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