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

Update ROCm build pre-built packages instructions #3185

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ Note: MMCV requires Python 3.7+.

There are two versions of MMCV:

- **mmcv**: comprehensive, with full features and various CUDA ops out of the box. It takes longer time to build.
- **mmcv-lite**: lite, without CUDA ops but all other features, similar to mmcv\<1.0.0. It is useful when you do not need those CUDA ops.
- **mmcv**: comprehensive, with full features and various CUDA/hip(ROCm) ops out of the box. It takes longer time to build.
- **mmcv-lite**: lite, without CUDA/hip(ROCm) ops but all other features, similar to mmcv\<1.0.0. It is useful when you do not need those CUDA/hip(ROCm) ops.

**Note**: Do not install both versions in the same environment, otherwise you may encounter errors like `ModuleNotFound`. You need to uninstall one before installing the other. `Installing the full version is highly recommended if CUDA is available`.
**Note**: Do not install both versions in the same environment, otherwise you may encounter errors like `ModuleNotFound`. You need to uninstall one before installing the other. `Installing the full version is highly recommended if CUDA/hip(ROCm) is available`.

### Install mmcv

Expand All @@ -93,14 +93,20 @@ If you need to specify the version of mmcv, you can use the following command:
mim install mmcv==2.0.0
```

If you find that the above installation command does not use a pre-built package ending with `.whl` but a source package ending with `.tar.gz`, you may not have a pre-build package corresponding to the PyTorch or CUDA or mmcv version, in which case you can [build mmcv from source](https://mmcv.readthedocs.io/en/latest/get_started/build.html).
If you find that the above installation command does not use a pre-built package ending with `.whl` but a source package ending with `.tar.gz`, you may not have a pre-build package corresponding to the PyTorch or CUDA/hip(ROCm) or mmcv version, in which case you can [build mmcv from source](https://mmcv.readthedocs.io/en/latest/get_started/build.html).

<details>
<summary>Installation log using pre-built packages</summary>


###### 1. For CUDA pre-built packages
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv<br />
<b>Downloading https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/mmcv-2.0.0-cp38-cp38-manylinux1_x86_64.whl</b>


###### 2. For ROCm pre-built packages:
The external [`mmcv-rocm-build` repository](https://github.com/Looong01/mmcv-rocm-build) provides wheels and detailed instructions on how to install MMCV for ROCm.
If you have any questions about it, please open an issue [here](https://github.com/Looong01/mmcv-rocm-build/issues).

</details>

Expand Down Expand Up @@ -131,6 +137,8 @@ you may first refer to this [Frequently Asked Questions](https://mmcv.readthedoc

If you face installation problems or runtime issues, you may first refer to this [Frequently Asked Questions](https://mmcv.readthedocs.io/en/latest/faq.html) to see if there is a solution. If the problem is still not solved, feel free to open an [issue](https://github.com/open-mmlab/mmcv/issues).

If you face some installation issues with ROCm build, you may first refer to [this](https://github.com/Looong01/mmcv-rocm-build/issues) to see if there is a solution or feel free to open an [issue](https://github.com/Looong01/mmcv-rocm-build/issues) if not.

## Citation

If you find this project useful in your research, please consider cite:
Expand Down
18 changes: 13 additions & 5 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ MMCV 支持多种平台,包括:

MMCV 有两个版本:

- **mmcv**: 完整版,包含所有的特性以及丰富的开箱即用的 CUDA 算子。注意完整版本可能需要更长时间来编译。
- **mmcv-lite**: 精简版,不包含 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用 CUDA 算子的话,精简版可以作为一个考虑选项。
- **mmcv**: 完整版,包含所有的特性以及丰富的开箱即用的 CUDA/hip(ROCm) 算子。注意完整版本可能需要更长时间来编译。
- **mmcv-lite**: 精简版,不包含 CUDA/hip(ROCm) 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用 CUDA/hip(ROCm) 算子的话,精简版可以作为一个考虑选项。

**注意**: 请不要在同一个环境中安装两个版本,否则可能会遇到类似 `ModuleNotFound` 的错误。在安装一个版本之前,需要先卸载另一个。`如果 CUDA 可用,强烈推荐安装 mmcv`。
**注意**: 请不要在同一个环境中安装两个版本,否则可能会遇到类似 `ModuleNotFound` 的错误。在安装一个版本之前,需要先卸载另一个。`如果 CUDA/hip(ROCm) 可用,强烈推荐安装 mmcv`。

### 安装 mmcv

Expand All @@ -113,14 +113,20 @@ mim install mmcv
mim install mmcv==2.0.0
```

如果发现上述的安装命令没有使用预编译包(以 `.whl` 结尾)而是使用源码包(以 `.tar.gz` 结尾)安装,则有可能是我们没有提供和当前环境的 PyTorch 版本、CUDA 版本相匹配的 mmcv 预编译包,此时,你可以[源码安装 mmcv](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)。
如果发现上述的安装命令没有使用预编译包(以 `.whl` 结尾)而是使用源码包(以 `.tar.gz` 结尾)安装,则有可能是我们没有提供和当前环境的 PyTorch 版本、CUDA/hip(ROCm) 版本相匹配的 mmcv 预编译包,此时,你可以[源码安装 mmcv](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)。

<details>
<summary>使用预编译包的安装日志</summary>


###### 1. 对于CUDA构建的预编译包:
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv<br />
<b>Downloading https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/mmcv-2.0.0-cp38-cp38-manylinux1_x86_64.whl</b>


###### 2. 对于 ROCm 构建的预编译包:
一个外部 [`mmcv-rocm-build` 仓库](https://github.com/Looong01/mmcv-rocm-build) 提供了如何为 ROCm 安装 MMCV 的 wheels 和详细说明。
如果您对此有任何疑问,请在 [这里](https://github.com/Looong01/mmcv-rocm-build/issues) 打开一个 issue。

</details>

Expand Down Expand Up @@ -148,6 +154,8 @@ mim install mmcv-lite

如果你遇到了安装问题或者运行时问题,请查看[问题解决页面](https://mmcv.readthedocs.io/zh_CN/latest/faq.html)是否已有解决方案。如果问题仍然没有解决,欢迎提 [issue](https://github.com/open-mmlab/mmcv/issues)。

如果您在使用 ROCm 构建时遇到一些安装问题,你可以先参考 [这里](https://github.com/Looong01/mmcv-rocm-build/issues)是否已有解决方案。如果问题仍然没有解决,欢迎提 [issue](https://github.com/Looong01/mmcv-rocm-build/issues)。

## 贡献指南

我们感谢所有的贡献者为改进和提升 MMCV 所作出的努力。请参考[贡献指南](CONTRIBUTING.md)来了解参与项目贡献的相关指引。
Expand Down