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
jerrrrry
infinicore
Commits
576c3871
Commit
576c3871
authored
Apr 23, 2025
by
YdrMaster
Browse files
issue/189/docs: update README.md
Signed-off-by:
YdrMaster
<
ydrml@hotmail.com
>
parent
439ba32f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
16 deletions
+46
-16
README.md
README.md
+46
-16
No files found.
README.md
View file @
576c3871
# InfiniCore
# InfiniCore
[

](https://github.com/InfiniTensor/InfiniCore-Documentation)
[

](https://github.com/InfiniTensor/InfiniCore/actions)
[

](https://mit-license.org/)


[

](https://github.com/InfiniTensor/InfiniCore/issues)
[

](https://github.com/InfiniTensor/InfiniCore/pulls)


文档
InfiniCore 是一个跨平台统一编程工具集,为不同芯片平台的功能(包括计算、运行时、通信等)提供统一 C 语言接口。目前支持的硬件和后端包括:
InfiniCore 是一个跨平台统一编程工具集,为不同芯片平台的功能(包括计算、运行时、通信等)提供统一 C 语言接口。目前支持的硬件和后端包括:
-
CPU;
-
CPU;
...
@@ -15,22 +28,6 @@ InfiniCore 是一个跨平台统一编程工具集,为不同芯片平台的功
...
@@ -15,22 +28,6 @@ InfiniCore 是一个跨平台统一编程工具集,为不同芯片平台的功
## 配置和使用
## 配置和使用
### 软件依赖
-
XMake编译器
XMake配置选项(
`XMAKE_CONFIG_FLAGS`
)以及含义
-
`--omp=[y|n]`
是否使用OpenMP,默认开启
-
`--cpu=[y|n]`
是否编译CPU接口实现,默认开启
-
`--nv-gpu=[y|n]`
是否编译英伟达GPU接口实现
-
`--ascend-npu=[y|n]`
是否编译昇腾NPU接口实现
-
`--cambricon-mlu=[y|n]`
是否编译寒武纪MLU接口实现
-
`--metax-gpu=[y|n]`
是否编译沐曦GPU接口实现
-
`--moore-gpu=[y|n]`
是否编译摩尔线程GPU接口实现
-
`--sugon-dcu=[y|n]`
是否编译曙光DCU接口实现
-
`--kunlun-xpu=[y|n]`
是否编译昆仑XPU接口实现
### 一键安装
### 一键安装
在
`script/`
目录中提供了
`install.py`
安装脚本。使用方式如下:
在
`script/`
目录中提供了
`install.py`
安装脚本。使用方式如下:
...
@@ -41,6 +38,20 @@ cd InfiniCore
...
@@ -41,6 +38,20 @@ cd InfiniCore
python scripts/install.py
[
XMAKE_CONFIG_FLAGS]
python scripts/install.py
[
XMAKE_CONFIG_FLAGS]
```
```
参数
`XMAKE_CONFIG_FLAGS`
是 xmake 构建配置,可配置下列可选项:
| 选项 | 功能 | 默认值
|--------------------------|-------------------------------|:-:
|
`--omp=[y\|n]`
| 是否使用 OpenMP | y
|
`--cpu=[y\|n]`
| 是否编译 CPU 接口实现 | y
|
`--nv-gpu=[y\|n]`
| 是否编译英伟达 GPU 接口实现 | n
|
`--ascend-npu=[y\|n]`
| 是否编译昇腾 NPU 接口实现 | n
|
`--cambricon-mlu=[y\|n]`
| 是否编译寒武纪 MLU 接口实现 | n
|
`--metax-gpu=[y\|n]`
| 是否编译沐曦 GPU 接口实现 | n
|
`--moore-gpu=[y\|n]`
| 是否编译摩尔线程 GPU 接口实现 | n
|
`--sugon-dcu=[y\|n]`
| 是否编译曙光 DCU 接口实现 | n
|
`--kunlun-xpu=[y\|n]`
| 是否编译昆仑 XPU 接口实现 | n
### 手动安装
### 手动安装
1.
项目配置
1.
项目配置
...
@@ -137,3 +148,22 @@ options:
...
@@ -137,3 +148,22 @@ options:
-
若设置
`--check`
,将检查代码是否需要修改格式,不修改文件内容;
-
若设置
`--check`
,将检查代码是否需要修改格式,不修改文件内容;
-
通过
`--c`
指定 c/c++ 格式化器,默认为
`clang-format-16`
;
-
通过
`--c`
指定 c/c++ 格式化器,默认为
`clang-format-16`
;
-
通过
`--python`
指定 python 格式化器
`black`
;
-
通过
`--python`
指定 python 格式化器
`black`
;
### vscode 开发配置
基本配置见
[
xmake 官方文档
](
https://xmake.io/#/zh-cn/plugin/more_plugins?id=%e9%85%8d%e7%bd%ae-intellsence
)
。
-
TL;DR
-
clangd
打开 *xmake.lua*,保存一次以触发编译命令生成,将在工作路径下自动生成 *.vscode/compile_commands.json* 文件。然后在这个文件夹下创建 *settings.json*,填入:
> .vscode/settings.json
```json
{
"clangd.arguments": [
"--compile-commands-dir=.vscode"
]
}
```
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