JSTPRV-165 Share initializer tensors#281
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
WalkthroughRefactors tensor storage to use reference-counted Arcs and adds a shared quantization cache. Updates: Changes
Sequence Diagram(s)sequenceDiagram
participant Parser as ONNX Parser
participant Graph as LayerGraph
participant Quant as Quantizer
participant Cache as WeightCache
Parser->>Graph: parse model.initializers & nodes
Note right of Graph: wrap initializers/constants once\ninto Arc<TensorData>
Graph->>Cache: populate cache entries for initializers (Arc)
Graph->>Quant: provide layers with inputs referencing Arc weights
Quant->>Cache: lookup weight by name
alt cache hit
Cache-->>Quant: Arc<TensorData> (clone)
Quant->>Graph: insert Arc into layer.weights
else cache miss & needs quantization
Quant->>Quant: compute quantized int_data -> new TensorData
Quant->>Cache: insert Arc(new TensorData)
Cache-->>Quant: Arc(new TensorData)
Quant->>Graph: insert Arc into layer.weights
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…eep copies and guarantee consistent quantization across tied weights
0694a41 to
02acecd
Compare
Description
Related Issue
Type of Change
Checklist
Deployment Notes
Additional Comments
Summary by CodeRabbit
Performance Improvements
Chores