Skip to content
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

Add torch flop counter to profiler #693

Merged
merged 10 commits into from
Oct 24, 2023
Merged

Add torch flop counter to profiler #693

merged 10 commits into from
Oct 24, 2023

Conversation

gabrielilharco
Copy link
Collaborator

No description provided.

@rwightman
Copy link
Collaborator

rwightman commented Oct 23, 2023

@gabrielilharco with this, might be worth putting fvcore import in a try/catch so it'll run natively with torch if fvcore isn't installed (minus act count), and then assert if fvcore profiler is selected and fvcore module not installed?

@gabrielilharco
Copy link
Collaborator Author

Good call, will update

@gabrielilharco
Copy link
Collaborator Author

Removing hierarchical flop counting for now until pytorch/pytorch#111809 is resolved. With #699 it now works for all supported models

@rwightman
Copy link
Collaborator

@gabrielilharco looks good, do you want to merge #693 #699 #701 to main and release?

@gabrielilharco
Copy link
Collaborator Author

Sounds good!

@gabrielilharco gabrielilharco merged commit 2a46bd9 into main Oct 24, 2023
5 checks passed
@gabrielilharco gabrielilharco deleted the profile branch October 24, 2023 16:01
Interpause pushed a commit to Interpause/open_clip that referenced this pull request May 23, 2024
* Add torch flop counter

* Moving fvcore to a try/catch

* Fix undesired behavior of `transform.PreprocessCfg`

* Remove cls_embed arg from forward/encode_image fns

* Fix `model.get_model_preprocess_cfg`

* Move CLIPA weights to UCSC-VLAA org

* Remove outdated comment in pretrained.py

* Fix arg not being passed to `image_transform` from `image_transform_v2`

* remove hierarchical flop counting

---------

Co-authored-by: Santiago Castro <[email protected]>
Co-authored-by: Ross Wightman <[email protected]>
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.

3 participants