fix: misc module cleanup — deprecate cpu_optimizer, remove dead imports#36
Closed
nathanhubens wants to merge 1 commit into
Closed
fix: misc module cleanup — deprecate cpu_optimizer, remove dead imports#36nathanhubens wants to merge 1 commit into
nathanhubens wants to merge 1 commit into
Conversation
Phase 1 of misc module revamp: - Remove unused `import F` from bn_folding and fc_decomposer - Replace cpu_optimizer with optimize_for_cpu (torch.compile backend) - Old accelerate_model_for_cpu deprecated with shim - Fixed bug: torch.jit.script doesn't use example_input (was dead param) - Removed dependency on deprecated optimize_for_mobile - Added tests (was skip_exec with zero coverage) - Add conv_decomposer.ipynb and cpu_optimizer.ipynb to _quarto.yml sidebar - Add cpu_optimizer to misc/all.py exports - Fix rank_ratio → percent_removed doc bug in fc_decomposer tutorial
Collaborator
Author
|
Included in #38 |
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
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.
Summary
Phase 1 of misc module revamp.
Changes
accelerate_model_for_cpuwithoptimize_for_cpuoptimize_for_cpu(model, sample, backend="compile")usingtorch.compiletorch.jit.scriptdoesn't useexample_input(was dead param)optimize_for_mobileskip_execwith zero coverage)import torch.nn.functional as Ffrom bn_folding and fc_decomposerconv_decomposer.ipynbandcpu_optimizer.ipynbto_quarto.ymlsidebar (were invisible)cpu_optimizertomisc/all.pyexports (was missing)rank_ratio→percent_removeddoc bug in fc_decomposer tutorialTest plan
nbdev-testfull suite passes (including new cpu_optimizer tests)accelerate_model_for_cpustill works (emits DeprecationWarning)