Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
fastpt
Commits
7c94ed18
Commit
7c94ed18
authored
Nov 05, 2025
by
sangwzh
Browse files
[das] update to das1.7
parent
100331d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
39 deletions
+40
-39
README.md
README.md
+40
-39
No files found.
README.md
View file @
7c94ed18
# 1 FastPT简介
# 1 FastPT简介
FastPT是基于python的应用编译工具,借助FastPT,开发人员可以在HCU上开发、部署基于pytorch的内含CUDA代码的应用。可以实现CUDA源码不转码直接编译,或源码转换到HIP格式代码后,通过hipcc适配编译。推荐优先使用不转码编译方式。转码适配方式功能受限,可能需要手动处理较多的内容。
FastPT是基于python的应用编译工具,借助FastPT,开发人员可以在HCU上开发、部署基于pytorch的内含CUDA代码的应用。可以实现CUDA源码不转码直接编译,或源码转换到HIP格式代码后,通过hipcc适配编译。
**
推荐优先使用不转码编译方式
**
。转码适配方式功能受限,可能需要手动处理较多的内容。
FastPT版本与torch版本对应关系
为
:
FastPT版本与torch版本对应关系
如下,其中x为小版本号
:
| | FastPT版本 | torch版本 | DTK版本 |
| | FastPT版本 | torch版本 | DTK版本 |
| - | ----------------- | --------- | ------- |
| - | ------------------ | --------- | ------------------ |
| 1 | 2.1.0+das.dtk2504 | v2.5.1 | dtk2504 |
| 1 | 2.2.x+das.dtk2504x | v2.7.1 | dtk25042 |
| 2 | 2.0.1+das.dtk2504 | v2.4.1 | dtk2504 |
| 1 | 2.1.x+das.dtk2504x | v2.5.1 | dtk25041, dtk25042 |
| 2 | 2.0.x+das.dtk2504x | v2.4.1 | dtk25041, dtk2504 |
注:
注:
...
@@ -31,7 +32,7 @@ python -c "import fastpt;print(fastpt.__version__)"
...
@@ -31,7 +32,7 @@ python -c "import fastpt;print(fastpt.__version__)"
# 3 使用
# 3 使用
推
荐使用不转码编译方式,可参考下面的表格以及3.1章节的内容。
**
荐使用不转码编译方式,可参考下面的表格以及3.1章节的内容。
**
工具安装后,
**首先通过指令 which fastpt 来获取 fastpt 的安装路径(下面以 /usr/local/bin/fastpt 路径进行说明)**
。在构建编译或使用时,通过source /usr/local/bin/fastpt -X 进行环境设置。X为模式设置参数,具体参数说明如下:
工具安装后,
**首先通过指令 which fastpt 来获取 fastpt 的安装路径(下面以 /usr/local/bin/fastpt 路径进行说明)**
。在构建编译或使用时,通过source /usr/local/bin/fastpt -X 进行环境设置。X为模式设置参数,具体参数说明如下:
| 使用场景 | 指令 | 示例 | 说明 |
| 使用场景 | 指令 | 示例 | 说明 |
...
@@ -103,7 +104,7 @@ pip install torch_scatter-2.1.0-cp310-cp310-linux_x86_64.whl
...
@@ -103,7 +104,7 @@ pip install torch_scatter-2.1.0-cp310-cp310-linux_x86_64.whl
*
执行模式:
*
执行模式:
whl包安装完成后,为测试编译的组件是否可用,执行下面的命令进入执行模式
:
whl包安装完成后,为测试编译的组件是否可用,执行下面的命令进入执行模式
。
```
```
source /usr/local/bin/fastpt -E
source /usr/local/bin/fastpt -E
...
@@ -164,7 +165,7 @@ __device__ __forceinline__ static void reduceAdd(float *address, float val) {
...
@@ -164,7 +165,7 @@ __device__ __forceinline__ static void reduceAdd(float *address, float val) {
#endif // __CUDA_ARCH__
#endif // __CUDA_ARCH__
```
```
(4) 编译模式(-C)与执行模式(-E)下,torch.version.cuda与torch.version.hip会分别被设置,少部分应用在执行时会依赖这两个变量,需要根据具体情况在应用端调整上述两个变量。
(4) 编译模式(-C)与执行模式(-E)下,torch.version.cuda与torch.version.hip会分别被设置,少部分应用在执行时会依赖这两个变量,需要根据具体情况在应用端调整上述两个变量。
另外,建议编译完成之后,新开一个终端进行使用或测试。
(5) 编译时遇到
`fatal error: #include_next <math.h>`
的报错,可以降低CMake版本为3.19处理。
(5) 编译时遇到
`fatal error: #include_next <math.h>`
的报错,可以降低CMake版本为3.19处理。
...
@@ -247,38 +248,38 @@ python fastptcode.py
...
@@ -247,38 +248,38 @@ python fastptcode.py
(5)当不希望引入ATen/dtk_macros.h这个头文件时,可以通过以方式屏蔽此头文件的引入:export FASTPT_DTK_MACROS=1。
(5)当不希望引入ATen/dtk_macros.h这个头文件时,可以通过以方式屏蔽此头文件的引入:export FASTPT_DTK_MACROS=1。
# 4 已支持组件列表
# 4 已支持组件列表
在 OpenDAS 仓库中,分支名带有 fastpt 后缀的组件支持 FastPT 不转码编译,具体如下:
在 OpenDAS 仓库中,分支名带有 fastpt 后缀的组件支持 FastPT 不转码编译,具体如下:
| 组件名称 | 版本及分支 | DAS仓库 | 已验证的FastPT版本 |
| 组件名称 | 版本及分支 | DAS仓库 | 已验证的FastPT版本 |
| :-----------------: | :--------------------: | ------------------------------------------------------------------ | --------------- |
| :-----------------: | :--------------------
------
: | ------------------------------------------------------------------ | ---------------
---
|
| audio |
v2.4.1-fastpt; v2.5.1-fastpt
| https://developer.sourcefind.cn/codes/OpenDAS/torchaudio |2.0.1;2.1.0 |
| audio | v2.4.1-fastpt; v2.5.1-fastpt | https://developer.sourcefind.cn/codes/OpenDAS/torchaudio |
2.0.1;2.1.0
|
| vision | v0.19.1-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/vision.git |2.0.1;2.1.0 |
| vision |
v0.19.1-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/vision.git |
2.0.1;2.1.0
|
| mmcv | v2.1.0-fastpt; v2.2.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/mmcv.git | 2.0.1;2.1.0 |
| mmcv | v2.1.0-fastpt; v2.2.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/mmcv.git | 2.0.1;2.1.0 |
| pytorch3d | V0.7.8-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/pytorch3d.git |2.0.1;2.1.0 |
| pytorch3d |
V0.7.8-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/pytorch3d.git |
2.0.1;2.1.0
|
| maskrcnn | v0.1-fastpt | https://developer.sourcefind.cn/codes/OpenDAS/maskrcnn | 2.0.1;2.1.0 |
| maskrcnn | v0.1-fastpt | https://developer.sourcefind.cn/codes/OpenDAS/maskrcnn | 2.0.1;2.1.0 |
| mmdetection3d | v1.4.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/mmdetection3d.git | 2.0.1;2.1.0 |
| mmdetection3d | v1.4.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/mmdetection3d.git | 2.0.1;2.1.0 |
| opencv-python | 4.8.0 | http://developer.sourcefind.cn/codes/OpenDAS/opencv-python.git | |
| opencv-python | 4.8.0 | http://developer.sourcefind.cn/codes/OpenDAS/opencv-python.git | |
| pytorch_sparse | 0.6.16-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torch-sparce.git |2.0.1;2.1.0 |
| pytorch_sparse |
0.6.16-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/torch-sparce.git |
2.0.1;2.1.0
|
| pytorch_scatter | 2.1.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torch-scatter.git |2.0.1;2.1.0 |
| pytorch_scatter |
2.1.0-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/torch-scatter.git |
2.0.1;2.1.0
|
| pytorch_cluster | 1.6.3-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torch-scatter.git |2.0.1;2.1.0 |
| pytorch_cluster |
1.6.3-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/torch-scatter.git |
2.0.1;2.1.0
|
| pytorch_spline_conv | 1.2.2-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torch-spline-conv.git |2.0.1;2.1.0 |
| pytorch_spline_conv |
1.2.2-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/torch-spline-conv.git |
2.0.1;2.1.0
|
| torchnai | v2.2.4-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torchani.git | 2.0.1;2.1.0 |
| torchnai | v2.2.4-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/torchani.git | 2.0.1;2.1.0 |
| apex | 24.04.1-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/apex.git |2.0.1;2.1.0 |
| apex |
24.04.1-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/apex.git |
2.0.1;2.1.0
|
| fastmoe | v1.1.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/fastmoe.git | 2.0.1;2.1.0 |
| fastmoe | v1.1.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/fastmoe.git | 2.0.1;2.1.0 |
| lietorch | v0.3-fastpt | https://developer.sourcefind.cn/codes/OpenDAS/lietorch | 2.0.1;2.1.0 |
| lietorch | v0.3-fastpt | https://developer.sourcefind.cn/codes/OpenDAS/lietorch | 2.0.1;2.1.0 |
| uni-core | v0.0.1-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/Uni-Core.git |2.0.1;2.1.0 |
| uni-core |
v0.0.1-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/Uni-Core.git |
2.0.1;2.1.0
|
| OpenPCDet | v0.6.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/openpcdet.git |2.0.1;2.1.0 |
| OpenPCDet |
v0.6.0-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/openpcdet.git |
2.0.1;2.1.0
|
| SparseConvNet | v0.2-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/sparseconvnet.git |2.0.1;2.1.0 |
| SparseConvNet |
v0.2-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/sparseconvnet.git |
2.0.1;2.1.0
|
| detectron2 | v0.6-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/detectron2.git |2.0.1;2.1.0 |
| detectron2 |
v0.6-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/detectron2.git |
2.0.1;2.1.0
|
| fairscale | v0.4.9-fastpt、v0.4.3-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/fairscale.git | 2.0.1;2.1.0 |
| fairscale | v0.4.9-fastpt、v0.4.3-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/fairscale.git | 2.0.1;2.1.0 |
| fairseq |
v0.9.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/fairseq.git |2.0.1;2.1.0 |
| fairseq | v0.9.0-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/fairseq.git |
2.0.1;2.1.0
|
| metaseq | main-f7ffa5fd-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/metaseq.git | 2.0.1;2.1.0 |
| metaseq | main-f7ffa5fd-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/metaseq.git | 2.0.1;2.1.0 |
| pydensecrf | master-2723c7fa-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/pydensecrf.git | 2.0.1;2.1.0 |
| pydensecrf | master-2723c7fa-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/pydensecrf.git | 2.0.1;2.1.0 |
| d2go | mian-f4ac1567-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/d2go.git |2.0.1;2.1.0 |
| d2go |
mian-f4ac1567-fastpt
| http://developer.sourcefind.cn/codes/OpenDAS/d2go.git |
2.0.1;2.1.0
|
| dlib | v19.24-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/dlib.git | 2.0.1;2.1.0 |
| dlib | v19.24-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/dlib.git | 2.0.1;2.1.0 |
| causal_conv1d | v1.5.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/causal-conv1d.git |2.0.1;2.1.0 |
| causal_conv1d | v1.5.0-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/causal-conv1d.git | 2.0.1;2.1.0 |
| cubvh | main-ee89d5fa-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/cubvh.git |2.0.1;2.1.0 |
| cubvh | main-ee89d5fa-fastpt | http://developer.sourcefind.cn/codes/OpenDAS/cubvh.git | 2.0.1;2.1.0 |
# 5 附录
# 5 附录
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment