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

[Feature] Add the support for musa device support #1453

Merged
merged 6 commits into from
Jan 11, 2024

Conversation

hanhaowen-mt
Copy link
Contributor

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. By the way, if you're not familiar with how to use pre-commit to fix lint issues or add unit tests, please refer to Contributing to OpenMMLab.

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 repos?
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

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDetection or MMPretrain.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Dec 7, 2023

CLA assistant check
All committers have signed the CLA.

@zhouzaida
Copy link
Collaborator

HI @hanhaowen-mt , thanks for your contribution. Have you validated this support in downstream repos?

@hanhaowen-mt
Copy link
Contributor Author

HI @hanhaowen-mt , thanks for your contribution. Have you validated this support in downstream repos?

hi, I am still validating it yet

@hanhaowen-mt
Copy link
Contributor Author

It is a draft, I am still struggling with many problems.....

@hanhaowen-mt
Copy link
Contributor Author

目前mmcv已经适配完毕,但是还有些bug需要修复,由于mmengine是一个纯py代码库,所以我想可以先合入也不影响?

@hanhaowen-mt
Copy link
Contributor Author

image
为什么会说import不了pytorch....
@zhouzaida

@zhouzaida
Copy link
Collaborator

zhouzaida commented Jan 9, 2024

command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils
这一部分是用来测试在没有 pytorch 的环境下,有些模块也可以正常使用,例如 logging 模块。

https://github.com/open-mmlab/mmengine/pull/1453/files#diff-32b2a08b237dff2199ee47140807860c85574eab680060ce98ee4016866ddca1R17 这里 import 了 device 模块,device/utils.py 在这里 import 了 torch(https://github.com/open-mmlab/mmengine/pull/1453/files#diff-32b2a08b237dff2199ee47140807860c85574eab680060ce98ee4016866ddca1R17),所以会报错。

@hanhaowen-mt hanhaowen-mt force-pushed the hhw_mmengine branch 8 times, most recently from f7543e2 to 658a2f2 Compare January 9, 2024 10:31
@zhouzaida
Copy link
Collaborator

@hanhaowen-mt 你好,已完成 review,请根据 comment 进行修改。另外,想确认一下,此 PR 是否已在 mmdet 进行验证?

@hanhaowen-mt
Copy link
Contributor Author

hanhaowen-mt commented Jan 10, 2024

@hanhaowen-mt 你好,已完成 review,请根据 comment 进行修改。另外,想确认一下,此 PR 是否已在 mmdet 进行验证?

@zhouzaida 修改完成,open-mmlab/mmdetection#11352 mmdet的pr也提了,都是验证过的

@zhouzaida
Copy link
Collaborator

@hanhaowen-mt 最后一轮 comment 了,可以改完再验证一下,没问题就可以合了

@hanhaowen-mt
Copy link
Contributor Author

@hanhaowen-mt 最后一轮 comment 了,可以改完再验证一下,没问题就可以合了

搞定了,这个pr先合了吧

@zhouzaida
Copy link
Collaborator

@hanhaowen-mt 你好,mmengine/hooks/empty_cache_hook.py 这里可以再改一下,然后单元测试根据有没有 cuda skip 掉就行可以。修完这个就可以合了。

@hanhaowen-mt hanhaowen-mt force-pushed the hhw_mmengine branch 2 times, most recently from e99bf2c to f7c0b07 Compare January 11, 2024 05:13
@zhouzaida zhouzaida changed the title add musa device support, skip some ut, can find the place that is skipped by find haowen.han [Feature] Add the support for musa device support Jan 11, 2024
@zhouzaida zhouzaida merged commit 3d8a611 into open-mmlab:main Jan 11, 2024
17 of 20 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.

4 participants