Skip to content

Conversation

@2292amit
Copy link

Summary

Introduces network_fbcnn_opt.py - a compilation-optimized version of FBCNN with 100% backward compatibility.

Key Features

  • Compilation-ready: Removes dynamic padding and conditional logic that prevent torch.compile() optimization
  • Drop-in replacement: Identical API, works with existing checkpoints and scripts
  • Performance: Enables significant speedup with torch.compile() while maintaining baseline performance
  • Delete intermediate tensors: Deletes temporary tensors for better memory usage

Implementation

  • FBCNNCore: Pure tensor operations, no dynamic shapes or branching
  • FBCNN wrapper: Handles padding/QF conversion, maintains original interface
  • Compilation API: Methods like compile_core(), is_compiled(), reset_to_original_core()

Testing & Documentation

  • Comprehensive unit tests covering all functionality

Enables modern PyTorch optimization without breaking existing workflows.

@2292amit 2292amit changed the title FBCNN implementation removing dynamic paths in forward to make the model optimised and ready for compilation FBCNN Inference: implementation removing dynamic paths in forward to make the model optimised and ready for compilation Sep 11, 2025
@2292amit 2292amit changed the title FBCNN Inference: implementation removing dynamic paths in forward to make the model optimised and ready for compilation FBCNN Inference removing dynamic paths in forward to make the model optimised and ready for compilation Sep 11, 2025
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.

1 participant