-
Notifications
You must be signed in to change notification settings - Fork 2
Sh/decalibrated #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
0pendansor
wants to merge
12
commits into
dan/release
Choose a base branch
from
sh/decalibrated
base: dan/release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sh/decalibrated #29
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Models.apply_onnx_shape.\n\nResnet compatibility\n\nResnet\n- [ Y ] Slice\n- [ Y ] Run
…) → Mul (frequency domain) → DFT (inverse).
…lly creates metadata.json with FFT operation details and convolution replacement tracking.
…models reflecting Conv → DFT → Mul → DFT transformations
…ompatibility issues
…er.py and onnx_slicer.py, preserving all shape information and batch sizes
…at structure with chained metadata
…ments with names like segment_0_1, segment_0_2, etc. in single parent folder
- Added ezkl_conv_splitter.py for FFT-based Conv decomposition - Added simple_multiply_circuit.py for basic multiply operations - Added simple_multiply_segment5.py for segment_5 specific circuit - Generated ONNX circuits for FFT, Multiply, and IFFT operations - Compiled multiply circuit with k=22 (logrows=22) - Setup phase in progress - VK completed, PK generation pending - Current state: Ready to resume EZKL setup and prove/verify pipeline Files committed: - Python utilities for circuit generation - EZKL settings and compiled circuit for segment_5 - Working state to resume from k=22 setup
…o parallel processing. the best outcome coming from set logrow = 20 and run in 16 chunks, NO need for rescaling, sample input should be provided. update support: - adoptive chunk size - skip unnecessary chunking ( layer 5) & recommend Proof of inference whole.
…eline_demo.py ## EZKL ResNet Integration Complete ### 🔄 Updated decomposer.py → EZKL Conv Splitter - **Full FFT-based convolution decomposition** - **EZKL-compatible operators only** (MatMul, Mul, Pad, opset 18) - **Pre-computed kernel FFT** for circuit efficiency - **3-circuit split**: FFT → MUL → IFFT - **Metadata generation** for circuit chaining ### 🚀 Complete EZKL Workflow 1. **Run decomposer.py**: ```bash python decomposer.py ``` - Decomposes all ResNet segments into EZKL circuits - Creates FFT, MUL, IFFT circuits per segment - Generates metadata for chaining 2. **Run ezkl_pipeline.py**: ```bash python src/utils/ezkl_pipeline.py ``` - Parallel processing of MUL chunks (16 chunks, 4 channels each) - Complete EZKL proof generation pipeline - Witness data chaining (FFT→MUL→IFFT) 3. **Test with pipeline_demo.py**: ```bash python pipeline_demo.py ``` - Inference comparison (original vs decomposed) - Parallel processing demonstration - Results summary and status ### 🎯 Key Features - ✅ **ResNet full model support** - ✅ **Parallel 16-chunk MUL processing** - ✅ **EZKL proof generation pipeline** - ✅ **Automatic circuit decomposition** - ✅ **Metadata-driven workflow** - ✅ **k=17 optimization for performance** ### 📋 Usage Instructions ```bash # 1. Decompose ResNet segments python decomposer.py # 2. Run parallel EZKL pipeline python src/utils/ezkl_pipeline.py # 3. Test and verify results python pipeline_demo.py ``` ### 🔧 Technical Details - **Input**: ResNet slices from `src/models/resnet/slices/` - **Output**: EZKL circuits in `src/models/resnet/ezkl_circuits/` - **MUL chunks**: 16 parallel chunks (4 channels each = 64 total) - **Proofs**: Generated in `ezkl_circuits/segment_X/proofs/` - **Verification**: End-to-end proof verification
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.