Commit 0e2f8a5c authored by limm's avatar limm
Browse files

add v2.2.0

parent 2754cb11
...@@ -14,13 +14,14 @@ pip install mmcv* (下载的mmcv的whl包) ...@@ -14,13 +14,14 @@ pip install mmcv* (下载的mmcv的whl包)
### 2、使用源码编译方式安装 ### 2、使用源码编译方式安装
#### 编译环境准备 #### 编译环境准备
提供2种环境准备方式 提供基于fastpt不转码编译
1. 基于光源pytorch基础镜像环境:镜像下载地址:[https://sourcefind.cn/#/image/dcu/pytorch](https://sourcefind.cn/#/image/dcu/pytorch),根据pytorch、python、dtk及系统下载对应的镜像版本。 1. 基于光源pytorch基础镜像环境:镜像下载地址:[https://sourcefind.cn/#/image/dcu/pytorch](https://sourcefind.cn/#/image/dcu/pytorch),根据pytorch、python、dtk及系统下载对应的镜像版本。
2. 基于现有python环境:安装pytorch,pytorch whl包下载目录:[http://10.6.10.68:8000/debug/pytorch/dtk24.04.1/](http://10.6.10.68:8000/debug/pytorch/dtk24.04.1/),根据python、dtk版本,下载对应pytorch的whl包。安装命令如下: 2. 基于现有python环境:安装pytorch,fastpt whl包下载目录:[http://10.6.10.68:8000/debug/pytorch/dtk24.04.1/](http://10.6.10.68:8000/debug/pytorch/dtk24.04.1/),根据python、dtk版本,下载对应pytorch的whl包。安装命令如下:
```shell ```shell
pip install torch* (下载的torch的whl包) pip install torch* (下载的torch的whl包)
pip install fastpt* (下载的fastpt的whl包, 安装顺序, 先安装torch,后安装fastpt)
pip install setuptools==59.5.0 wheel pip install setuptools==59.5.0 wheel
``` ```
...@@ -31,11 +32,15 @@ git clone https://developer.hpccube.com/codes/aicomponent/mmcv # 根据编译需 ...@@ -31,11 +32,15 @@ git clone https://developer.hpccube.com/codes/aicomponent/mmcv # 根据编译需
``` ```
- 提供2种源码编译方式(进入mmcv目录): - 提供2种源码编译方式(进入mmcv目录):
``` ```
1. 编译whl包并安装 1. 设置不转码编译环境变量
source /opt/dtk/cuda/env.sh
export USE_FASTPT_CUDA=True
2. 编译whl包并安装
MMCV_WITH_OPS=1 python3 setup.py -v bdist_wheel MMCV_WITH_OPS=1 python3 setup.py -v bdist_wheel
pip install dist/mmcv* pip install dist/mmcv*
2. 源码编译安装 3. 源码编译安装
MMCV_WITH_OPS=1 python3 setup.py install MMCV_WITH_OPS=1 python3 setup.py install
``` ```
#### 注意事项 #### 注意事项
......
{ {
"Linux": [ "Linux": [
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "11.8", "cuda": "11.8",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -11,6 +27,8 @@ ...@@ -11,6 +27,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -18,6 +36,8 @@ ...@@ -18,6 +36,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -27,6 +47,8 @@ ...@@ -27,6 +47,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -36,6 +58,8 @@ ...@@ -36,6 +58,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -47,6 +71,8 @@ ...@@ -47,6 +71,8 @@
"cuda": "11.5", "cuda": "11.5",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -58,6 +84,8 @@ ...@@ -58,6 +84,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -69,6 +97,8 @@ ...@@ -69,6 +97,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -80,6 +110,8 @@ ...@@ -80,6 +110,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -91,6 +123,8 @@ ...@@ -91,6 +123,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -102,6 +136,8 @@ ...@@ -102,6 +136,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -113,6 +149,8 @@ ...@@ -113,6 +149,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -134,6 +172,8 @@ ...@@ -134,6 +172,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -145,6 +185,8 @@ ...@@ -145,6 +185,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -156,6 +198,8 @@ ...@@ -156,6 +198,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -167,6 +211,8 @@ ...@@ -167,6 +211,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -178,6 +224,8 @@ ...@@ -178,6 +224,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -205,10 +253,19 @@ ...@@ -205,10 +253,19 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "10.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{ {
"cuda": "10.1", "cuda": "10.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -236,6 +293,13 @@ ...@@ -236,6 +293,13 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "10.1",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{ {
"cuda": "9.2", "cuda": "9.2",
"torch": "1.7.x", "torch": "1.7.x",
...@@ -256,10 +320,27 @@ ...@@ -256,10 +320,27 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "9.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -267,6 +348,8 @@ ...@@ -267,6 +348,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -276,6 +359,8 @@ ...@@ -276,6 +359,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -287,6 +372,8 @@ ...@@ -287,6 +372,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -298,6 +385,8 @@ ...@@ -298,6 +385,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -309,6 +398,8 @@ ...@@ -309,6 +398,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -320,6 +411,8 @@ ...@@ -320,6 +411,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -346,13 +439,37 @@ ...@@ -346,13 +439,37 @@
"2.0.0rc2", "2.0.0rc2",
"2.0.0rc1" "2.0.0rc1"
] ]
},
{
"cuda": "cpu",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
} }
], ],
"Windows": [ "Windows": [
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "11.8", "cuda": "11.8",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -360,6 +477,8 @@ ...@@ -360,6 +477,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -367,6 +486,8 @@ ...@@ -367,6 +486,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -376,6 +497,8 @@ ...@@ -376,6 +497,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -385,6 +508,8 @@ ...@@ -385,6 +508,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -396,6 +521,8 @@ ...@@ -396,6 +521,8 @@
"cuda": "11.5", "cuda": "11.5",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -407,6 +534,8 @@ ...@@ -407,6 +534,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -418,6 +547,8 @@ ...@@ -418,6 +547,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -429,6 +560,8 @@ ...@@ -429,6 +560,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -440,6 +573,8 @@ ...@@ -440,6 +573,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -451,6 +586,8 @@ ...@@ -451,6 +586,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -462,6 +599,8 @@ ...@@ -462,6 +599,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -473,6 +612,8 @@ ...@@ -473,6 +612,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -484,6 +625,8 @@ ...@@ -484,6 +625,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -495,6 +638,8 @@ ...@@ -495,6 +638,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -549,10 +694,19 @@ ...@@ -549,10 +694,19 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -560,6 +714,8 @@ ...@@ -560,6 +714,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -569,6 +725,8 @@ ...@@ -569,6 +725,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -580,6 +738,8 @@ ...@@ -580,6 +738,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -591,6 +751,8 @@ ...@@ -591,6 +751,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -602,6 +764,8 @@ ...@@ -602,6 +764,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -613,6 +777,8 @@ ...@@ -613,6 +777,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -642,10 +808,18 @@ ...@@ -642,10 +808,18 @@
} }
], ],
"macOS": [ "macOS": [
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -653,6 +827,7 @@ ...@@ -653,6 +827,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -670,6 +845,7 @@ ...@@ -670,6 +845,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -680,6 +856,7 @@ ...@@ -680,6 +856,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -690,6 +867,7 @@ ...@@ -690,6 +867,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -700,6 +878,7 @@ ...@@ -700,6 +878,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -710,6 +889,7 @@ ...@@ -710,6 +889,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
......
# API reference table
Due to the removal of the `mmcv.fileio`, `mmcv.runner`, `mmcv.parallel`, `mmcv.engine`, `mmcv.device` modules, and all classes and most of the functions in the `mmcv.utils` module during the upgrade from MMCV v1.x to MMCV v2.x, which were removed at PR [#2179](https://github.com/open-mmlab/mmcv/pull/2179), PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216), PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217). Therefore, we provide the following API reference table to make it easier to quickly find the migrated interfaces.
## Related issues, PRs and discussions
- [Remove runner, parallel, engine and device](https://github.com/open-mmlab/mmcv/pull/2216)
- [ImportError: cannot import name 'is_list_of' from 'mmcv.utils'](https://github.com/open-mmlab/mmcv/issues/2282)
- [Could not find the files in MMengine which are removed in MMCV_v2x parallel. example, for DataContainer](https://github.com/open-mmlab/mmcv/issues/2934)
- [mmcv.cnn.bricks.registry](https://github.com/open-mmlab/mmengine/discussions/1356)
- [Replace mmcv's function and modules imported with mmengine's](https://github.com/open-mmlab/mmdetection/pull/8594)
## `mmcv.fileio`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| mmcv.fileio.file_client.BaseStorageBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.base.BaseStorageBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/base.py |
| mmcv.fileio.file_client.CephBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | | |
| mmcv.fileio.file_client.PetrelBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.petrel_backend.PetrelBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/petrel_backend.py |
| mmcv.fileio.file_client.MemcachedBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.memcached_backend.MemcachedBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/memcached_backend.py |
| mmcv.fileio.file_client.LmdbBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.lmdb_backend.LmdbBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/lmdb_backend.py |
| mmcv.fileio.file_client.HardDiskBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.file_client.HardDiskBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/file_client.py |
| mmcv.fileio.file_client.HTTPBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.http_backend.HTTPBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/http_backend.py |
| mmcv.fileio.file_client.FileClient | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.file_client.FileClient | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/file_client.py |
| mmcv.fileio.io.load | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.io.load | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/io.py |
| mmcv.fileio.io.dump | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.io.dump | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/io.py |
| mmcv.fileio.io.\_register_handler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.handlers.\_register_handler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/registry_utils.py |
| mmcv.fileio.io.register_handler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.handlers.register_handler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/registry_utils.py |
| mmcv.fileio.parse.list_from_file | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/parse.py | mmengine.fileio.parse.list_from_file | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/parse.py |
| mmcv.fileio.parse.dict_from_file | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/parse.py | mmengine.fileio.parse.dict_from_file | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/parse.py |
| mmcv.fileio.handlers.base.BaseFileHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/base.py | mmengine.fileio.handlers.base.BaseFileHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/base.py |
| mmcv.fileio.handlers.json_handler.set_default | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/json_handler.py | mmengine.fileio.handlers.json_handler.set_default | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/json_handler.py |
| mmcv.fileio.handlers.json_handler.JsonHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/json_handler.py | mmengine.fileio.handlers.json_handler.JsonHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/json_handler.py |
| mmcv.fileio.handlers.pickle_handler.PickleHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/pickle_handler.py | mmengine.fileio.handlers.pickle_handler.PickleHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/pickle_handler.py |
| mmcv.fileio.handlers.yaml_handler.YamlHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/yaml_handler.py | mmengine.fileio.handlers.yaml_handler.YamlHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/yaml_handler.py |
## `mmcv.runner`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mmcv.runner.hooks.logger.base.LoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/base.py | mmengine.hooks.logger_hook.LoggerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/logger_hook.py |
| mmcv.runner.hooks.logger.clearml.ClearMLLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/clearml.py | Similar: mmengine.visualization.vis_backend.ClearMLVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.dvclive.DvcliveLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/dvclive.py | Similar: mmengine.visualization.vis_backend.DVCLiveVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.mlflow.MlflowLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/mlflow.py | Similar: mmengine.visualization.vis_backend.MLflowVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.neptune.NeptuneLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/neptune.py | Similar: mmengine.visualization.vis_backend.NeptuneVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.pavi.PaviLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/pavi.py | | |
| mmcv.runner.hooks.logger.segmind.SegmindLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/segmind.py | | |
| mmcv.runner.hooks.logger.tensorboard.TensorboardLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/tensorboard.py | Similar: mmengine.visualization.vis_backend.TensorboardVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.text.TextLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/text.py | | |
| mmcv.runner.hooks.logger.wandb.WandbLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/wandb.py | Similar: mmengine.visualization.vis_backend.WandbVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.checkpoint.CheckpointHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/checkpoint.py | mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.closure.ClosureHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/closure.py | | |
| mmcv.runner.hooks.ema.EMAHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/ema.py | mmengine.hooks.ema_hook.EMAHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/ema_hook.py |
| mmcv.runner.hooks.evaluation.EvalHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/evaluation.py | Some features have been moved to: mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.evaluation.DistEvalHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/evaluation.py | Some features have been moved to: mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.hook.HOOKS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/hook.py | mmengine.registry.root.HOOKS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.hooks.hook.Hook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/hook.py | mmengine.hooks.hook.Hook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/hook.py |
| mmcv.runner.hooks.iter_timer.IterTimerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/iter_timer.py | mmengine.hooks.iter_timer_hook.IterTimerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/iter_timer_hook.py |
| mmcv.runner.hooks.lr_updater.LrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.LRSchedulerMixin | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.FixedLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.ConstantLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.StepLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.StepLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.ExpLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.ExponentialLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.PolyLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.PolyLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.InvLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.CosineAnnealingUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineAnnealingLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.FlatCosineAnnealingUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.CosineRestartLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineRestartLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.get_position_from_periods | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineRestartLR.get_position_from_periods | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.CyclicLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.OneCycleLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.LinearAnnealingLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.annealing_cos | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_annealing_cos | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.annealing_linear | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_annealing_linear | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.format_param | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_format_param | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.memory.EmptyCacheHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/memory.py | mmengine.hoos.empty_cache_hook.EmptyCacheHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/empty_cache_hook.py |
| mmcv.runner.hooks.momentum_updater.MomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.MomentumSchedulerMixin | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.StepMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.StepMomentum | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.CosineAnnealingMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.CosineAnnealingMomentum | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.LinearAnnealingMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.momentum_updater.CyclikcMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.momentum_updater.OneCycleMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.optimizer.OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | mmengine.optimizer.optimizer_wrapper.OptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeOptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.optimizer.Fp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | Moved to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeFp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.optimizer.Fp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | Moved to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeFp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.profiler.ProfilerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/profiler.py | mmengine.hooks.profiler_hook.ProfilerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/profiler_hook.py |
| mmcv.runner.hooks.sampler_seed.DistSamplerSeedHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/sampler_seed.py | mmengine.hooks.sampler_seed_hook.DistSamplerSeedHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/sampler_seed_hook.py |
| mmcv.runner.hooks.sync_buffer.SyncbuffersHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/sync_buffer.py | mmengine.hooks.sync_buffer_hook.SyncBufferHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/sync_buffer_hook.py |
| mmcv.runner.optimizer.builder.OPTIMIZERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | mmengine.registry.root.OPTIMIZERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.optimizer.builder.OPTIMIZER_BUILDERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.register_torch_optimizers | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | mmengine.optim.optimizer.builder.register_torch_optimizers | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/builder.py |
| mmcv.runner.optimizer.builder.TORCH_OPTIMIZERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.build_optimizer_constructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.build_optimizer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.default_constructor.DefaultOptimizerConstructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/default_constructor.py | | |
| mmcv.runner.base_module.BaseModule | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.BaseModule | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.Sequential | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.Sequential | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.ModuleList | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.ModuleList | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.ModuleDict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.ModuleDict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_runner.BaseRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_runner.py | mmengine.runner.runner.Runner | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/runner.py |
| mmcv.runner.builder.RUNNERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | mmengine.registry.root.RUNNERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.builder.RUNNER_BUILDERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | mmengine.registry.root.RUNNER_CONSTRUCTORS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.builder.build_runner_constructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | | |
| mmcv.runner.builder.build_runner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | | |
| mmcv.runner.checkpoint.ENV_MMCV_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.ENV_MMENGINE_HOME | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.ENV_XDG_CACHE_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.ENV_XDG_CACHE_HOME | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.DEFAULT_CACHE_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.DEFAULT_CACHE_DIR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_get_mmcv_home | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_get_mmengine_home | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_torchvision_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_torchvision_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_external_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_external_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_mmcls_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_mmcls_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_deprecated_model_names | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_deprecated_model_names | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_process_mmcls_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_process_mmcls_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.CheckpointLoader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.CheckpointLoader | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_local | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_local | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_http | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_http | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_pavi | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_pavi | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_ceph | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_ceph | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_torchvision | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_torchvision | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_openmmlab | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_openmmlab | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_mmcls | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_mmcls | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_load_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_load_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_load_checkpoint_with_prefix | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_load_checkpoint_with_prefix | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.weights_to_cpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.weights_to_cpu | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_save_to_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_save_to_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.save_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.save_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.default_coonstructor.DefaultRunnerConstructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/default_constructor.py | | |
| mmcv.runner.dist_utils.\_find_free_port | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.\_is_free_port | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.init_dist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.init_dist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_pytorch | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_pytorch | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_mpi | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_mpi | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_slurm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_slurm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.get_dist_info | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.get_dist_info | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.master_only | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.master_only | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.allreduce_params | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.allreduce_grads | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.\_allreduce_coalesced | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.epoch_based_runner.EpochBasedRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/epoch_based_runner.py | mmengine.runner.loops.EpochBasedTrainLoop | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/loops.py |
| mmcv.runner.epoch_based_runner.Runner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/epoch_based_runner.py | | |
| mmcv.runner.fp16_utils.cast_tensor_type | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.auto_fp16 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.force_fp32 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.allreduce_grads | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.wrap_fp16_model | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.patch_norm_fp32 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.patch_forward_method | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.LossScaler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | Moved fp16-related to: mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper and mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.iter_based_runner.IterLoader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/iter_based_runner.py | | |
| mmcv.runner.iter_based_runner.IterBasedRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/iter_based_runner.py | mmengine.runner.loops.IterBasedTrainLoop | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/loops.py |
| mmcv.runner.log_buffer.LogBuffer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/log_buffer.py | | |
| mmcv.runner.priority.Priority | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/priority.py | mmengine.runer.priority.Priority | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/priority.py |
| mmcv.runner.priority.get_priority | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/priority.py | mmengine.runner.priority.get_priority | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/priority.py |
| mmcv.runner.utils.get_host_info | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.get_time_str | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.obj_from_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.set_random_seed | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | mmengine.runner.utils.set_random_seed | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/utils.py |
## `mmcv.parallel`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| mmcv.parallel.\_functions.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.synchronize_stream | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.get_input_device | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.Scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.collate.collate | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/collate.py | | |
| mmcv.parallel.data_container.assert_tensor_type | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_container.py | | |
| mmcv.parallel.data_container.DataContainer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_container.py | Similar: mmengine/structures/base_data_element.BaseDataElement | https://github.com/open-mmlab/mmengine/blob/main/mmengine/structures/base_data_element.py |
| mmcv.parallel.data_parallel.MMDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_parallel.py | | |
| mmcv.parallel.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/distributed.py | mmengine.model.wrappers.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/distributed.py |
| mmcv.parallel.distributed_deprecated.MMDistributedDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/distributed.py | mmengine.model.wrappers.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/distributed.py |
| mmcv.parallel.registry.MODULE_WRAPPERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/registry.py | mmengine.registry.root.MODEL_WRAPPERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.parallel.scatter_gather.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/scatter_gather.py | | |
| mmcv.parallel.scatter_gather.scatter_kwargs | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/scatter_gather.py | | |
| mmcv.parallel.utils.is_module_wrapper | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/utils.py | mmengine.model.wrappers.utils.is_model_wrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/utils.py |
## `mmcv.engine`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------ | ------------------------------------------------------------------ | -------- | ------------ |
| mmcv.engine.test.single_gpu_test | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.multi_gpu_test | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.collect_results_cpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.collect_results_gpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
## `mmcv.device`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ----------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------- |
| mmcv.device.ipu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/ipu | | |
| mmcv.device.mlu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/mlu | | |
| mmcv.device.mps | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/mps | | |
| mmcv.device.npu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/npu | | |
| mmcv.device.\_functions.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/_functions.py | | |
| mmcv.device.\_functions.Scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/_functions.py | | |
| mmcv.device.scatter_gather.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/scatter_gather.py | | |
| mmcv.device.scatter_gather.scatter_kwargs | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/scatter_gather.py | | |
| mmcv.device.utils.get_device | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/utils.py | mmengine.device.utils.get_device | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
## `mmcv.utils`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| mmcv.utils.config.BASE_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.BASE_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DELETE_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DELETE_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DEPRECATION_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DEPRECATION_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.ConfigDict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.ConfigDict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.add_args | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.add_args | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.Config | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.Config | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DictAction | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DictAction | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.device_type.is_ipu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | | |
| mmcv.utils.device_type.IS_IPU_AVAILABLE | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | | |
| mmcv.utils.device_type.is_mlu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_mlu_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.device_type.is_mps_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_mps_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.device_type.is_npu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_npu_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.hub.\_is_legacy_zip_format | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.\_is_legacy_zip_format | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.hub.\_legacy_zip_load | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.\_legacy_zip_load | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.hub.load_url | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.load_url | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.logging.logger_initialized | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.logging.get_logger | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.logging.print_log | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.misc.\_ntuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_ntuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_1tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_1tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_2tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_2tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_3tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_3tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_4tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_4tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_ntuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_ntuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_str | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_str | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.import_modules_from_strings | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.import_modules_from_strings | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.iter_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.iter_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.list_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.list_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.tuple_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.tuple_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_seq_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_seq_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_list_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_list_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_tuple_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_tuple_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.slice_list | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.slice_list | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.concat_list | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.concat_list | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.check_prerequisites | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.check_prerequisites | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.\_check_py_package | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_check_py_package | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.\_check_executable | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_check_executable | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.requires_package | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.requires_package | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.requires_executable | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.requires_executable | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.deprecated_api_warning | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.deprecated_api_warning | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_method_overridden | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_method_overridden | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.has_method | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.has_method | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.parrots_wrapper.TORCH_VERSION | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.TORCH_VERSION | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.is_cuda_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.devices.utils.is_cuda_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.parrots_wrapper.IS_CUDA_AVAILABLE | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | | |
| mmcv.utils.parrots_wrapper.is_rocm_pytorch | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.is_rocm_pytorch | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_cuda_home | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_cuda_home | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.get_build_config | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.get_build_config | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_conv | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_conv | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_dataloader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_dataloader | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_extension | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_extension | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_pool | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_pool | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_norm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_norm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.SyncBatchNorm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.SyncBatchNorm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.path.is_filepath | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.is_filepath | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.fopen | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.fopen | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.check_file_exist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.path.check_file_exist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.mkdir_or_exist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.mkdir_or_exist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.symlink | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.symlink | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.scandir | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.scandir | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.find_vcs_root | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.find_vcs_root | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.progressbar.ProgressBar | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.ProgressBar | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.init_pool | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.init_pool | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_parallel_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_parallel_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_iter_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_iter_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.registry.build_from_cfg | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/registry.py | mmengine.registry.build_functions.build_from_cfg | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/build_functions.py |
| mmcv.utils.registry.Registry | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/registry.py | mmengine.registry.registry.Registry | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/registry.py |
| mmcv.utils.seed.worker_init_fn | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/seed.py | mmengine.dataset.utils.worker_init_fn | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dataset/utils.py |
| mmcv.utils.testing.check_python_script | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.check_python_script | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.\_any | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.\_any | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_dict_contains_subset | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_dict_contains_subset | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_attrs_equal | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_attrs_equal | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_dict_has_keys | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_dict_has_keys | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_keys_equal | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_keys_equal | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_is_norm_layer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_is_norm_layer | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_params_all_zeros | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_params_all_zeros | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.timer.TimerError | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.TimerError | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.Timer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.Timer | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.\_g_timers | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.\_g_timers | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.check_time | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.check_time | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.torch_ops.\_torch_version_meshgrid_indexing | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/torch_ops.py | mmengine.utils.dl_utils.torch_ops.\_torch_version_meshgrid_indexing | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/torch_ops.py |
| mmcv.utils.torch_ops.torch_meshgrid | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/torch_ops.py | mmengine.utils.dl_utils.torch_ops.torch_meshgrid | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/torch_ops.py |
| mmcv.utils.trace.is_jit_tracing | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/trace.py | mmengine.utils.dl_utils.trace.is_jit_tracing | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/trace.py |
| mmcv.utils.version_utils.digit_version | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.digit_version | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
| mmcv.utils.version_utils.\_minimal_ext_cmd | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.\_minimal_ext_cmd | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
| mmcv.utils.version_utils.get_git_hash | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.get_git_hash | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
## `mmcv.cnn`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| -------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------ |
| mmcv.cnn.utils.sync_bn.\_BatchNormXd | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/cnn/utils/sync_bn.py | mmengine.model.utils.\_BatchNormXd | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/utils.py |
| mmcv.cnn.utils.sync_bn.revert_sync_batchnorm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/cnn/utils/sync_bn.py | mmengine.model.utils.revert_sync_batchnorm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/utils.py |
## `mmcv.model_zoo`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------ | ----------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------- |
| mmcv.model_zoo.deprecated.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/deprecated.json | mmengine.hub.deprecated.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/deprecated.json |
| mmcv.model_zoo.mmcls.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/mmcls.json | mmengine.hub.mmcls.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/mmcls.json |
| mmcv.model_zoo.open_mmlab.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/open_mmlab.json | mmengine.hub.openmmlab.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/openmmlab.json |
| mmcv.model_zoo.torchvision_0.12.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/torchvision_0.12.json | mmengine.hub.torchvision_0.12.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/torchvision_0.12.json |
...@@ -81,9 +81,9 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -81,9 +81,9 @@ Select the appropriate installation command depending on the type of system, CUD
<html> <html>
<body> <body>
<style> <style>
select { select {
z-index: 1000; /*z-index: 1000;*/
position: absolute; position: absolute;
top: 10px; top: 10px;
width: 6.7rem; width: 6.7rem;
...@@ -114,37 +114,50 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -114,37 +114,50 @@ Select the appropriate installation command depending on the type of system, CUD
/* left: 25.375rem; 25.375 = 17.375 + 6.7 + 1.3 */ /* left: 25.375rem; 25.375 = 17.375 + 6.7 + 1.3 */
left: 24rem; left: 24rem;
} }
</style> </style>
<div id="select-container"> <div id="select-container">
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.id))"
onchange="changeOS(this.value)" onchange="changeOS(this.value)"
id="select-os"> id="select-os">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeCUDA(this.value)" onchange="changeCUDA(this.value)"
id="select-cuda"> id="select-cuda">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeTorch(this.value)" onchange="changeTorch(this.value)"
id="select-torch"> id="select-torch">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeMMCV(this.value)" onchange="changeMMCV(this.value)"
id="select-mmcv"> id="select-mmcv">
</select> </select>
</div> </div>
<pre id="select-cmd"></pre> <pre id="select-cmd"></pre>
</body> </body>
<script> <script>
// 各个select当前的值
let osVal, cudaVal, torchVal, mmcvVal; let osVal, cudaVal, torchVal, mmcvVal;
function clickOutside(targetDom, handler) {
const clickHandler = (e) => {
if (!targetDom || targetDom.contains(e.target)) return;
handler?.();
document.removeEventListener('click', clickHandler, false);
};
document.addEventListener('click', clickHandler, false);
}
function changeMMCV(val) { function changeMMCV(val) {
mmcvVal = val; mmcvVal = val;
change("select-mmcv"); change("select-mmcv");
...@@ -161,11 +174,12 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -161,11 +174,12 @@ Select the appropriate installation command depending on the type of system, CUD
osVal = val; osVal = val;
change("select-os"); change("select-os");
} }
// 控制size大小相关的几个方法
function handleSelectMouseDown(id) { function handleSelectMouseDown(id) {
const dom = document.getElementById(id); const dom = document.getElementById(id);
if (!dom) return; if (!dom) return;
const len = dom?.options?.length; const len = dom?.options?.length;
if (len >= 9) { if (len >= 10) {
dom.size = 10; dom.size = 10;
dom.style.zIndex = 100; dom.style.zIndex = 100;
} }
...@@ -179,6 +193,7 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -179,6 +193,7 @@ Select the appropriate installation command depending on the type of system, CUD
function handleSelectBlur(id) { function handleSelectBlur(id) {
const dom = document.getElementById(id); const dom = document.getElementById(id);
if (!dom) { if (!dom) {
// 如果没有指定特定的id,那就直接把所有的select都设置成size = 1
handleSelectClick(); handleSelectClick();
return; return;
} }
...@@ -199,10 +214,12 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -199,10 +214,12 @@ Select the appropriate installation command depending on the type of system, CUD
cmdString = cmdString.replace("{cu_version}", cudaVersion).replace("{mmcv_version}", mmcvVal).replace("{torch_version}", torchVersion); cmdString = cmdString.replace("{cu_version}", cudaVersion).replace("{mmcv_version}", mmcvVal).replace("{torch_version}", torchVersion);
cmd.textContent = cmdString; cmd.textContent = cmdString;
} }
// string数组去重
function unique(arr) { function unique(arr) {
if (!arr || !Array.isArray(arr)) return []; if (!arr || !Array.isArray(arr)) return [];
return [...new Set(arr)]; return [...new Set(arr)];
} }
// 根据string数组生成option的DocumentFragment
function genOptionFragment(data, id) { function genOptionFragment(data, id) {
const name = id.includes("-")? id.split("-")[1] : id; const name = id.includes("-")? id.split("-")[1] : id;
const fragment = new DocumentFragment(); const fragment = new DocumentFragment();
...@@ -213,23 +230,33 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -213,23 +230,33 @@ Select the appropriate installation command depending on the type of system, CUD
text = `${option}`; text = `${option}`;
} }
ele.textContent = text; ele.textContent = text;
// 添加value属性,方便下拉框选择时直接读到数据
ele.value = option; ele.value = option;
// 添加点击事件监听
ele.addEventListener('click', handleSelectClick); ele.addEventListener('click', handleSelectClick);
fragment.appendChild(ele); fragment.appendChild(ele);
}); });
return fragment; return fragment;
} }
// 在dom树中找到id对应的dom(select元素),并将生成的options添加到元素内
function findAndAppend(data, id) { function findAndAppend(data, id) {
const fragment = genOptionFragment(data, id); const fragment = genOptionFragment(data, id);
const dom = document.getElementById(id); const dom = document.getElementById(id);
if (dom) dom.replaceChildren(fragment); if (dom) dom.replaceChildren(fragment);
} }
/**
* change方法的重点在于
* 1. 各个下拉框数据的联动
* OS ==> cuda ==> torch ==> mmcv
* 2. 命令行的修改
*/
function change(id) { function change(id) {
const order = ["select-mmcv", "select-torch", "select-cuda", "select-os"]; const order = ["select-mmcv", "select-torch", "select-cuda", "select-os"];
const idx = order.indexOf(id); const idx = order.indexOf(id);
if (idx === -1) return; if (idx === -1) return;
const versionDetail = version[osVal]; const versionDetail = version[osVal];
if (idx >= 3) { if (idx >= 3) {
// 根据os修改cuda
let cuda = []; let cuda = [];
versionDetail.forEach(v => { versionDetail.forEach(v => {
cuda.push(v.cuda); cuda.push(v.cuda);
...@@ -239,6 +266,7 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -239,6 +266,7 @@ Select the appropriate installation command depending on the type of system, CUD
findAndAppend(cuda, "select-cuda"); findAndAppend(cuda, "select-cuda");
} }
if (idx >= 2) { if (idx >= 2) {
// 根据cuda修改torch
const torch = []; const torch = [];
versionDetail.forEach(v => { versionDetail.forEach(v => {
if (v.cuda === cudaVal) torch.push(v.torch); if (v.cuda === cudaVal) torch.push(v.torch);
...@@ -247,6 +275,7 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -247,6 +275,7 @@ Select the appropriate installation command depending on the type of system, CUD
findAndAppend(torch, "select-torch"); findAndAppend(torch, "select-torch");
} }
if (idx >= 1) { if (idx >= 1) {
// 根据torch修改mmcv
let mmcv = []; let mmcv = [];
versionDetail.forEach(v => { versionDetail.forEach(v => {
if (v.cuda === cudaVal && v.torch === torchVal) mmcv = v.mmcv; if (v.cuda === cudaVal && v.torch === torchVal) mmcv = v.mmcv;
...@@ -256,21 +285,30 @@ Select the appropriate installation command depending on the type of system, CUD ...@@ -256,21 +285,30 @@ Select the appropriate installation command depending on the type of system, CUD
} }
changeCmd(); changeCmd();
} }
// 初始化,处理version数据,并调用findAndAppend
function init() { function init() {
document.addEventListener("click", handleSelectBlur); // 增加一个全局的click事件监听,作为select onBlur事件失效的兜底
// document.addEventListener("click", handleSelectBlur);
const version = window.version; const version = window.version;
// OS
const os = Object.keys(version); const os = Object.keys(version);
osVal = os[0]; osVal = os[0];
findAndAppend(os, "select-os"); findAndAppend(os, "select-os");
change("select-os"); change("select-os");
changeCmd(); changeCmd();
} }
// 利用xhr获取本地version数据,如果作为html直接浏览的话需要使用本地服务器打开,否则会有跨域问题
window.onload = function () { window.onload = function () {
const url = "../_static/version.json" const url = "../_static/version.json"
// 申明一个XMLHttpRequest
const request = new XMLHttpRequest(); const request = new XMLHttpRequest();
// 设置请求方法与路径
request.open("get", url); request.open("get", url);
// 不发送数据到服务器
request.send(null); request.send(null);
//XHR对象获取到返回信息后执行
request.onload = function () { request.onload = function () {
// 返回状态为200,即为数据获取成功
if (request.status !== 200) return; if (request.status !== 200) return;
const data = JSON.parse(request.responseText); const data = JSON.parse(request.responseText);
window.version = data; window.version = data;
......
...@@ -10,6 +10,7 @@ You can switch between Chinese and English documents in the lower-left corner of ...@@ -10,6 +10,7 @@ You can switch between Chinese and English documents in the lower-left corner of
get_started/introduction.md get_started/introduction.md
get_started/installation.md get_started/installation.md
get_started/build.md get_started/build.md
get_started/api_reference.md
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
......
...@@ -6,13 +6,13 @@ We implement common ops used in detection, segmentation, etc. ...@@ -6,13 +6,13 @@ We implement common ops used in detection, segmentation, etc.
| ---------------------------- | --- | ---- | --- | --- | ------ | | ---------------------------- | --- | ---- | --- | --- | ------ |
| ActiveRotatedFilter | √ | √ | | | √ | | ActiveRotatedFilter | √ | √ | | | √ |
| AssignScoreWithK | | √ | | | | | AssignScoreWithK | | √ | | | |
| BallQuery | | √ | √ | | | | BallQuery | | √ | √ | | |
| BBoxOverlaps | | √ | √ | √ | √ | | BBoxOverlaps | | √ | √ | √ | √ |
| BorderAlign | | √ | | | | | BorderAlign | | √ | | | |
| BoxIouRotated | √ | √ | √ | | √ | | BoxIouRotated | √ | √ | √ | | √ |
| BoxIouQuadri | √ | √ | | | | | BoxIouQuadri | √ | √ | | | |
| CARAFE | | √ | √ | | | | CARAFE | | √ | √ | | |
| ChamferDistance | | √ | | | | | ChamferDistance | | √ | | | |
| CrissCrossAttention | | √ | | | | | CrissCrossAttention | | √ | | | |
| ContourExpand | √ | | | | | | ContourExpand | √ | | | | |
| ConvexIoU | | √ | | | | | ConvexIoU | | √ | | | |
...@@ -33,7 +33,7 @@ We implement common ops used in detection, segmentation, etc. ...@@ -33,7 +33,7 @@ We implement common ops used in detection, segmentation, etc.
| MergeCells | | √ | | | | | MergeCells | | √ | | | |
| MinAreaPolygon | | √ | | | | | MinAreaPolygon | | √ | | | |
| ModulatedDeformConv2d | √ | √ | √ | | √ | | ModulatedDeformConv2d | √ | √ | √ | | √ |
| MultiScaleDeformableAttn | | √ | √ | | | | MultiScaleDeformableAttn | | √ | √ | | |
| NMS | √ | √ | √ | | √ | | NMS | √ | √ | √ | | √ |
| NMSRotated | √ | √ | √ | | √ | | NMSRotated | √ | √ | √ | | √ |
| NMSQuadri | √ | √ | | | | | NMSQuadri | √ | √ | | | |
...@@ -41,10 +41,10 @@ We implement common ops used in detection, segmentation, etc. ...@@ -41,10 +41,10 @@ We implement common ops used in detection, segmentation, etc.
| PointsInBoxes | √ | √ | | | | | PointsInBoxes | √ | √ | | | |
| PointsInPolygons | | √ | | | √ | | PointsInPolygons | | √ | | | √ |
| PSAMask | √ | √ | √ | | √ | | PSAMask | √ | √ | √ | | √ |
| RotatedFeatureAlign | √ | √ | √ | | | | RotatedFeatureAlign | √ | √ | √ | | |
| RoIPointPool3d | | √ | √ | | | | RoIPointPool3d | | √ | √ | | |
| RoIPool | | √ | √ | | √ | | RoIPool | | √ | √ | | √ |
| RoIAlignRotated | √ | √ | √ | | | | RoIAlignRotated | √ | √ | √ | | |
| RiRoIAlignRotated | | √ | | | | | RiRoIAlignRotated | | √ | | | |
| RoIAlign | √ | √ | √ | | √ | | RoIAlign | √ | √ | √ | | √ |
| RoIAwarePool3d | | √ | √ | | | | RoIAwarePool3d | | √ | √ | | |
......
{ {
"Linux": [ "Linux": [
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "11.8", "cuda": "11.8",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -11,6 +27,8 @@ ...@@ -11,6 +27,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -18,6 +36,8 @@ ...@@ -18,6 +36,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -27,6 +47,8 @@ ...@@ -27,6 +47,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -36,6 +58,8 @@ ...@@ -36,6 +58,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -47,6 +71,8 @@ ...@@ -47,6 +71,8 @@
"cuda": "11.5", "cuda": "11.5",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -58,6 +84,8 @@ ...@@ -58,6 +84,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -69,6 +97,8 @@ ...@@ -69,6 +97,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -80,6 +110,8 @@ ...@@ -80,6 +110,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -91,6 +123,8 @@ ...@@ -91,6 +123,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -102,6 +136,8 @@ ...@@ -102,6 +136,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -113,6 +149,8 @@ ...@@ -113,6 +149,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -134,6 +172,8 @@ ...@@ -134,6 +172,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -145,6 +185,8 @@ ...@@ -145,6 +185,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -156,6 +198,8 @@ ...@@ -156,6 +198,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -167,6 +211,8 @@ ...@@ -167,6 +211,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -178,6 +224,8 @@ ...@@ -178,6 +224,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -205,10 +253,19 @@ ...@@ -205,10 +253,19 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "10.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{ {
"cuda": "10.1", "cuda": "10.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -236,6 +293,13 @@ ...@@ -236,6 +293,13 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "10.1",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{ {
"cuda": "9.2", "cuda": "9.2",
"torch": "1.7.x", "torch": "1.7.x",
...@@ -256,10 +320,27 @@ ...@@ -256,10 +320,27 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "9.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -267,6 +348,8 @@ ...@@ -267,6 +348,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -276,6 +359,8 @@ ...@@ -276,6 +359,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -287,6 +372,8 @@ ...@@ -287,6 +372,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -298,6 +385,8 @@ ...@@ -298,6 +385,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -309,6 +398,8 @@ ...@@ -309,6 +398,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -320,6 +411,8 @@ ...@@ -320,6 +411,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -346,13 +439,37 @@ ...@@ -346,13 +439,37 @@
"2.0.0rc2", "2.0.0rc2",
"2.0.0rc1" "2.0.0rc1"
] ]
},
{
"cuda": "cpu",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
} }
], ],
"Windows": [ "Windows": [
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "11.8", "cuda": "11.8",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -360,6 +477,8 @@ ...@@ -360,6 +477,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -367,6 +486,8 @@ ...@@ -367,6 +486,8 @@
"cuda": "11.7", "cuda": "11.7",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -376,6 +497,8 @@ ...@@ -376,6 +497,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -385,6 +508,8 @@ ...@@ -385,6 +508,8 @@
"cuda": "11.6", "cuda": "11.6",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -396,6 +521,8 @@ ...@@ -396,6 +521,8 @@
"cuda": "11.5", "cuda": "11.5",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -407,6 +534,8 @@ ...@@ -407,6 +534,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -418,6 +547,8 @@ ...@@ -418,6 +547,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -429,6 +560,8 @@ ...@@ -429,6 +560,8 @@
"cuda": "11.3", "cuda": "11.3",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -440,6 +573,8 @@ ...@@ -440,6 +573,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -451,6 +586,8 @@ ...@@ -451,6 +586,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -462,6 +599,8 @@ ...@@ -462,6 +599,8 @@
"cuda": "11.1", "cuda": "11.1",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -473,6 +612,8 @@ ...@@ -473,6 +612,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -484,6 +625,8 @@ ...@@ -484,6 +625,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -495,6 +638,8 @@ ...@@ -495,6 +638,8 @@
"cuda": "10.2", "cuda": "10.2",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -549,10 +694,19 @@ ...@@ -549,10 +694,19 @@
"2.0.0rc1" "2.0.0rc1"
] ]
}, },
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -560,6 +714,8 @@ ...@@ -560,6 +714,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -569,6 +725,8 @@ ...@@ -569,6 +725,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -580,6 +738,8 @@ ...@@ -580,6 +738,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -591,6 +751,8 @@ ...@@ -591,6 +751,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -602,6 +764,8 @@ ...@@ -602,6 +764,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -613,6 +777,8 @@ ...@@ -613,6 +777,8 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -642,10 +808,18 @@ ...@@ -642,10 +808,18 @@
} }
], ],
"macOS": [ "macOS": [
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{ {
"cuda": "cpu", "cuda": "cpu",
"torch": "2.0.x", "torch": "2.0.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0" "2.0.0"
] ]
}, },
...@@ -653,6 +827,7 @@ ...@@ -653,6 +827,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.13.x", "torch": "1.13.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0" "2.0.0"
...@@ -670,6 +845,7 @@ ...@@ -670,6 +845,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.12.x", "torch": "1.12.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -680,6 +856,7 @@ ...@@ -680,6 +856,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.11.x", "torch": "1.11.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -690,6 +867,7 @@ ...@@ -690,6 +867,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.10.x", "torch": "1.10.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -700,6 +878,7 @@ ...@@ -700,6 +878,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.9.x", "torch": "1.9.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
...@@ -710,6 +889,7 @@ ...@@ -710,6 +889,7 @@
"cuda": "cpu", "cuda": "cpu",
"torch": "1.8.x", "torch": "1.8.x",
"mmcv": [ "mmcv": [
"2.1.0",
"2.0.0rc4", "2.0.0rc4",
"2.0.0rc3", "2.0.0rc3",
"2.0.0rc2", "2.0.0rc2",
......
# 接口对照表
由于 MMCV v1.x 升级到 MMCV v2.x 时移除了 `mmcv.fileio``mmcv.runner``mmcv.parallel``mmcv.engine``mmcv.device` 模块,以及 `mmcv.utils` 中的所有类和大部分函数,分别删除于 PR [#2179](https://github.com/open-mmlab/mmcv/pull/2179),PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216),PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217)。因此我们提供了如下的接口对照表,以便于大家快速查找迁移后的接口。
## 相关讨论
- [Remove runner, parallel, engine and device](https://github.com/open-mmlab/mmcv/pull/2216)
- [ImportError: cannot import name 'is_list_of' from 'mmcv.utils'](https://github.com/open-mmlab/mmcv/issues/2282)
- [Could not find the files in MMengine which are removed in MMCV_v2x parallel. example, for DataContainer](https://github.com/open-mmlab/mmcv/issues/2934)
- [mmcv.cnn.bricks.registry](https://github.com/open-mmlab/mmengine/discussions/1356)
- [Replace mmcv's function and modules imported with mmengine's](https://github.com/open-mmlab/mmdetection/pull/8594)
## `mmcv.fileio`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| mmcv.fileio.file_client.BaseStorageBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.base.BaseStorageBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/base.py |
| mmcv.fileio.file_client.CephBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | | |
| mmcv.fileio.file_client.PetrelBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.petrel_backend.PetrelBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/petrel_backend.py |
| mmcv.fileio.file_client.MemcachedBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.memcached_backend.MemcachedBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/memcached_backend.py |
| mmcv.fileio.file_client.LmdbBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.lmdb_backend.LmdbBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/lmdb_backend.py |
| mmcv.fileio.file_client.HardDiskBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.file_client.HardDiskBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/file_client.py |
| mmcv.fileio.file_client.HTTPBackend | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.backends.http_backend.HTTPBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/backends/http_backend.py |
| mmcv.fileio.file_client.FileClient | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/file_client.py | mmengine.fileio.file_client.FileClient | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/file_client.py |
| mmcv.fileio.io.load | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.io.load | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/io.py |
| mmcv.fileio.io.dump | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.io.dump | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/io.py |
| mmcv.fileio.io.\_register_handler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.handlers.\_register_handler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/registry_utils.py |
| mmcv.fileio.io.register_handler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/io.py | mmengine.fileio.handlers.register_handler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/registry_utils.py |
| mmcv.fileio.parse.list_from_file | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/parse.py | mmengine.fileio.parse.list_from_file | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/parse.py |
| mmcv.fileio.parse.dict_from_file | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/parse.py | mmengine.fileio.parse.dict_from_file | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/parse.py |
| mmcv.fileio.handlers.base.BaseFileHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/base.py | mmengine.fileio.handlers.base.BaseFileHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/base.py |
| mmcv.fileio.handlers.json_handler.set_default | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/json_handler.py | mmengine.fileio.handlers.json_handler.set_default | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/json_handler.py |
| mmcv.fileio.handlers.json_handler.JsonHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/json_handler.py | mmengine.fileio.handlers.json_handler.JsonHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/json_handler.py |
| mmcv.fileio.handlers.pickle_handler.PickleHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/pickle_handler.py | mmengine.fileio.handlers.pickle_handler.PickleHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/pickle_handler.py |
| mmcv.fileio.handlers.yaml_handler.YamlHandler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/fileio/handlers/yaml_handler.py | mmengine.fileio.handlers.yaml_handler.YamlHandler | https://github.com/open-mmlab/mmengine/blob/main/mmengine/fileio/handlers/yaml_handler.py |
## `mmcv.runner`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mmcv.runner.hooks.logger.base.LoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/base.py | mmengine.hooks.logger_hook.LoggerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/logger_hook.py |
| mmcv.runner.hooks.logger.clearml.ClearMLLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/clearml.py | 相似功能:mmengine.visualization.vis_backend.ClearMLVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.dvclive.DvcliveLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/dvclive.py | 相似功能:mmengine.visualization.vis_backend.DVCLiveVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.mlflow.MlflowLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/mlflow.py | 相似功能:mmengine.visualization.vis_backend.MLflowVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.neptune.NeptuneLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/neptune.py | 相似功能:mmengine.visualization.vis_backend.NeptuneVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.pavi.PaviLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/pavi.py | | |
| mmcv.runner.hooks.logger.segmind.SegmindLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/segmind.py | | |
| mmcv.runner.hooks.logger.tensorboard.TensorboardLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/tensorboard.py | 相似功能:mmengine.visualization.vis_backend.TensorboardVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.logger.text.TextLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/text.py | | |
| mmcv.runner.hooks.logger.wandb.WandbLoggerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/logger/wandb.py | 相似功能:mmengine.visualization.vis_backend.WandbVisBackend | https://github.com/open-mmlab/mmengine/blob/main/mmengine/visualization/vis_backend.py |
| mmcv.runner.hooks.checkpoint.CheckpointHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/checkpoint.py | mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.closure.ClosureHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/closure.py | | |
| mmcv.runner.hooks.ema.EMAHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/ema.py | mmengine.hooks.ema_hook.EMAHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/ema_hook.py |
| mmcv.runner.hooks.evaluation.EvalHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/evaluation.py | 部分功能被移至 mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.evaluation.DistEvalHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/evaluation.py | 部分功能被移至 mmengine.hooks.checkpoint_hook.CheckpointHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py |
| mmcv.runner.hooks.hook.HOOKS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/hook.py | mmengine.registry.root.HOOKS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.hooks.hook.Hook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/hook.py | mmengine.hooks.hook.Hook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/hook.py |
| mmcv.runner.hooks.iter_timer.IterTimerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/iter_timer.py | mmengine.hooks.iter_timer_hook.IterTimerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/iter_timer_hook.py |
| mmcv.runner.hooks.lr_updater.LrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.LRSchedulerMixin | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.FixedLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.ConstantLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.StepLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.StepLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.ExpLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.ExponentialLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.PolyLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.PolyLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.InvLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.CosineAnnealingUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineAnnealingLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.FlatCosineAnnealingUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.CosineRestartLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineRestartLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.get_position_from_periods | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.CosineRestartLR.get_position_from_periods | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.CyclicLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.OneCycleLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.LinearAnnealingLrUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | | |
| mmcv.runner.hooks.lr_updater.annealing_cos | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_annealing_cos | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.annealing_linear | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_annealing_linear | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.lr_updater.format_param | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/lr_updater.py | mmengine.optim.scheduler.lr_scheduler.OneCycleLR.\_format_param | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/lr_scheduler.py |
| mmcv.runner.hooks.memory.EmptyCacheHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/memory.py | mmengine.hoos.empty_cache_hook.EmptyCacheHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/empty_cache_hook.py |
| mmcv.runner.hooks.momentum_updater.MomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.MomentumSchedulerMixin | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.StepMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.StepMomentum | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.CosineAnnealingMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | mmengine.optim.scheduler.momentum_scheduler.CosineAnnealingMomentum | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/scheduler/momentum_scheduler.py |
| mmcv.runner.hooks.momentum_updater.LinearAnnealingMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.momentum_updater.CyclikcMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.momentum_updater.OneCycleMomentumUpdaterHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/momentum_updater.py | | |
| mmcv.runner.hooks.optimizer.OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | mmengine.optimizer.optimizer_wrapper.OptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeOptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.optimizer.Fp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | 相关功能被移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeFp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.optimizer.Fp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | 相关功能被移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.hooks.optimizer.GradientCumulativeFp16OptimizerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/optimizer.py | | |
| mmcv.runner.hooks.profiler.ProfilerHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/profiler.py | mmengine.hooks.profiler_hook.ProfilerHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/profiler_hook.py |
| mmcv.runner.hooks.sampler_seed.DistSamplerSeedHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/sampler_seed.py | mmengine.hooks.sampler_seed_hook.DistSamplerSeedHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/sampler_seed_hook.py |
| mmcv.runner.hooks.sync_buffer.SyncbuffersHook | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/hooks/sync_buffer.py | mmengine.hooks.sync_buffer_hook.SyncBufferHook | https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/sync_buffer_hook.py |
| mmcv.runner.optimizer.builder.OPTIMIZERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | mmengine.registry.root.OPTIMIZERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.optimizer.builder.OPTIMIZER_BUILDERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.register_torch_optimizers | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | mmengine.optim.optimizer.builder.register_torch_optimizers | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/builder.py |
| mmcv.runner.optimizer.builder.TORCH_OPTIMIZERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.build_optimizer_constructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.builder.build_optimizer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/builder.py | | |
| mmcv.runner.optimizer.default_constructor.DefaultOptimizerConstructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/optimizer/default_constructor.py | | |
| mmcv.runner.base_module.BaseModule | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.BaseModule | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.Sequential | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.Sequential | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.ModuleList | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.ModuleList | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_module.ModuleDict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_module.py | mmengine.model.base_module.ModuleDict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/base_module.py |
| mmcv.runner.base_runner.BaseRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/base_runner.py | mmengine.runner.runner.Runner | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/runner.py |
| mmcv.runner.builder.RUNNERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | mmengine.registry.root.RUNNERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.builder.RUNNER_BUILDERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | mmengine.registry.root.RUNNER_CONSTRUCTORS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.runner.builder.build_runner_constructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | | |
| mmcv.runner.builder.build_runner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/builder.py | | |
| mmcv.runner.checkpoint.ENV_MMCV_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.ENV_MMENGINE_HOME | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.ENV_XDG_CACHE_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.ENV_XDG_CACHE_HOME | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.DEFAULT_CACHE_HOME | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.DEFAULT_CACHE_DIR | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_get_mmcv_home | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_get_mmengine_home | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_torchvision_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_torchvision_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_external_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_external_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_mmcls_models | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_mmcls_models | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_deprecated_model_names | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_deprecated_model_names | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_process_mmcls_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_process_mmcls_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.CheckpointLoader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.CheckpointLoader | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_local | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_local | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_http | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_http | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_pavi | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_pavi | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_ceph | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_ceph | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_torchvision | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_torchvision | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_openmmlab | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_openmmlab | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_from_mmcls | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_from_mmcls | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_load_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_load_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_load_checkpoint_with_prefix | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_load_checkpoint_with_prefix | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.load_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.load_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.weights_to_cpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.weights_to_cpu | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.\_save_to_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.\_save_to_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.get_state_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.get_state_dict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.checkpoint.save_checkpoint | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/checkpoint.py | mmengine.runner.checkpoint.save_checkpoint | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/checkpoint.py |
| mmcv.runner.default_coonstructor.DefaultRunnerConstructor | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/default_constructor.py | | |
| mmcv.runner.dist_utils.\_find_free_port | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.\_is_free_port | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.init_dist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.init_dist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_pytorch | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_pytorch | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_mpi | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_mpi | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.\_init_dist_slurm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.\_init_dist_slurm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.get_dist_info | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.get_dist_info | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.master_only | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | mmengine.dist.utils.master_only | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dist/utils.py |
| mmcv.runner.dist_utils.allreduce_params | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.allreduce_grads | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.dist_utils.\_allreduce_coalesced | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/dist_utils.py | | |
| mmcv.runner.epoch_based_runner.EpochBasedRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/epoch_based_runner.py | mmengine.runner.loops.EpochBasedTrainLoop | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/loops.py |
| mmcv.runner.epoch_based_runner.Runner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/epoch_based_runner.py | | |
| mmcv.runner.fp16_utils.cast_tensor_type | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.auto_fp16 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.force_fp32 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.allreduce_grads | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.wrap_fp16_model | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.patch_norm_fp32 | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.patch_forward_method | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.fp16_utils.LossScaler | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/fp16_utils.py | fp16 相关移至 mmengine.optimizer.amp_optimizer_wrapper.AmpOptimWrapper 以及 mmengine.optimizer.apex_optimizer_wrapper.ApexOptimWrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/amp_optimizer_wrapper.py https://github.com/open-mmlab/mmengine/blob/main/mmengine/optim/optimizer/apex_optimizer_wrapper.py |
| mmcv.runner.iter_based_runner.IterLoader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/iter_based_runner.py | | |
| mmcv.runner.iter_based_runner.IterBasedRunner | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/iter_based_runner.py | mmengine.runner.loops.IterBasedTrainLoop | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/loops.py |
| mmcv.runner.log_buffer.LogBuffer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/log_buffer.py | | |
| mmcv.runner.priority.Priority | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/priority.py | mmengine.runer.priority.Priority | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/priority.py |
| mmcv.runner.priority.get_priority | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/priority.py | mmengine.runner.priority.get_priority | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/priority.py |
| mmcv.runner.utils.get_host_info | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.get_time_str | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.obj_from_dict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | | |
| mmcv.runner.utils.set_random_seed | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/runner/utils.py | mmengine.runner.utils.set_random_seed | https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/utils.py |
## `mmcv.parallel`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| mmcv.parallel.\_functions.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.synchronize_stream | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.get_input_device | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.\_functions.Scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/_functions.py | | |
| mmcv.parallel.collate.collate | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/collate.py | | |
| mmcv.parallel.data_container.assert_tensor_type | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_container.py | | |
| mmcv.parallel.data_container.DataContainer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_container.py | 相似功能:mmengine/structures/base_data_element.BaseDataElement | https://github.com/open-mmlab/mmengine/blob/main/mmengine/structures/base_data_element.py |
| mmcv.parallel.data_parallel.MMDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/data_parallel.py | | |
| mmcv.parallel.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/distributed.py | mmengine.model.wrappers.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/distributed.py |
| mmcv.parallel.distributed_deprecated.MMDistributedDataParallel | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/distributed.py | mmengine.model.wrappers.distributed.MMDistributedDataParallel | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/distributed.py |
| mmcv.parallel.registry.MODULE_WRAPPERS | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/registry.py | mmengine.registry.root.MODEL_WRAPPERS | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py |
| mmcv.parallel.scatter_gather.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/scatter_gather.py | | |
| mmcv.parallel.scatter_gather.scatter_kwargs | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/scatter_gather.py | | |
| mmcv.parallel.utils.is_module_wrapper | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/parallel/utils.py | mmengine.model.wrappers.utils.is_model_wrapper | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/wrappers/utils.py |
## `mmcv.engine`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------ | ------------------------------------------------------------------ | -------- | ------------ |
| mmcv.engine.test.single_gpu_test | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.multi_gpu_test | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.collect_results_cpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
| mmcv.engine.test.collect_results_gpu | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/engine/test.py | | |
## `mmcv.device`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ----------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------- |
| mmcv.device.ipu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/ipu | | |
| mmcv.device.mlu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/mlu | | |
| mmcv.device.mps | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/mps | | |
| mmcv.device.npu | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/device/npu | | |
| mmcv.device.\_functions.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/_functions.py | | |
| mmcv.device.\_functions.Scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/_functions.py | | |
| mmcv.device.scatter_gather.scatter | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/scatter_gather.py | | |
| mmcv.device.scatter_gather.scatter_kwargs | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/scatter_gather.py | | |
| mmcv.device.utils.get_device | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/device/utils.py | mmengine.device.utils.get_device | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
## `mmcv.utils`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| mmcv.utils.config.BASE_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.BASE_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DELETE_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DELETE_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DEPRECATION_KEY | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DEPRECATION_KEY | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.ConfigDict | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.ConfigDict | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.add_args | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.add_args | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.Config | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.Config | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.config.DictAction | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/config.py | mmengine.config.config.DictAction | https://github.com/open-mmlab/mmengine/blob/main/mmengine/config/config.py |
| mmcv.utils.device_type.is_ipu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | | |
| mmcv.utils.device_type.IS_IPU_AVAILABLE | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | | |
| mmcv.utils.device_type.is_mlu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_mlu_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.device_type.is_mps_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_mps_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.device_type.is_npu_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/device_type.py | mmengine.device.utils.is_npu_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.hub.\_is_legacy_zip_format | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.\_is_legacy_zip_format | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.hub.\_legacy_zip_load | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.\_legacy_zip_load | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.hub.load_url | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/hub.py | mmengine.utils.dl_utils.hub.load_url | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/hub.py |
| mmcv.utils.logging.logger_initialized | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.logging.get_logger | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.logging.print_log | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/logging.py | | |
| mmcv.utils.misc.\_ntuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_ntuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_1tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_1tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_2tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_2tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_3tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_3tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_4tuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_4tuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.to_ntuple | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.to_ntuple | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_str | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_str | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.import_modules_from_strings | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.import_modules_from_strings | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.iter_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.iter_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.list_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.list_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.tuple_cast | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.tuple_cast | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_seq_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_seq_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_list_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_list_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_tuple_of | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_tuple_of | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.slice_list | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.slice_list | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.concat_list | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.concat_list | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.check_prerequisites | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.check_prerequisites | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.\_check_py_package | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_check_py_package | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.\_check_executable | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.\_check_executable | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.requires_package | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.requires_package | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.requires_executable | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.requires_executable | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.deprecated_api_warning | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.deprecated_api_warning | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.is_method_overridden | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.is_method_overridden | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.misc.has_method | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/misc.py | mmengine.utils.misc.has_method | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/misc.py |
| mmcv.utils.parrots_wrapper.TORCH_VERSION | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.TORCH_VERSION | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.is_cuda_available | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.devices.utils.is_cuda_available | https://github.com/open-mmlab/mmengine/blob/main/mmengine/device/utils.py |
| mmcv.utils.parrots_wrapper.IS_CUDA_AVAILABLE | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | | |
| mmcv.utils.parrots_wrapper.is_rocm_pytorch | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.is_rocm_pytorch | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_cuda_home | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_cuda_home | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.get_build_config | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.get_build_config | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_conv | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_conv | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_dataloader | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_dataloader | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_extension | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_extension | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_pool | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_pool | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.\_get_norm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.\_get_norm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.parrots_wrapper.SyncBatchNorm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/parrots_wrapper.py | mmengine.utils.dl_utils.parrots_wrapper.SyncBatchNorm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/parrots_wrapper.py |
| mmcv.utils.path.is_filepath | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.is_filepath | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.fopen | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.fopen | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.check_file_exist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.path.check_file_exist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.mkdir_or_exist | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.mkdir_or_exist | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.symlink | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.symlink | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.scandir | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.scandir | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.path.find_vcs_root | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/path.py | mmengine.utils.path.find_vcs_root | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/path.py |
| mmcv.utils.progressbar.ProgressBar | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.ProgressBar | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.init_pool | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.init_pool | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_parallel_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_parallel_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.progressbar.track_iter_progress | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/progressbar.py | mmengine.utils.progressbar.track_iter_progress | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py |
| mmcv.utils.registry.build_from_cfg | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/registry.py | mmengine.registry.build_functions.build_from_cfg | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/build_functions.py |
| mmcv.utils.registry.Registry | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/registry.py | mmengine.registry.registry.Registry | https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/registry.py |
| mmcv.utils.seed.worker_init_fn | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/seed.py | mmengine.dataset.utils.worker_init_fn | https://github.com/open-mmlab/mmengine/blob/main/mmengine/dataset/utils.py |
| mmcv.utils.testing.check_python_script | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.check_python_script | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.\_any | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.\_any | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_dict_contains_subset | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_dict_contains_subset | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_attrs_equal | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_attrs_equal | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_dict_has_keys | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_dict_has_keys | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_keys_equal | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_keys_equal | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_is_norm_layer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_is_norm_layer | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.testing.assert_params_all_zeros | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/testing.py | mmengine.testing.compare.assert_params_all_zeros | https://github.com/open-mmlab/mmengine/blob/main/mmengine/testing/compare.py |
| mmcv.utils.timer.TimerError | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.TimerError | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.Timer | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.Timer | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.\_g_timers | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.\_g_timers | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.timer.check_time | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/timer.py | mmengine.utils.timer.check_time | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/timer.py |
| mmcv.utils.torch_ops.\_torch_version_meshgrid_indexing | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/torch_ops.py | mmengine.utils.dl_utils.torch_ops.\_torch_version_meshgrid_indexing | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/torch_ops.py |
| mmcv.utils.torch_ops.torch_meshgrid | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/torch_ops.py | mmengine.utils.dl_utils.torch_ops.torch_meshgrid | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/torch_ops.py |
| mmcv.utils.trace.is_jit_tracing | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/trace.py | mmengine.utils.dl_utils.trace.is_jit_tracing | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/dl_utils/trace.py |
| mmcv.utils.version_utils.digit_version | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.digit_version | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
| mmcv.utils.version_utils.\_minimal_ext_cmd | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.\_minimal_ext_cmd | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
| mmcv.utils.version_utils.get_git_hash | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/utils/version_utils.py | mmengine.utils.version_utils.get_git_hash | https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/version_utils.py |
## `mmcv.cnn`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| -------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------ |
| mmcv.cnn.utils.sync_bn.\_BatchNormXd | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/cnn/utils/sync_bn.py | mmengine.model.utils.\_BatchNormXd | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/utils.py |
| mmcv.cnn.utils.sync_bn.revert_sync_batchnorm | https://github.com/open-mmlab/mmcv/blob/v1.7.1/mmcv/cnn/utils/sync_bn.py | mmengine.model.utils.revert_sync_batchnorm | https://github.com/open-mmlab/mmengine/blob/main/mmengine/model/utils.py |
## `mmcv.model_zoo`
| MMCV | MMCV URL | MMEngine | MMEngine URL |
| ------------------------------------ | ----------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------- |
| mmcv.model_zoo.deprecated.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/deprecated.json | mmengine.hub.deprecated.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/deprecated.json |
| mmcv.model_zoo.mmcls.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/mmcls.json | mmengine.hub.mmcls.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/mmcls.json |
| mmcv.model_zoo.open_mmlab.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/open_mmlab.json | mmengine.hub.openmmlab.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/openmmlab.json |
| mmcv.model_zoo.torchvision_0.12.json | https://github.com/open-mmlab/mmcv/tree/v1.7.1/mmcv/model_zoo/torchvision_0.12.json | mmengine.hub.torchvision_0.12.json | https://github.com/open-mmlab/mmengine/tree/main/mmengine/hub/torchvision_0.12.json |
...@@ -79,9 +79,9 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)' ...@@ -79,9 +79,9 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
<html> <html>
<body> <body>
<style> <style>
select { select {
z-index: 1000; /*z-index: 1000;*/
position: absolute; position: absolute;
top: 10px; top: 10px;
width: 6.7rem; width: 6.7rem;
...@@ -112,38 +112,50 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)' ...@@ -112,38 +112,50 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
/* left: 25.375rem; 25.375 = 17.375 + 6.7 + 1.3 */ /* left: 25.375rem; 25.375 = 17.375 + 6.7 + 1.3 */
left: 24rem; left: 24rem;
} }
</style> </style>
<div id="select-container"> <div id="select-container">
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.id))"
onchange="changeOS(this.value)" onchange="changeOS(this.value)"
id="select-os"> id="select-os">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeCUDA(this.value)" onchange="changeCUDA(this.value)"
id="select-cuda"> id="select-cuda">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeTorch(this.value)" onchange="changeTorch(this.value)"
id="select-torch"> id="select-torch">
</select> </select>
<select <select
size="1"
onmousedown="handleSelectMouseDown(this.id)" onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)" onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeMMCV(this.value)" onchange="changeMMCV(this.value)"
id="select-mmcv"> id="select-mmcv">
</select> </select>
</div> </div>
<pre id="select-cmd"></pre> <pre id="select-cmd"></pre>
</body> </body>
<script> <script>
// 各个select当前的值 // 各个select当前的值
let osVal, cudaVal, torchVal, mmcvVal; let osVal, cudaVal, torchVal, mmcvVal;
function clickOutside(targetDom, handler) {
const clickHandler = (e) => {
if (!targetDom || targetDom.contains(e.target)) return;
handler?.();
document.removeEventListener('click', clickHandler, false);
};
document.addEventListener('click', clickHandler, false);
}
function changeMMCV(val) { function changeMMCV(val) {
mmcvVal = val; mmcvVal = val;
change("select-mmcv"); change("select-mmcv");
...@@ -165,7 +177,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)' ...@@ -165,7 +177,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
const dom = document.getElementById(id); const dom = document.getElementById(id);
if (!dom) return; if (!dom) return;
const len = dom?.options?.length; const len = dom?.options?.length;
if (len >= 9) { if (len >= 10) {
dom.size = 10; dom.size = 10;
dom.style.zIndex = 100; dom.style.zIndex = 100;
} }
...@@ -274,7 +286,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)' ...@@ -274,7 +286,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
// 初始化,处理version数据,并调用findAndAppend // 初始化,处理version数据,并调用findAndAppend
function init() { function init() {
// 增加一个全局的click事件监听,作为select onBlur事件失效的兜底 // 增加一个全局的click事件监听,作为select onBlur事件失效的兜底
document.addEventListener("click", handleSelectBlur); // document.addEventListener("click", handleSelectBlur);
const version = window.version; const version = window.version;
// OS // OS
const os = Object.keys(version); const os = Object.keys(version);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
get_started/installation.md get_started/installation.md
get_started/build.md get_started/build.md
get_started/article.md get_started/article.md
get_started/api_reference.md
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
......
...@@ -6,13 +6,13 @@ MMCV 提供了检测、分割等任务中常用的算子 ...@@ -6,13 +6,13 @@ MMCV 提供了检测、分割等任务中常用的算子
| ---------------------------- | --- | ---- | --- | --- | ------ | | ---------------------------- | --- | ---- | --- | --- | ------ |
| ActiveRotatedFilter | √ | √ | | | √ | | ActiveRotatedFilter | √ | √ | | | √ |
| AssignScoreWithK | | √ | | | | | AssignScoreWithK | | √ | | | |
| BallQuery | | √ | √ | | | | BallQuery | | √ | √ | | |
| BBoxOverlaps | | √ | √ | √ | √ | | BBoxOverlaps | | √ | √ | √ | √ |
| BorderAlign | | √ | | | | | BorderAlign | | √ | | | |
| BoxIouRotated | √ | √ | √ | | √ | | BoxIouRotated | √ | √ | √ | | √ |
| BoxIouQuadri | √ | √ | | | | | BoxIouQuadri | √ | √ | | | |
| CARAFE | | √ | √ | | | | CARAFE | | √ | √ | | |
| ChamferDistance | | √ | | | | | ChamferDistance | | √ | | | |
| CrissCrossAttention | | √ | | | | | CrissCrossAttention | | √ | | | |
| ContourExpand | √ | | | | | | ContourExpand | √ | | | | |
| ConvexIoU | | √ | | | | | ConvexIoU | | √ | | | |
...@@ -33,7 +33,7 @@ MMCV 提供了检测、分割等任务中常用的算子 ...@@ -33,7 +33,7 @@ MMCV 提供了检测、分割等任务中常用的算子
| MergeCells | | √ | | | | | MergeCells | | √ | | | |
| MinAreaPolygon | | √ | | | | | MinAreaPolygon | | √ | | | |
| ModulatedDeformConv2d | √ | √ | √ | | √ | | ModulatedDeformConv2d | √ | √ | √ | | √ |
| MultiScaleDeformableAttn | | √ | √ | | | | MultiScaleDeformableAttn | | √ | √ | | |
| NMS | √ | √ | √ | | √ | | NMS | √ | √ | √ | | √ |
| NMSRotated | √ | √ | √ | | √ | | NMSRotated | √ | √ | √ | | √ |
| NMSQuadri | √ | √ | | | | | NMSQuadri | √ | √ | | | |
...@@ -41,10 +41,10 @@ MMCV 提供了检测、分割等任务中常用的算子 ...@@ -41,10 +41,10 @@ MMCV 提供了检测、分割等任务中常用的算子
| PointsInBoxes | √ | √ | | | | | PointsInBoxes | √ | √ | | | |
| PointsInPolygons | | √ | | | | | PointsInPolygons | | √ | | | |
| PSAMask | √ | √ | √ | | √ | | PSAMask | √ | √ | √ | | √ |
| RotatedFeatureAlign | √ | √ | √ | | | | RotatedFeatureAlign | √ | √ | √ | | |
| RoIPointPool3d | | √ | √ | | | | RoIPointPool3d | | √ | √ | | |
| RoIPool | | √ | √ | | √ | | RoIPool | | √ | √ | | √ |
| RoIAlignRotated | √ | √ | √ | | | | RoIAlignRotated | √ | √ | √ | | |
| RiRoIAlignRotated | | √ | | | | | RiRoIAlignRotated | | √ | | | |
| RoIAlign | √ | √ | √ | | √ | | RoIAlign | √ | √ | √ | | √ |
| RoIAwarePool3d | | √ | √ | | | | RoIAwarePool3d | | √ | √ | | |
......
...@@ -44,8 +44,8 @@ class ChamferDistanceFunction(Function): ...@@ -44,8 +44,8 @@ class ChamferDistanceFunction(Function):
xyz1 = xyz1.contiguous() xyz1 = xyz1.contiguous()
xyz2 = xyz2.contiguous() xyz2 = xyz2.contiguous()
dist1 = torch.zeros(batch_size, n).to(device) dist1 = torch.zeros(batch_size, n).type(xyz1.dtype).to(device)
dist2 = torch.zeros(batch_size, m).to(device) dist2 = torch.zeros(batch_size, m).type(xyz2.dtype).to(device)
idx1 = torch.zeros(batch_size, n).type(torch.IntTensor).to(device) idx1 = torch.zeros(batch_size, n).type(torch.IntTensor).to(device)
idx2 = torch.zeros(batch_size, m).type(torch.IntTensor).to(device) idx2 = torch.zeros(batch_size, m).type(torch.IntTensor).to(device)
...@@ -81,8 +81,8 @@ class ChamferDistanceFunction(Function): ...@@ -81,8 +81,8 @@ class ChamferDistanceFunction(Function):
device = grad_dist1.device device = grad_dist1.device
grad_dist1 = grad_dist1.contiguous() grad_dist1 = grad_dist1.contiguous()
grad_dist2 = grad_dist2.contiguous() grad_dist2 = grad_dist2.contiguous()
grad_xyz1 = torch.zeros(xyz1.size()).to(device) grad_xyz1 = torch.zeros(xyz1.size()).type(xyz1.dtype).to(device)
grad_xyz2 = torch.zeros(xyz2.size()).to(device) grad_xyz2 = torch.zeros(xyz2.size()).type(xyz2.dtype).to(device)
ext_module.chamfer_distance_backward(xyz1, xyz2, idx1, idx2, ext_module.chamfer_distance_backward(xyz1, xyz2, idx1, idx2,
grad_dist1, grad_dist2, grad_xyz1, grad_dist1, grad_dist2, grad_xyz1,
......
...@@ -88,7 +88,7 @@ __global__ void bbox_overlaps_cuda_kernel(const T* bbox1, const T* bbox2, ...@@ -88,7 +88,7 @@ __global__ void bbox_overlaps_cuda_kernel(const T* bbox1, const T* bbox2,
} }
} }
#if __CUDA_ARCH__ >= 530 #if __CUDACC__ >= 530
__device__ __forceinline__ __half __half_area(const __half x1, const __half y1, __device__ __forceinline__ __half __half_area(const __half x1, const __half y1,
const __half x2, const __half y2, const __half x2, const __half y2,
const __half offset) { const __half offset) {
...@@ -142,6 +142,6 @@ __device__ void bbox_overlaps_cuda_kernel_half( ...@@ -142,6 +142,6 @@ __device__ void bbox_overlaps_cuda_kernel_half(
ious[index] = __hdiv(interS, baseS); ious[index] = __hdiv(interS, baseS);
} }
} }
#endif // __CUDA_ARCH__ >= 530 #endif // __CUDACC__ >= 530
#endif // BBOX_OVERLAPS_CUDA_KERNEL_CUH #endif // BBOX_OVERLAPS_CUDA_KERNEL_CUH
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
#ifdef PARROTS_USE_HALF #ifdef PARROTS_USE_HALF
#include <cuda_fp16.h> #include <cuda_fp16.h>
#endif #endif
#ifdef __CUDA_ARCH__ #ifdef __CUDACC__
#define CUDA_INTRINSIC_FUNC(Expr) Expr #define CUDA_INTRINSIC_FUNC(Expr) Expr
#else #else
#define CUDA_INTRINSIC_FUNC(Expr) #define CUDA_INTRINSIC_FUNC(Expr)
#endif #endif
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300 #if !defined(__CUDACC__) || __CUDACC__ >= 300
#ifdef PARROTS_USE_HALF #ifdef PARROTS_USE_HALF
...@@ -104,6 +104,6 @@ __device__ inline T __shfl_xor_sync(unsigned mask, T var, int laneMask, ...@@ -104,6 +104,6 @@ __device__ inline T __shfl_xor_sync(unsigned mask, T var, int laneMask,
#endif // CUDA_VERSION < 9000 #endif // CUDA_VERSION < 9000
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300 #endif // !defined(__CUDACC__) || __CUDACC__ >= 300
#endif // INCLUDE_PARROTS_DARRAY_CUDAWARPFUNCTION_CUH_ #endif // INCLUDE_PARROTS_DARRAY_CUDAWARPFUNCTION_CUH_
...@@ -42,9 +42,9 @@ __device__ __forceinline__ static void reduceAdd(double *address, double val) { ...@@ -42,9 +42,9 @@ __device__ __forceinline__ static void reduceAdd(double *address, double val) {
atomicAdd(address, val); atomicAdd(address, val);
} }
#else #else
#ifdef __CUDA_ARCH__ #ifdef __CUDACC__
__device__ __forceinline__ static void reduceAdd(float *address, float val) { __device__ __forceinline__ static void reduceAdd(float *address, float val) {
#if (__CUDA_ARCH__ < 200) #if (__CUDACC__ < 200)
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma message( \ #pragma message( \
"compute capability lower than 2.x. fall back to use CAS version of atomicAdd for float32") "compute capability lower than 2.x. fall back to use CAS version of atomicAdd for float32")
...@@ -65,7 +65,7 @@ __device__ __forceinline__ static void reduceAdd(float *address, float val) { ...@@ -65,7 +65,7 @@ __device__ __forceinline__ static void reduceAdd(float *address, float val) {
} }
__device__ __forceinline__ static void reduceAdd(double *address, double val) { __device__ __forceinline__ static void reduceAdd(double *address, double val) {
#if (__CUDA_ARCH__ < 600) #if (__CUDACC__ < 600)
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma message( \ #pragma message( \
"compute capability lower than 6.x. fall back to use CAS version of atomicAdd for float64") "compute capability lower than 6.x. fall back to use CAS version of atomicAdd for float64")
...@@ -85,7 +85,7 @@ __device__ __forceinline__ static void reduceAdd(double *address, double val) { ...@@ -85,7 +85,7 @@ __device__ __forceinline__ static void reduceAdd(double *address, double val) {
atomicAdd(address, val); atomicAdd(address, val);
#endif #endif
} }
#endif // __CUDA_ARCH__ #endif // __CUDACC__
#endif // MMCV_WITH_HIP #endif // MMCV_WITH_HIP
template <typename T> template <typename T>
......
...@@ -60,7 +60,7 @@ using phalf = float16; ...@@ -60,7 +60,7 @@ using phalf = float16;
}() }()
/** atomicAdd **/ /** atomicAdd **/
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 #if defined(__CUDACC__) && __CUDACC__ < 600
static __inline__ __device__ double atomicAdd(double* address, double val) { static __inline__ __device__ double atomicAdd(double* address, double val) {
unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int* address_as_ull = (unsigned long long int*)address;
......
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
#ifndef PYTORCH_NPU_HELPER_HPP_ #ifndef PYTORCH_NPU_HELPER_HPP_
#define PYTORCH_NPU_HELPER_HPP_ #define PYTORCH_NPU_HELPER_HPP_
#include <torch_npu/csrc/aten/CustomFunctions.h>
#include <torch_npu/csrc/framework/utils/CalcuOpUtil.h> #include <torch_npu/csrc/framework/utils/CalcuOpUtil.h>
#include <torch_npu/csrc/framework/utils/OpAdapter.h> #include <torch_npu/csrc/framework/utils/OpAdapter.h>
#include "pytorch_cpp_helper.hpp" #include "pytorch_cpp_helper.hpp"
#include "pytorch_device_registry.hpp" #include "pytorch_device_registry.hpp"
#include "pytorch_npu_util.hpp"
#define NPU_NAME_SPACE at_npu::native #define NPU_NAME_SPACE at_npu::native
......
/******************************************************************************
* Copyright (c) 2022 Huawei Technologies Co., Ltd
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
#ifndef MMCV_OPS_CSRC_COMMON_PYTORCH_NPU_UTIL_HPP_
#define MMCV_OPS_CSRC_COMMON_PYTORCH_NPU_UTIL_HPP_
#include <ATen/Tensor.h>
#include <acl/acl_base.h>
#include <acl/acl_rt.h>
#include <c10/util/Exception.h>
#include <dlfcn.h>
#include <torch_npu/csrc/framework/utils/CalcuOpUtil.h>
#include <torch_npu/csrc/framework/utils/OpAdapter.h>
#include <functional>
#include <type_traits>
#include <vector>
#include "pytorch_cpp_helper.hpp"
#include "pytorch_device_registry.hpp"
#include "torch_npu/csrc/aten/NPUNativeFunctions.h"
#include "torch_npu/csrc/core/npu/NPUStream.h"
#include "torch_npu/csrc/framework/OpCommand.h"
#include "torch_npu/csrc/framework/interface/EnvVariables.h"
#include "torch_npu/csrc/framework/utils/CalcuOpUtil.h"
#include "torch_npu/csrc/framework/utils/OpPreparation.h"
#define NPU_NAME_SPACE at_npu::native
typedef struct aclOpExecutor aclOpExecutor;
typedef struct aclTensor aclTensor;
typedef struct aclScalar aclScalar;
typedef struct aclIntArray aclIntArray;
typedef struct aclFloatArray aclFloatArray;
typedef struct aclBoolArray aclBoolArray;
typedef struct aclTensorList aclTensorList;
typedef aclTensor *(*_aclCreateTensor)(
const int64_t *view_dims, uint64_t view_dims_num, aclDataType data_type,
const int64_t *stride, int64_t offset, aclFormat format,
const int64_t *storage_dims, uint64_t storage_dims_num, void *tensor_data);
typedef aclScalar *(*_aclCreateScalar)(void *value, aclDataType data_type);
typedef aclIntArray *(*_aclCreateIntArray)(const int64_t *value, uint64_t size);
typedef aclFloatArray *(*_aclCreateFloatArray)(const float *value,
uint64_t size);
typedef aclBoolArray *(*_aclCreateBoolArray)(const bool *value, uint64_t size);
typedef aclTensorList *(*_aclCreateTensorList)(const aclTensor *const *value,
uint64_t size);
typedef int (*_aclDestroyTensor)(const aclTensor *tensor);
typedef int (*_aclDestroyScalar)(const aclScalar *scalar);
typedef int (*_aclDestroyIntArray)(const aclIntArray *array);
typedef int (*_aclDestroyFloatArray)(const aclFloatArray *array);
typedef int (*_aclDestroyBoolArray)(const aclBoolArray *array);
typedef int (*_aclDestroyTensorList)(const aclTensorList *array);
constexpr int kHashBufSize = 8192;
constexpr int kHashBufMaxSize = kHashBufSize + 1024;
extern thread_local char g_hashBuf[kHashBufSize];
extern thread_local int g_hashOffset;
#ifdef MMCV_WITH_XLA
#define DEVICE_TYPE at_npu::key::NativeDeviceType
#else
#define DEVICE_TYPE c10::DeviceType::PrivateUse1
#endif
#define AT_ALL_SCALAR_TYPE_AND_ACL_DATATYPE_PAIR(_) \
_(at::ScalarType::Byte, ACL_UINT8) \
_(at::ScalarType::Char, ACL_INT8) \
_(at::ScalarType::Short, ACL_INT16) \
_(at::ScalarType::Int, ACL_INT32) \
_(at::ScalarType::Long, ACL_INT64) \
_(at::ScalarType::Half, ACL_FLOAT16) \
_(at::ScalarType::Float, ACL_FLOAT) \
_(at::ScalarType::Double, ACL_DOUBLE) \
_(at::ScalarType::ComplexHalf, ACL_DT_UNDEFINED) \
_(at::ScalarType::ComplexFloat, ACL_COMPLEX64) \
_(at::ScalarType::ComplexDouble, ACL_COMPLEX128) \
_(at::ScalarType::Bool, ACL_BOOL) \
_(at::ScalarType::QInt8, ACL_DT_UNDEFINED) \
_(at::ScalarType::QUInt8, ACL_DT_UNDEFINED) \
_(at::ScalarType::QInt32, ACL_DT_UNDEFINED) \
_(at::ScalarType::BFloat16, ACL_BF16) \
_(at::ScalarType::QUInt4x2, ACL_DT_UNDEFINED) \
_(at::ScalarType::QUInt2x4, ACL_DT_UNDEFINED) \
_(at::ScalarType::Undefined, ACL_DT_UNDEFINED) \
_(at::ScalarType::NumOptions, ACL_DT_UNDEFINED)
constexpr aclDataType kATenScalarTypeToAclDataTypeTable
[static_cast<int64_t>(at::ScalarType::NumOptions) + 1] = {
#define DEFINE_ENUM(_1, n) n,
AT_ALL_SCALAR_TYPE_AND_ACL_DATATYPE_PAIR(DEFINE_ENUM)
#undef DEFINE_ENUM
};
#define GET_OP_API_FUNC(apiName) \
reinterpret_cast<_##apiName>(GetOpApiFuncAddr(#apiName))
#define MEMCPY_TO_BUF(data_expression, size_expression) \
if (g_hashOffset + (size_expression) > kHashBufSize) { \
g_hashOffset = kHashBufMaxSize; \
return; \
} \
memcpy(g_hashBuf + g_hashOffset, data_expression, size_expression); \
g_hashOffset += size_expression;
inline const char *GetOpApiLibName(void) { return "libopapi.so"; }
inline const char *GetCustOpApiLibName(void) { return "libcust_opapi.so"; }
inline void *GetOpApiFuncAddrInLib(void *handler, const char *libName,
const char *apiName) {
auto funcAddr = dlsym(handler, apiName);
if (funcAddr == nullptr) {
ASCEND_LOGW("dlsym %s from %s failed, error:%s.", apiName, libName,
dlerror());
}
return funcAddr;
}
inline void *GetOpApiLibHandler(const char *libName) {
auto handler = dlopen(libName, RTLD_LAZY);
if (handler == nullptr) {
ASCEND_LOGW("dlopen %s failed, error:%s.", libName, dlerror());
}
return handler;
}
inline void *GetOpApiFuncAddr(const char *apiName) {
static auto custOpApiHandler = GetOpApiLibHandler(GetCustOpApiLibName());
if (custOpApiHandler != nullptr) {
auto funcAddr =
GetOpApiFuncAddrInLib(custOpApiHandler, GetCustOpApiLibName(), apiName);
if (funcAddr != nullptr) {
return funcAddr;
}
}
static auto opApiHandler = GetOpApiLibHandler(GetOpApiLibName());
if (opApiHandler == nullptr) {
return nullptr;
}
return GetOpApiFuncAddrInLib(opApiHandler, GetOpApiLibName(), apiName);
}
inline c10::Scalar ConvertTensorToScalar(const at::Tensor &tensor) {
c10::Scalar expScalar;
const at::Tensor *aclInput = &tensor;
if (aclInput->scalar_type() == at::ScalarType::Double) {
double value = *(double *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::Long) {
int64_t value = *(int64_t *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::Float) {
float value = *(float *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::Int) {
int value = *(int *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::Half) {
c10::Half value = *(c10::Half *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::Bool) {
int8_t value = *(int8_t *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::ComplexDouble) {
c10::complex<double> value = *(c10::complex<double> *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::ComplexFloat) {
c10::complex<float> value = *(c10::complex<float> *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
} else if (aclInput->scalar_type() == at::ScalarType::BFloat16) {
c10::BFloat16 value = *(c10::BFloat16 *)aclInput->data_ptr();
c10::Scalar scalar(value);
expScalar = scalar;
}
return expScalar;
}
inline at::Tensor CopyTensorHostToDevice(const at::Tensor &cpu_tensor) {
at::Tensor cpuPinMemTensor = cpu_tensor.pin_memory();
int deviceIndex = 0;
return cpuPinMemTensor.to(c10::Device(DEVICE_TYPE, deviceIndex),
cpuPinMemTensor.scalar_type(), true, true);
}
inline at::Tensor CopyScalarToDevice(const c10::Scalar &cpu_scalar,
at::ScalarType scalar_data_type) {
return CopyTensorHostToDevice(
scalar_to_tensor(cpu_scalar).to(scalar_data_type));
}
inline aclTensor *ConvertType(const at::Tensor &at_tensor) {
static const auto aclCreateTensor = GET_OP_API_FUNC(aclCreateTensor);
if (aclCreateTensor == nullptr) {
return nullptr;
}
if (!at_tensor.defined()) {
return nullptr;
}
at::ScalarType scalar_data_type = at_tensor.scalar_type();
aclDataType acl_data_type =
kATenScalarTypeToAclDataTypeTable[static_cast<int64_t>(scalar_data_type)];
TORCH_CHECK(
acl_data_type != ACL_DT_UNDEFINED,
std::string(c10::toString(scalar_data_type)) + " has not been supported")
c10::SmallVector<int64_t, 5> storageDims;
// if acl_data_type is ACL_STRING, storageDims is empty.
auto itemsize = at_tensor.itemsize();
if (itemsize == 0) {
AT_ERROR("When ConvertType, tensor item size of cannot be zero.");
return nullptr;
}
if (acl_data_type != ACL_STRING) {
storageDims.push_back(at_tensor.storage().nbytes() / itemsize);
}
const auto dimNum = at_tensor.sizes().size();
aclFormat format = ACL_FORMAT_ND;
switch (dimNum) {
case 3:
format = ACL_FORMAT_NCL;
break;
case 4:
format = ACL_FORMAT_NCHW;
break;
case 5:
format = ACL_FORMAT_NCDHW;
break;
default:
format = ACL_FORMAT_ND;
}
if (at_tensor.unsafeGetTensorImpl()->is_wrapped_number()) {
c10::Scalar expScalar = ConvertTensorToScalar(at_tensor);
at::Tensor aclInput = CopyScalarToDevice(expScalar, scalar_data_type);
return aclCreateTensor(aclInput.sizes().data(), aclInput.sizes().size(),
acl_data_type, aclInput.strides().data(),
aclInput.storage_offset(), format,
storageDims.data(), storageDims.size(),
const_cast<void *>(aclInput.storage().data()));
}
auto acl_tensor = aclCreateTensor(
at_tensor.sizes().data(), at_tensor.sizes().size(), acl_data_type,
at_tensor.strides().data(), at_tensor.storage_offset(), format,
storageDims.data(), storageDims.size(),
const_cast<void *>(at_tensor.storage().data()));
return acl_tensor;
}
inline aclScalar *ConvertType(const at::Scalar &at_scalar) {
static const auto aclCreateScalar = GET_OP_API_FUNC(aclCreateScalar);
if (aclCreateScalar == nullptr) {
return nullptr;
}
at::ScalarType scalar_data_type = at_scalar.type();
aclDataType acl_data_type =
kATenScalarTypeToAclDataTypeTable[static_cast<int64_t>(scalar_data_type)];
TORCH_CHECK(
acl_data_type != ACL_DT_UNDEFINED,
std::string(c10::toString(scalar_data_type)) + " has not been supported")
aclScalar *acl_scalar = nullptr;
switch (scalar_data_type) {
case at::ScalarType::Double: {
double value = at_scalar.toDouble();
acl_scalar = aclCreateScalar(&value, acl_data_type);
break;
}
case at::ScalarType::Long: {
int64_t value = at_scalar.toLong();
acl_scalar = aclCreateScalar(&value, acl_data_type);
break;
}
case at::ScalarType::Bool: {
bool value = at_scalar.toBool();
acl_scalar = aclCreateScalar(&value, acl_data_type);
break;
}
case at::ScalarType::ComplexDouble: {
auto value = at_scalar.toComplexDouble();
acl_scalar = aclCreateScalar(&value, acl_data_type);
break;
}
default:
acl_scalar = nullptr;
break;
}
return acl_scalar;
}
inline aclIntArray *ConvertType(const at::IntArrayRef &at_array) {
static const auto aclCreateIntArray = GET_OP_API_FUNC(aclCreateIntArray);
if (aclCreateIntArray == nullptr) {
return nullptr;
}
auto array = aclCreateIntArray(at_array.data(), at_array.size());
return array;
}
template <std::size_t N>
inline aclBoolArray *ConvertType(const std::array<bool, N> &value) {
static const auto aclCreateBoolArray = GET_OP_API_FUNC(aclCreateBoolArray);
if (aclCreateBoolArray == nullptr) {
return nullptr;
}
auto array = aclCreateBoolArray(value.data(), value.size());
return array;
}
inline aclBoolArray *ConvertType(const at::ArrayRef<bool> &value) {
static const auto aclCreateBoolArray = GET_OP_API_FUNC(aclCreateBoolArray);
if (aclCreateBoolArray == nullptr) {
return nullptr;
}
auto array = aclCreateBoolArray(value.data(), value.size());
return array;
}
inline aclTensorList *ConvertType(const at::TensorList &at_tensor_list) {
static const auto aclCreateTensorList = GET_OP_API_FUNC(aclCreateTensorList);
if (aclCreateTensorList == nullptr) {
return nullptr;
}
std::vector<const aclTensor *> tensor_list(at_tensor_list.size());
for (size_t i = 0; i < at_tensor_list.size(); i++) {
tensor_list[i] = ConvertType(at_tensor_list[i]);
}
auto acl_tensor_list =
aclCreateTensorList(tensor_list.data(), tensor_list.size());
return acl_tensor_list;
}
inline aclTensor *ConvertType(const c10::optional<at::Tensor> &opt_tensor) {
if (opt_tensor.has_value() && opt_tensor.value().defined()) {
return ConvertType(opt_tensor.value());
}
return nullptr;
}
inline aclIntArray *ConvertType(
const c10::optional<at::IntArrayRef> &opt_array) {
if (opt_array.has_value()) {
return ConvertType(opt_array.value());
}
return nullptr;
}
inline aclScalar *ConvertType(const c10::optional<at::Scalar> &opt_scalar) {
if (opt_scalar.has_value()) {
return ConvertType(opt_scalar.value());
}
return nullptr;
}
inline aclDataType ConvertType(const at::ScalarType scalarType) {
return kATenScalarTypeToAclDataTypeTable[static_cast<int64_t>(scalarType)];
}
template <typename T>
T ConvertType(T value) {
return value;
}
template <typename Tuple, size_t... I>
auto ConvertToOpApiFunc(const Tuple &params, void *opApiAddr,
std::index_sequence<I...>) {
typedef int (*OpApiFunc)(
typename std::decay<decltype(std::get<I>(params))>::type...);
auto func = reinterpret_cast<OpApiFunc>(opApiAddr);
return func;
}
template <typename Tuple>
auto ConvertToOpApiFunc(const Tuple &params, void *opApiAddr) {
static constexpr auto size = std::tuple_size<Tuple>::value;
return ConvertToOpApiFunc(params, opApiAddr,
std::make_index_sequence<size>{});
}
inline void Release(aclTensor *p) {
static const auto aclDestroyTensor = GET_OP_API_FUNC(aclDestroyTensor);
if (aclDestroyTensor == nullptr) {
return;
}
aclDestroyTensor(p);
}
inline void Release(aclScalar *p) {
static const auto aclDestroyScalar = GET_OP_API_FUNC(aclDestroyScalar);
if (aclDestroyScalar == nullptr) {
return;
}
aclDestroyScalar(p);
}
inline void Release(aclIntArray *p) {
static const auto aclDestroyIntArray = GET_OP_API_FUNC(aclDestroyIntArray);
if (aclDestroyIntArray == nullptr) {
return;
}
aclDestroyIntArray(p);
}
inline void Release(aclBoolArray *p) {
static const auto aclDestroyBoolArray = GET_OP_API_FUNC(aclDestroyBoolArray);
if (aclDestroyBoolArray == nullptr) {
return;
}
aclDestroyBoolArray(p);
}
inline void Release(aclTensorList *p) {
static const auto aclDestroyTensorList =
GET_OP_API_FUNC(aclDestroyTensorList);
if (aclDestroyTensorList == nullptr) {
return;
}
aclDestroyTensorList(p);
}
template <typename T>
void Release(T value) {
(void)value;
}
template <typename Tuple, size_t... I>
void CallRelease(Tuple t, std::index_sequence<I...>) {
(void)std::initializer_list<int>{(Release(std::get<I>(t)), 0)...};
}
template <typename Tuple>
void ReleaseConvertTypes(Tuple &t) {
static constexpr auto size = std::tuple_size<Tuple>::value;
CallRelease(t, std::make_index_sequence<size>{});
}
template <typename... Ts>
constexpr auto ConvertTypes(Ts &... args) {
return std::make_tuple(ConvertType(args)...);
}
template <typename Function, typename Tuple, size_t... I>
auto call(Function f, Tuple t, std::index_sequence<I...>) {
return f(std::get<I>(t)...);
}
template <typename Function, typename Tuple>
auto call(Function f, Tuple t) {
static constexpr auto size = std::tuple_size<Tuple>::value;
return call(f, t, std::make_index_sequence<size>{});
}
template <std::size_t N>
void AddParamToBuf(const std::array<bool, N> &value) {
MEMCPY_TO_BUF(value.data(), value.size() * sizeof(bool));
}
template <typename T>
void AddParamToBuf(const T &value) {
MEMCPY_TO_BUF(&value, sizeof(T));
}
void AddParamToBuf(const at::Tensor &);
void AddParamToBuf(const at::Scalar &);
void AddParamToBuf(const at::IntArrayRef &);
void AddParamToBuf(const at::ArrayRef<bool> &);
void AddParamToBuf(const at::TensorList &);
void AddParamToBuf(const c10::optional<at::Tensor> &);
void AddParamToBuf(const c10::optional<at::IntArrayRef> &);
void AddParamToBuf(const c10::optional<at::Scalar> &);
void AddParamToBuf(const at::ScalarType);
void AddParamToBuf(const string &);
void AddParamToBuf();
template <typename T, typename... Args>
void AddParamToBuf(const T &arg, Args &... args) {
AddParamToBuf(arg);
AddParamToBuf(args...);
}
uint64_t CalcHashId();
typedef int (*InitHugeMemThreadLocal)(void *, bool);
typedef void (*UnInitHugeMemThreadLocal)(void *, bool);
typedef void (*ReleaseHugeMem)(void *, bool);
#define EXEC_NPU_CMD(aclnn_api, ...) \
do { \
static const auto getWorkspaceSizeFuncAddr = \
GetOpApiFuncAddr(#aclnn_api "GetWorkspaceSize"); \
static const auto opApiFuncAddr = GetOpApiFuncAddr(#aclnn_api); \
static const auto initMemAddr = \
GetOpApiFuncAddr("InitHugeMemThreadLocal"); \
static const auto unInitMemAddr = \
GetOpApiFuncAddr("UnInitHugeMemThreadLocal"); \
static const auto releaseMemAddr = GetOpApiFuncAddr("ReleaseHugeMem"); \
TORCH_CHECK( \
getWorkspaceSizeFuncAddr != nullptr && opApiFuncAddr != nullptr, \
#aclnn_api, " or ", #aclnn_api "GetWorkspaceSize", " not in ", \
GetOpApiLibName(), ", or ", GetOpApiLibName(), "not found."); \
auto acl_stream = c10_npu::getCurrentNPUStream().stream(false); \
uint64_t workspace_size = 0; \
uint64_t *workspace_size_addr = &workspace_size; \
aclOpExecutor *executor = nullptr; \
aclOpExecutor **executor_addr = &executor; \
InitHugeMemThreadLocal initMemFunc = \
reinterpret_cast<InitHugeMemThreadLocal>(initMemAddr); \
UnInitHugeMemThreadLocal unInitMemFunc = \
reinterpret_cast<UnInitHugeMemThreadLocal>(unInitMemAddr); \
if (initMemFunc) { \
initMemFunc(nullptr, false); \
} \
auto converted_params = \
ConvertTypes(__VA_ARGS__, workspace_size_addr, executor_addr); \
static auto getWorkspaceSizeFunc = \
ConvertToOpApiFunc(converted_params, getWorkspaceSizeFuncAddr); \
auto workspace_status = call(getWorkspaceSizeFunc, converted_params); \
TORCH_CHECK(workspace_status == 0, \
"call " #aclnn_api " failed, detail:", aclGetRecentErrMsg()); \
void *workspace_addr = nullptr; \
if (workspace_size != 0) { \
at::TensorOptions options = \
at::TensorOptions(torch_npu::utils::get_npu_device_type()); \
auto workspace_tensor = \
at::empty({workspace_size}, options.dtype(kByte)); \
workspace_addr = const_cast<void *>(workspace_tensor.storage().data()); \
} \
auto acl_call = [converted_params, workspace_addr, workspace_size, \
acl_stream, executor]() -> int { \
typedef int (*OpApiFunc)(void *, uint64_t, aclOpExecutor *, \
const aclrtStream); \
OpApiFunc opApiFunc = reinterpret_cast<OpApiFunc>(opApiFuncAddr); \
auto api_ret = \
opApiFunc(workspace_addr, workspace_size, executor, acl_stream); \
TORCH_CHECK(api_ret == 0, "call " #aclnn_api " failed, detail:", \
aclGetRecentErrMsg()); \
ReleaseConvertTypes(converted_params); \
ReleaseHugeMem releaseMemFunc = \
reinterpret_cast<ReleaseHugeMem>(releaseMemAddr); \
if (releaseMemFunc) { \
releaseMemFunc(nullptr, false); \
} \
return api_ret; \
}; \
at_npu::native::OpCommand cmd; \
cmd.Name(#aclnn_api); \
cmd.SetCustomHandler(acl_call); \
cmd.Run(); \
if (unInitMemFunc) { \
unInitMemFunc(nullptr, false); \
} \
} while (false)
#endif // MMCV_OPS_CSRC_COMMON_PYTORCH_NPU_UTIL_HPP_
...@@ -562,7 +562,7 @@ struct TensorView { ...@@ -562,7 +562,7 @@ struct TensorView {
} }
TV_HOST_DEVICE_INLINE scalar_t &operator()() { TV_HOST_DEVICE_INLINE scalar_t &operator()() {
#if defined TV_DEBUG #if defined TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mPtr != nullptr, TV_DEVICE_REQUIRE(mPtr != nullptr,
"you want get value but the view is empty.%s", "\n"); "you want get value but the view is empty.%s", "\n");
TV_DEVICE_REQUIRE(mShape.ndim() == 0, TV_DEVICE_REQUIRE(mShape.ndim() == 0,
...@@ -578,7 +578,7 @@ struct TensorView { ...@@ -578,7 +578,7 @@ struct TensorView {
} }
TV_HOST_DEVICE_INLINE const scalar_t &operator()() const { TV_HOST_DEVICE_INLINE const scalar_t &operator()() const {
#if defined TV_DEBUG #if defined TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mPtr != nullptr, TV_DEVICE_REQUIRE(mPtr != nullptr,
"you want get value but the view is empty.%s", "\n"); "you want get value but the view is empty.%s", "\n");
TV_DEVICE_REQUIRE(mShape.ndim() == 0, TV_DEVICE_REQUIRE(mShape.ndim() == 0,
...@@ -596,7 +596,7 @@ struct TensorView { ...@@ -596,7 +596,7 @@ struct TensorView {
template <class T1> template <class T1>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1) { TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1) {
#if defined TV_DEBUG #if defined TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 1, TV_DEVICE_REQUIRE(mShape.ndim() == 1,
"you provide 1 indexes, but dim is %ld\n", mShape.ndim()); "you provide 1 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -613,7 +613,7 @@ struct TensorView { ...@@ -613,7 +613,7 @@ struct TensorView {
template <class T1, class T2> template <class T1, class T2>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2) { TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2) {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 2, TV_DEVICE_REQUIRE(mShape.ndim() == 2,
"you provide 2 indexes, but dim is %ld\n", mShape.ndim()); "you provide 2 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -636,7 +636,7 @@ struct TensorView { ...@@ -636,7 +636,7 @@ struct TensorView {
template <class T1, class T2, class T3> template <class T1, class T2, class T3>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3) { TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3) {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 3, TV_DEVICE_REQUIRE(mShape.ndim() == 3,
"you provide 3 indexes, but dim is %ld\n", mShape.ndim()); "you provide 3 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -664,7 +664,7 @@ struct TensorView { ...@@ -664,7 +664,7 @@ struct TensorView {
template <class T1, class T2, class T3, class T4> template <class T1, class T2, class T3, class T4>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3, T4 i4) { TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3, T4 i4) {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 4, TV_DEVICE_REQUIRE(mShape.ndim() == 4,
"you provide 4 indexes, but dim is %ld\n", mShape.ndim()); "you provide 4 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -698,7 +698,7 @@ struct TensorView { ...@@ -698,7 +698,7 @@ struct TensorView {
template <class T1> template <class T1>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1) const { TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1) const {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 1, TV_DEVICE_REQUIRE(mShape.ndim() == 1,
"you provide 1 indexes, but dim is %ld\n", mShape.ndim()); "you provide 1 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -716,7 +716,7 @@ struct TensorView { ...@@ -716,7 +716,7 @@ struct TensorView {
template <class T1, class T2> template <class T1, class T2>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2) const { TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2) const {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 2, TV_DEVICE_REQUIRE(mShape.ndim() == 2,
"you provide 2 indexes, but dim is %ld\n", mShape.ndim()); "you provide 2 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -740,7 +740,7 @@ struct TensorView { ...@@ -740,7 +740,7 @@ struct TensorView {
template <class T1, class T2, class T3> template <class T1, class T2, class T3>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3) const { TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3) const {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 3, TV_DEVICE_REQUIRE(mShape.ndim() == 3,
"you provide 3 indexes, but dim is %ld\n", mShape.ndim()); "you provide 3 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -769,7 +769,7 @@ struct TensorView { ...@@ -769,7 +769,7 @@ struct TensorView {
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3, TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3,
T4 i4) const { T4 i4) const {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 4, TV_DEVICE_REQUIRE(mShape.ndim() == 4,
"you provide 4 indexes, but dim is %ld\n", mShape.ndim()); "you provide 4 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0], TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
...@@ -802,7 +802,7 @@ struct TensorView { ...@@ -802,7 +802,7 @@ struct TensorView {
TV_HOST_DEVICE_INLINE scalar_t &operator[](int idx) { TV_HOST_DEVICE_INLINE scalar_t &operator[](int idx) {
#ifdef TV_DEBUG #ifdef TV_DEBUG
#if defined(__CUDA_ARCH__) #if defined(__CUDACC__)
TV_DEVICE_REQUIRE(idx >= 0 && idx < size(), TV_DEVICE_REQUIRE(idx >= 0 && idx < size(),
"index(%d) out-of-range: [0, %ld)\n", int(idx), size()); "index(%d) out-of-range: [0, %ld)\n", int(idx), size());
#else #else
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// Disable fp16 on ROCm device // Disable fp16 on ROCm device
#ifndef MMCV_WITH_HIP #ifndef MMCV_WITH_HIP
#if __CUDA_ARCH__ >= 530 #if __CUDACC__ >= 530
template <> template <>
__global__ void bbox_overlaps_cuda_kernel<at::Half>( __global__ void bbox_overlaps_cuda_kernel<at::Half>(
const at::Half* bbox1, const at::Half* bbox2, at::Half* ious, const at::Half* bbox1, const at::Half* bbox2, at::Half* ious,
...@@ -16,7 +16,7 @@ __global__ void bbox_overlaps_cuda_kernel<at::Half>( ...@@ -16,7 +16,7 @@ __global__ void bbox_overlaps_cuda_kernel<at::Half>(
num_bbox2, mode, aligned, offset); num_bbox2, mode, aligned, offset);
} }
#endif // __CUDA_ARCH__ >= 530 #endif // __CUDACC__ >= 530
#endif // MMCV_WITH_HIP #endif // MMCV_WITH_HIP
void BBoxOverlapsCUDAKernelLauncher(const Tensor bboxes1, const Tensor bboxes2, void BBoxOverlapsCUDAKernelLauncher(const Tensor bboxes1, const Tensor bboxes2,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment