Skip to content

Commit ccf165a

Browse files
committed
refactor: nv 改为 cuda
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent 72fa93b commit ccf165a

File tree

8 files changed

+9
-4
lines changed

8 files changed

+9
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ members = [
99
"models/llama/common-cpu",
1010
"models/llama/opencl",
1111
"models/llama/infini",
12-
"models/llama/nvidia-gpu",
12+
"models/llama/cuda",
1313

1414
"models/clip/common",
1515
"models/clip/common-cpu",

docs/user-guide/doc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,6 @@ cargo test --release --package `model` --lib -- `test` --exact --nocapture
166166
| `llama-cpu` | `infer::test_infer` | 默认值“1”。任意间隔的正整数数组,表示每个线程分布模型的份数,数组的项数必须是 2 的幂 | 纯 cpu 后端,不需要任何额外依赖
167167
| `llama-infini` | `infer::test_infer` | 默认值“cpu;0”。格式“硬件类型; 卡号”,硬件类型目前支持 `cpu``nv``ascend` | 九源统一软件栈后端
168168
| `llama-cl` | `infer::test_infer` | TODO | OpenCL 后端
169-
| `llama-nv` | `infer::test_infer` | 默认值“0”。单个非负整数,推理使用的卡号 | 原生 CUDA Toolkit 后端
170-
| `llama-nv` | `nccl_parallel::test_infer` | 默认值“0”。任意间隔的非负整数集合,参与分布式推理的卡号 | 原生 CUDA Toolkit 后端,同时依赖 NCCL 实现分布式
169+
| `llama-cuda` | `infer::test_infer` | 默认值“0”。单个非负整数,推理使用的卡号 | 原生 CUDA Toolkit 后端
170+
| `llama-cuda` | `nccl_parallel::test_infer` | 默认值“0”。任意间隔的非负整数集合,参与分布式推理的卡号 | 原生 CUDA Toolkit 后端,同时依赖 NCCL 实现分布式
171171
| `gpt2-cpu` | `infer::test_infer` | TODO | 纯 cpu 后端,不需要任何额外依赖
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "llama-nv"
2+
name = "llama-cuda"
33
version = "0.0.0"
44
edition = "2021"
55
authors = ["YdrMaster <ydrml@hotmail.com>"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ impl<'blk> Weights<'blk> {
197197
push! {
198198
attn_norm
199199
attn_qkv
200+
attn_qkv_bias
200201
attn_o
201202
ffn_norm
202203
ffn_gate_up
File renamed without changes.

models/llama/infini/src/infer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ fn test_infer() {
7272
infini_rt::init(infini_rt::DEVICE_NVIDIA);
7373
WorkerSeed::new(InfiniNode::nv_gpu(&indices))
7474
}
75+
"cambricon" => {
76+
infini_rt::init(infini_rt::DEVICE_CAMBRICON);
77+
WorkerSeed::new(InfiniNode::cambricon_mlu(&indices))
78+
}
7579
"ascend" => {
7680
infini_rt::init(infini_rt::DEVICE_ASCEND);
7781
WorkerSeed::new(InfiniNode::ascend_npu(&indices))

0 commit comments

Comments
 (0)