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包)
### 2、使用源码编译方式安装
#### 编译环境准备
提供2种环境准备方式
提供基于fastpt不转码编译
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
pip install torch* (下载的torch的whl包)
pip install fastpt* (下载的fastpt的whl包, 安装顺序, 先安装torch,后安装fastpt)
pip install setuptools==59.5.0 wheel
```
......@@ -31,11 +32,15 @@ git clone https://developer.hpccube.com/codes/aicomponent/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
pip install dist/mmcv*
2. 源码编译安装
3. 源码编译安装
MMCV_WITH_OPS=1 python3 setup.py install
```
#### 注意事项
......
{
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -11,6 +27,8 @@
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -18,6 +36,8 @@
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -27,6 +47,8 @@
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -36,6 +58,8 @@
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -47,6 +71,8 @@
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -58,6 +84,8 @@
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -69,6 +97,8 @@
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -80,6 +110,8 @@
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -91,6 +123,8 @@
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -102,6 +136,8 @@
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -113,6 +149,8 @@
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -134,6 +172,8 @@
"cuda": "10.2",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -145,6 +185,8 @@
"cuda": "10.2",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -156,6 +198,8 @@
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -167,6 +211,8 @@
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -178,6 +224,8 @@
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -205,10 +253,19 @@
"2.0.0rc1"
]
},
{
"cuda": "10.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "10.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -236,6 +293,13 @@
"2.0.0rc1"
]
},
{
"cuda": "10.1",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "9.2",
"torch": "1.7.x",
......@@ -256,10 +320,27 @@
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -267,6 +348,8 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -276,6 +359,8 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -287,6 +372,8 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -298,6 +385,8 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -309,6 +398,8 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -320,6 +411,8 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -346,13 +439,37 @@
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
}
],
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -360,6 +477,8 @@
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -367,6 +486,8 @@
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -376,6 +497,8 @@
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -385,6 +508,8 @@
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -396,6 +521,8 @@
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -407,6 +534,8 @@
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -418,6 +547,8 @@
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -429,6 +560,8 @@
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -440,6 +573,8 @@
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -451,6 +586,8 @@
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -462,6 +599,8 @@
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -473,6 +612,8 @@
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -484,6 +625,8 @@
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -495,6 +638,8 @@
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -549,10 +694,19 @@
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -560,6 +714,8 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -569,6 +725,8 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -580,6 +738,8 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -591,6 +751,8 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -602,6 +764,8 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -613,6 +777,8 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -642,10 +808,18 @@
}
],
"macOS": [
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.0"
]
},
......@@ -653,6 +827,7 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -670,6 +845,7 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -680,6 +856,7 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -690,6 +867,7 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -700,6 +878,7 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -710,6 +889,7 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......
This diff is collapsed.
......@@ -81,9 +81,9 @@ Select the appropriate installation command depending on the type of system, CUD
<html>
<body>
<style>
<style>
select {
z-index: 1000;
/*z-index: 1000;*/
position: absolute;
top: 10px;
width: 6.7rem;
......@@ -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: 24rem;
}
</style>
<div id="select-container">
</style>
<div id="select-container">
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.id))"
onchange="changeOS(this.value)"
id="select-os">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeCUDA(this.value)"
id="select-cuda">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeTorch(this.value)"
id="select-torch">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeMMCV(this.value)"
id="select-mmcv">
</select>
</div>
<pre id="select-cmd"></pre>
</div>
<pre id="select-cmd"></pre>
</body>
<script>
// 各个select当前的值
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) {
mmcvVal = val;
change("select-mmcv");
......@@ -161,11 +174,12 @@ Select the appropriate installation command depending on the type of system, CUD
osVal = val;
change("select-os");
}
// 控制size大小相关的几个方法
function handleSelectMouseDown(id) {
const dom = document.getElementById(id);
if (!dom) return;
const len = dom?.options?.length;
if (len >= 9) {
if (len >= 10) {
dom.size = 10;
dom.style.zIndex = 100;
}
......@@ -179,6 +193,7 @@ Select the appropriate installation command depending on the type of system, CUD
function handleSelectBlur(id) {
const dom = document.getElementById(id);
if (!dom) {
// 如果没有指定特定的id,那就直接把所有的select都设置成size = 1
handleSelectClick();
return;
}
......@@ -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);
cmd.textContent = cmdString;
}
// string数组去重
function unique(arr) {
if (!arr || !Array.isArray(arr)) return [];
return [...new Set(arr)];
}
// 根据string数组生成option的DocumentFragment
function genOptionFragment(data, id) {
const name = id.includes("-")? id.split("-")[1] : id;
const fragment = new DocumentFragment();
......@@ -213,23 +230,33 @@ Select the appropriate installation command depending on the type of system, CUD
text = `${option}`;
}
ele.textContent = text;
// 添加value属性,方便下拉框选择时直接读到数据
ele.value = option;
// 添加点击事件监听
ele.addEventListener('click', handleSelectClick);
fragment.appendChild(ele);
});
return fragment;
}
// 在dom树中找到id对应的dom(select元素),并将生成的options添加到元素内
function findAndAppend(data, id) {
const fragment = genOptionFragment(data, id);
const dom = document.getElementById(id);
if (dom) dom.replaceChildren(fragment);
}
/**
* change方法的重点在于
* 1. 各个下拉框数据的联动
* OS ==> cuda ==> torch ==> mmcv
* 2. 命令行的修改
*/
function change(id) {
const order = ["select-mmcv", "select-torch", "select-cuda", "select-os"];
const idx = order.indexOf(id);
if (idx === -1) return;
const versionDetail = version[osVal];
if (idx >= 3) {
// 根据os修改cuda
let cuda = [];
versionDetail.forEach(v => {
cuda.push(v.cuda);
......@@ -239,6 +266,7 @@ Select the appropriate installation command depending on the type of system, CUD
findAndAppend(cuda, "select-cuda");
}
if (idx >= 2) {
// 根据cuda修改torch
const torch = [];
versionDetail.forEach(v => {
if (v.cuda === cudaVal) torch.push(v.torch);
......@@ -247,6 +275,7 @@ Select the appropriate installation command depending on the type of system, CUD
findAndAppend(torch, "select-torch");
}
if (idx >= 1) {
// 根据torch修改mmcv
let mmcv = [];
versionDetail.forEach(v => {
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
}
changeCmd();
}
// 初始化,处理version数据,并调用findAndAppend
function init() {
document.addEventListener("click", handleSelectBlur);
// 增加一个全局的click事件监听,作为select onBlur事件失效的兜底
// document.addEventListener("click", handleSelectBlur);
const version = window.version;
// OS
const os = Object.keys(version);
osVal = os[0];
findAndAppend(os, "select-os");
change("select-os");
changeCmd();
}
// 利用xhr获取本地version数据,如果作为html直接浏览的话需要使用本地服务器打开,否则会有跨域问题
window.onload = function () {
const url = "../_static/version.json"
// 申明一个XMLHttpRequest
const request = new XMLHttpRequest();
// 设置请求方法与路径
request.open("get", url);
// 不发送数据到服务器
request.send(null);
//XHR对象获取到返回信息后执行
request.onload = function () {
// 返回状态为200,即为数据获取成功
if (request.status !== 200) return;
const data = JSON.parse(request.responseText);
window.version = data;
......
......@@ -10,6 +10,7 @@ You can switch between Chinese and English documents in the lower-left corner of
get_started/introduction.md
get_started/installation.md
get_started/build.md
get_started/api_reference.md
.. toctree::
:maxdepth: 2
......
......@@ -6,13 +6,13 @@ We implement common ops used in detection, segmentation, etc.
| ---------------------------- | --- | ---- | --- | --- | ------ |
| ActiveRotatedFilter | √ | √ | | | √ |
| AssignScoreWithK | | √ | | | |
| BallQuery | | √ | √ | | |
| BallQuery | | √ | √ | | |
| BBoxOverlaps | | √ | √ | √ | √ |
| BorderAlign | | √ | | | |
| BoxIouRotated | √ | √ | √ | | √ |
| BoxIouQuadri | √ | √ | | | |
| CARAFE | | √ | √ | | |
| ChamferDistance | | √ | | | |
| ChamferDistance | | √ | | | |
| CrissCrossAttention | | √ | | | |
| ContourExpand | √ | | | | |
| ConvexIoU | | √ | | | |
......@@ -33,7 +33,7 @@ We implement common ops used in detection, segmentation, etc.
| MergeCells | | √ | | | |
| MinAreaPolygon | | √ | | | |
| ModulatedDeformConv2d | √ | √ | √ | | √ |
| MultiScaleDeformableAttn | | √ | √ | | |
| MultiScaleDeformableAttn | | √ | √ | | |
| NMS | √ | √ | √ | | √ |
| NMSRotated | √ | √ | √ | | √ |
| NMSQuadri | √ | √ | | | |
......@@ -41,10 +41,10 @@ We implement common ops used in detection, segmentation, etc.
| PointsInBoxes | √ | √ | | | |
| PointsInPolygons | | √ | | | √ |
| PSAMask | √ | √ | √ | | √ |
| RotatedFeatureAlign | √ | √ | √ | | |
| RotatedFeatureAlign | √ | √ | √ | | |
| RoIPointPool3d | | √ | √ | | |
| RoIPool | | √ | √ | | √ |
| RoIAlignRotated | √ | √ | √ | | |
| RoIAlignRotated | √ | √ | √ | | |
| RiRoIAlignRotated | | √ | | | |
| RoIAlign | √ | √ | √ | | √ |
| RoIAwarePool3d | | √ | √ | | |
......
{
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -11,6 +27,8 @@
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -18,6 +36,8 @@
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -27,6 +47,8 @@
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -36,6 +58,8 @@
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -47,6 +71,8 @@
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -58,6 +84,8 @@
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -69,6 +97,8 @@
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -80,6 +110,8 @@
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -91,6 +123,8 @@
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -102,6 +136,8 @@
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -113,6 +149,8 @@
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -134,6 +172,8 @@
"cuda": "10.2",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -145,6 +185,8 @@
"cuda": "10.2",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -156,6 +198,8 @@
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -167,6 +211,8 @@
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -178,6 +224,8 @@
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -205,10 +253,19 @@
"2.0.0rc1"
]
},
{
"cuda": "10.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "10.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -236,6 +293,13 @@
"2.0.0rc1"
]
},
{
"cuda": "10.1",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "9.2",
"torch": "1.7.x",
......@@ -256,10 +320,27 @@
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -267,6 +348,8 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -276,6 +359,8 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -287,6 +372,8 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -298,6 +385,8 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -309,6 +398,8 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -320,6 +411,8 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -346,13 +439,37 @@
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
}
],
"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",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -360,6 +477,8 @@
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -367,6 +486,8 @@
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -376,6 +497,8 @@
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -385,6 +508,8 @@
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -396,6 +521,8 @@
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -407,6 +534,8 @@
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -418,6 +547,8 @@
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -429,6 +560,8 @@
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -440,6 +573,8 @@
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -451,6 +586,8 @@
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -462,6 +599,8 @@
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -473,6 +612,8 @@
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -484,6 +625,8 @@
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -495,6 +638,8 @@
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -549,10 +694,19 @@
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0"
]
},
......@@ -560,6 +714,8 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -569,6 +725,8 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -580,6 +738,8 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -591,6 +751,8 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -602,6 +764,8 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -613,6 +777,8 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -642,10 +808,18 @@
}
],
"macOS": [
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.0"
]
},
......@@ -653,6 +827,7 @@
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
......@@ -670,6 +845,7 @@
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -680,6 +856,7 @@
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -690,6 +867,7 @@
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -700,6 +878,7 @@
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......@@ -710,6 +889,7 @@
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
......
This diff is collapsed.
......@@ -79,9 +79,9 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
<html>
<body>
<style>
<style>
select {
z-index: 1000;
/*z-index: 1000;*/
position: absolute;
top: 10px;
width: 6.7rem;
......@@ -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: 24rem;
}
</style>
<div id="select-container">
</style>
<div id="select-container">
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.id))"
onchange="changeOS(this.value)"
id="select-os">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeCUDA(this.value)"
id="select-cuda">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeTorch(this.value)"
id="select-torch">
</select>
<select
size="1"
onmousedown="handleSelectMouseDown(this.id)"
onblur="handleSelectBlur(this.id)"
onclick="clickOutside(this, () => handleSelectBlur(this.is))"
onchange="changeMMCV(this.value)"
id="select-mmcv">
</select>
</div>
<pre id="select-cmd"></pre>
</div>
<pre id="select-cmd"></pre>
</body>
<script>
// 各个select当前的值
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) {
mmcvVal = val;
change("select-mmcv");
......@@ -165,7 +177,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
const dom = document.getElementById(id);
if (!dom) return;
const len = dom?.options?.length;
if (len >= 9) {
if (len >= 10) {
dom.size = 10;
dom.style.zIndex = 100;
}
......@@ -274,7 +286,7 @@ python -c 'import torch;print(torch.__version__);print(torch.version.cuda)'
// 初始化,处理version数据,并调用findAndAppend
function init() {
// 增加一个全局的click事件监听,作为select onBlur事件失效的兜底
document.addEventListener("click", handleSelectBlur);
// document.addEventListener("click", handleSelectBlur);
const version = window.version;
// OS
const os = Object.keys(version);
......
......@@ -11,6 +11,7 @@
get_started/installation.md
get_started/build.md
get_started/article.md
get_started/api_reference.md
.. toctree::
:maxdepth: 2
......
......@@ -6,13 +6,13 @@ MMCV 提供了检测、分割等任务中常用的算子
| ---------------------------- | --- | ---- | --- | --- | ------ |
| ActiveRotatedFilter | √ | √ | | | √ |
| AssignScoreWithK | | √ | | | |
| BallQuery | | √ | √ | | |
| BallQuery | | √ | √ | | |
| BBoxOverlaps | | √ | √ | √ | √ |
| BorderAlign | | √ | | | |
| BoxIouRotated | √ | √ | √ | | √ |
| BoxIouQuadri | √ | √ | | | |
| CARAFE | | √ | √ | | |
| ChamferDistance | | √ | | | |
| ChamferDistance | | √ | | | |
| CrissCrossAttention | | √ | | | |
| ContourExpand | √ | | | | |
| ConvexIoU | | √ | | | |
......@@ -33,7 +33,7 @@ MMCV 提供了检测、分割等任务中常用的算子
| MergeCells | | √ | | | |
| MinAreaPolygon | | √ | | | |
| ModulatedDeformConv2d | √ | √ | √ | | √ |
| MultiScaleDeformableAttn | | √ | √ | | |
| MultiScaleDeformableAttn | | √ | √ | | |
| NMS | √ | √ | √ | | √ |
| NMSRotated | √ | √ | √ | | √ |
| NMSQuadri | √ | √ | | | |
......@@ -41,10 +41,10 @@ MMCV 提供了检测、分割等任务中常用的算子
| PointsInBoxes | √ | √ | | | |
| PointsInPolygons | | √ | | | |
| PSAMask | √ | √ | √ | | √ |
| RotatedFeatureAlign | √ | √ | √ | | |
| RotatedFeatureAlign | √ | √ | √ | | |
| RoIPointPool3d | | √ | √ | | |
| RoIPool | | √ | √ | | √ |
| RoIAlignRotated | √ | √ | √ | | |
| RoIAlignRotated | √ | √ | √ | | |
| RiRoIAlignRotated | | √ | | | |
| RoIAlign | √ | √ | √ | | √ |
| RoIAwarePool3d | | √ | √ | | |
......
......@@ -44,8 +44,8 @@ class ChamferDistanceFunction(Function):
xyz1 = xyz1.contiguous()
xyz2 = xyz2.contiguous()
dist1 = torch.zeros(batch_size, n).to(device)
dist2 = torch.zeros(batch_size, m).to(device)
dist1 = torch.zeros(batch_size, n).type(xyz1.dtype).to(device)
dist2 = torch.zeros(batch_size, m).type(xyz2.dtype).to(device)
idx1 = torch.zeros(batch_size, n).type(torch.IntTensor).to(device)
idx2 = torch.zeros(batch_size, m).type(torch.IntTensor).to(device)
......@@ -81,8 +81,8 @@ class ChamferDistanceFunction(Function):
device = grad_dist1.device
grad_dist1 = grad_dist1.contiguous()
grad_dist2 = grad_dist2.contiguous()
grad_xyz1 = torch.zeros(xyz1.size()).to(device)
grad_xyz2 = torch.zeros(xyz2.size()).to(device)
grad_xyz1 = torch.zeros(xyz1.size()).type(xyz1.dtype).to(device)
grad_xyz2 = torch.zeros(xyz2.size()).type(xyz2.dtype).to(device)
ext_module.chamfer_distance_backward(xyz1, xyz2, idx1, idx2,
grad_dist1, grad_dist2, grad_xyz1,
......
......@@ -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,
const __half x2, const __half y2,
const __half offset) {
......@@ -142,6 +142,6 @@ __device__ void bbox_overlaps_cuda_kernel_half(
ious[index] = __hdiv(interS, baseS);
}
}
#endif // __CUDA_ARCH__ >= 530
#endif // __CUDACC__ >= 530
#endif // BBOX_OVERLAPS_CUDA_KERNEL_CUH
......@@ -15,13 +15,13 @@
#ifdef PARROTS_USE_HALF
#include <cuda_fp16.h>
#endif
#ifdef __CUDA_ARCH__
#ifdef __CUDACC__
#define CUDA_INTRINSIC_FUNC(Expr) Expr
#else
#define CUDA_INTRINSIC_FUNC(Expr)
#endif
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
#if !defined(__CUDACC__) || __CUDACC__ >= 300
#ifdef PARROTS_USE_HALF
......@@ -104,6 +104,6 @@ __device__ inline T __shfl_xor_sync(unsigned mask, T var, int laneMask,
#endif // CUDA_VERSION < 9000
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
#endif // !defined(__CUDACC__) || __CUDACC__ >= 300
#endif // INCLUDE_PARROTS_DARRAY_CUDAWARPFUNCTION_CUH_
......@@ -42,9 +42,9 @@ __device__ __forceinline__ static void reduceAdd(double *address, double val) {
atomicAdd(address, val);
}
#else
#ifdef __CUDA_ARCH__
#ifdef __CUDACC__
__device__ __forceinline__ static void reduceAdd(float *address, float val) {
#if (__CUDA_ARCH__ < 200)
#if (__CUDACC__ < 200)
#ifdef _MSC_VER
#pragma message( \
"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) {
}
__device__ __forceinline__ static void reduceAdd(double *address, double val) {
#if (__CUDA_ARCH__ < 600)
#if (__CUDACC__ < 600)
#ifdef _MSC_VER
#pragma message( \
"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) {
atomicAdd(address, val);
#endif
}
#endif // __CUDA_ARCH__
#endif // __CUDACC__
#endif // MMCV_WITH_HIP
template <typename T>
......
......@@ -60,7 +60,7 @@ using phalf = float16;
}()
/** atomicAdd **/
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600
#if defined(__CUDACC__) && __CUDACC__ < 600
static __inline__ __device__ double atomicAdd(double* address, double val) {
unsigned long long int* address_as_ull = (unsigned long long int*)address;
......
......@@ -18,12 +18,12 @@
#ifndef 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/OpAdapter.h>
#include "pytorch_cpp_helper.hpp"
#include "pytorch_device_registry.hpp"
#include "pytorch_npu_util.hpp"
#define NPU_NAME_SPACE at_npu::native
......
This diff is collapsed.
......@@ -562,7 +562,7 @@ struct TensorView {
}
TV_HOST_DEVICE_INLINE scalar_t &operator()() {
#if defined TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mPtr != nullptr,
"you want get value but the view is empty.%s", "\n");
TV_DEVICE_REQUIRE(mShape.ndim() == 0,
......@@ -578,7 +578,7 @@ struct TensorView {
}
TV_HOST_DEVICE_INLINE const scalar_t &operator()() const {
#if defined TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mPtr != nullptr,
"you want get value but the view is empty.%s", "\n");
TV_DEVICE_REQUIRE(mShape.ndim() == 0,
......@@ -596,7 +596,7 @@ struct TensorView {
template <class T1>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1) {
#if defined TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 1,
"you provide 1 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -613,7 +613,7 @@ struct TensorView {
template <class T1, class T2>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2) {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 2,
"you provide 2 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -636,7 +636,7 @@ struct TensorView {
template <class T1, class T2, class T3>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3) {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 3,
"you provide 3 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -664,7 +664,7 @@ struct TensorView {
template <class T1, class T2, class T3, class T4>
TV_HOST_DEVICE_INLINE scalar_t &operator()(T1 i1, T2 i2, T3 i3, T4 i4) {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 4,
"you provide 4 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -698,7 +698,7 @@ struct TensorView {
template <class T1>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1) const {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 1,
"you provide 1 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -716,7 +716,7 @@ struct TensorView {
template <class T1, class T2>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2) const {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 2,
"you provide 2 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -740,7 +740,7 @@ struct TensorView {
template <class T1, class T2, class T3>
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3) const {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 3,
"you provide 3 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -769,7 +769,7 @@ struct TensorView {
TV_HOST_DEVICE_INLINE const scalar_t &operator()(T1 i1, T2 i2, T3 i3,
T4 i4) const {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(mShape.ndim() == 4,
"you provide 4 indexes, but dim is %ld\n", mShape.ndim());
TV_DEVICE_REQUIRE(i1 >= 0 && i1 < mShape[0],
......@@ -802,7 +802,7 @@ struct TensorView {
TV_HOST_DEVICE_INLINE scalar_t &operator[](int idx) {
#ifdef TV_DEBUG
#if defined(__CUDA_ARCH__)
#if defined(__CUDACC__)
TV_DEVICE_REQUIRE(idx >= 0 && idx < size(),
"index(%d) out-of-range: [0, %ld)\n", int(idx), size());
#else
......
......@@ -4,7 +4,7 @@
// Disable fp16 on ROCm device
#ifndef MMCV_WITH_HIP
#if __CUDA_ARCH__ >= 530
#if __CUDACC__ >= 530
template <>
__global__ void bbox_overlaps_cuda_kernel<at::Half>(
const at::Half* bbox1, const at::Half* bbox2, at::Half* ious,
......@@ -16,7 +16,7 @@ __global__ void bbox_overlaps_cuda_kernel<at::Half>(
num_bbox2, mode, aligned, offset);
}
#endif // __CUDA_ARCH__ >= 530
#endif // __CUDACC__ >= 530
#endif // MMCV_WITH_HIP
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