Skip to content

Commit 8c63384

Browse files
authoredFeb 23, 2024
Merge pull request #254 from caseylai/master
Add support for Huawei Ascend NPU
2 parents e86438b + 5019693 commit 8c63384

File tree

7 files changed

+747
-2
lines changed

7 files changed

+747
-2
lines changed
 

Diff for: ‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
build/
44
cmake-build*/
55
.vscode
6+
.idea

Diff for: ‎CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ if(APPLE)
6868
set(MSM_SUPPORT_DEFAULT OFF)
6969
set(PANFROST_SUPPORT_DEFAULT OFF)
7070
set(PANTHOR_SUPPORT_DEFAULT OFF)
71+
set(ASCEND_SUPPORT_DEFAULT OFF)
72+
elseif(ASCEND_SUPPORT)
73+
set(APPLE_SUPPORT_DEFAULT OFF)
74+
set(NVIDIA_SUPPORT_DEFAULT OFF)
75+
set(AMDGPU_SUPPORT_DEFAULT OFF)
76+
set(INTEL_SUPPORT_DEFAULT OFF)
77+
set(MSM_SUPPORT_DEFAULT OFF)
78+
set(PANFROST_SUPPORT_DEFAULT OFF)
79+
set(PANTHOR_SUPPORT_DEFAULT OFF)
80+
set(ASCEND_SUPPORT_DEFAULT ON)
7181
else()
7282
set(APPLE_SUPPORT_DEFAULT OFF)
7383
set(NVIDIA_SUPPORT_DEFAULT ON)
@@ -76,6 +86,7 @@ else()
7686
set(MSM_SUPPORT_DEFAULT ON)
7787
set(PANFROST_SUPPORT_DEFAULT ON)
7888
set(PANTHOR_SUPPORT_DEFAULT ON)
89+
set(ASCEND_SUPPORT_DEFAULT OFF)
7990
endif()
8091

8192
option(NVIDIA_SUPPORT "Build support for NVIDIA GPUs through libnvml" ${NVIDIA_SUPPORT_DEFAULT})
@@ -85,6 +96,7 @@ option(MSM_SUPPORT "Build support for Adreno GPUs through msm driver" ${MSM_SUPP
8596
option(APPLE_SUPPORT "Build support for Apple GPUs through Metal" ${APPLE_SUPPORT_DEFAULT})
8697
option(PANFROST_SUPPORT "Build support for Mali GPUs through panfrost driver" ${PANFROST_SUPPORT_DEFAULT})
8798
option(PANTHOR_SUPPORT "Build support for Mali GPUs through panthor driver" ${PANTHOR_SUPPORT_DEFAULT})
99+
option(ASCEND_SUPPORT "Build support for Ascend NPUs through Ascend DCMI" ${ASCEND_SUPPORT_DEFAULT})
88100

89101
add_subdirectory(src)
90102

Diff for: ‎README.markdown

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Table of Contents
2525
- [NVIDIA](#nvidia)
2626
- [Adreno](#adreno)
2727
- [Apple](#apple)
28+
- [Ascend](#ascend) (only tested on 910B)
2829
- [Build](#build)
2930
- [Distribution Specific Installation Process](#distribution-specific-installation-process)
3031
- [Ubuntu / Debian](#ubuntu--debian)
@@ -120,6 +121,12 @@ NVTOP includes some initial support for Apple using Metal. This is only supporte
120121
**APPLE SUPPORT STATUS**
121122
- Apple support is still being worked on. Some bugs and limitations may apply.
122123

124+
### Ascend
125+
126+
NVTOP supports Ascend (testing on Altas 800 (910B)) by DCMI API (version 6.0.0).
127+
128+
Currently, the DCMI only supports limited APIs, missing PCIe generation, tx/rx throughput info, max power draw etc.
129+
123130
Build
124131
-----
125132

0 commit comments

Comments
 (0)