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 GPU Acceleration Apple silicon mac #1699

Merged
merged 5 commits into from Jul 26, 2023
Merged

Conversation

NripeshN
Copy link
Contributor

@NripeshN NripeshN commented Jul 8, 2023

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Please describe the motivation of this PR and the goal you want to achieve through this PR.

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here and update the documentation.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@CLAassistant
Copy link

CLAassistant commented Jul 8, 2023

CLA assistant check
All committers have signed the CLA.

@OpenMMLab-Assistant-004

Hi @NripeshN,

We'd like to express our appreciation for your valuable contributions to the mmpretrain. Your efforts have significantly aided in enhancing the project's quality.
It is our pleasure to invite you to join our community thorugh Discord_Special Interest Group (SIG) channel. This is a great place to share your experiences, discuss ideas, and connect with other like-minded people. To become a part of the SIG channel, send a message to the moderator, OpenMMLab, briefly introduce yourself and mention your open-source contributions in the #introductions channel. Our team will gladly facilitate your entry. We eagerly await your presence. Please follow this link to join us: ​https://discord.gg/UjgXkPWNqA.

If you're on WeChat, we'd also love for you to join our community there. Just add our assistant using the WeChat ID: openmmlabwx. When sending the friend request, remember to include the remark "mmsig + Github ID".

Thanks again for your awesome contribution, and we're excited to have you as part of our community!

@mzr1996
Copy link
Member

mzr1996 commented Jul 25, 2023

Hello, you modified the iTPNClipHead, SwAVHook, and gradio demo, so how did you notice these incompatible places and are there other incompatible places?

Copy link
Member

@mzr1996 mzr1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactor the device selection logic by mmengine.device.get_device, It can simplify the code and it's more generic. Please check it or test it if you can.

projects/gradio_demo/launch.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 57.48% and project coverage change: -19.70% ⚠️

Comparison is base (89eaa92) 85.22% compared to head (f7db553) 65.52%.
Report is 84 commits behind head on main.

❗ Current head f7db553 differs from pull request most recent head 4e06dad. Consider uploading reports for the commit 4e06dad to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1699       +/-   ##
===========================================
- Coverage   85.22%   65.52%   -19.70%     
===========================================
  Files         229      330      +101     
  Lines       17243    25671     +8428     
  Branches     2707     4088     +1381     
===========================================
+ Hits        14696    16822     +2126     
- Misses       2046     8233     +6187     
- Partials      501      616      +115     
Flag Coverage Δ
unittests 65.52% <57.48%> (-19.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
mmpretrain/apis/image_retrieval.py 21.42% <19.04%> (+0.88%) ⬆️
mmpretrain/apis/image_caption.py 30.64% <30.64%> (ø)
mmpretrain/apis/feature_extractor.py 37.50% <40.00%> (+0.18%) ⬆️
mmpretrain/apis/model.py 75.65% <65.90%> (-4.02%) ⬇️
mmpretrain/apis/base.py 72.44% <72.44%> (ø)
mmpretrain/__init__.py 100.00% <100.00%> (ø)
mmpretrain/apis/__init__.py 100.00% <100.00%> (ø)
mmpretrain/apis/image_classification.py 86.48% <100.00%> (+0.93%) ⬆️

... and 149 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NripeshN
Copy link
Contributor Author

I refactor the device selection logic by mmengine.device.get_device, It can simplify the code and it's more generic. Please check it or test it if you can.

LGTM, Thank you!

@fangyixiao18 fangyixiao18 merged commit 4d1dbaf into open-mmlab:main Jul 26, 2023
8 of 9 checks passed
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.

None yet

5 participants