Skip to content

Commit f7860f6

Browse files
committed
build(llama-infini): 更新算子库和 infini-toolkit
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent 11f260d commit f7860f6

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ regex = "1.11"
3030
env_logger = "0.11"
3131
build-script-cfg = "0.0"
3232

33-
operators = { git = "https://github.com/YdrMaster/operators-rs", rev = "b9e6fdd", default-features = false }
33+
operators = { git = "https://github.com/YdrMaster/operators-rs", rev = "7aa1051", default-features = false }
3434
search-cl-tools = { git = "https://github.com/InfiniTensor/clrt", rev = "6846d52" }
35-
search-infini-tools = { git = "https://github.com/InfiniTensor/infini-rt", rev = "136c30b" }
35+
search-infini-tools = { git = "https://github.com/InfiniTensor/infini-toolkit", rev = "9943c78" }
3636
search-cuda-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "e2ec203" }

models/llama/infini/src/infer.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
use gguf::GGufModel;
33
use llama::{ext::ggml_quants::f16, LlamaRequest, LlamaStorage, LlamaWorker, Tensor};
44
use operators::{
5-
infini_rt::{self, Device, DeviceType::DEVICE_CPU},
5+
infini::Device,
6+
infini_rt::{self, DeviceType::DEVICE_CPU},
67
random_sample::{KVPair, SampleArgs},
78
TopoNode,
89
};
@@ -59,12 +60,7 @@ fn test_infer() {
5960
println!("distribution: {devices:?}");
6061

6162
infini_rt::init(DEVICE_CPU);
62-
let (seeds, senders) = WorkerSeed::new(
63-
devices
64-
.into_iter()
65-
.map(|id| Device { ty: DEVICE_CPU, id })
66-
.collect(),
67-
);
63+
let (seeds, senders) = WorkerSeed::new(devices.into_iter().map(|_| Device::cpu()).collect());
6864
thread::scope(|s| {
6965
let _workers = zip(lens, seeds)
7066
.enumerate()

models/llama/infini/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
use llama::{BlkWeight, Contiguous, LlamaBlkStorage, LlamaStorage, Tensor, WeightLoader};
44
use operators::{
55
all_reduce::{AllReduce, NonAllReduce},
6-
infini_rt::{DevBlob, DevByte, Device, Event, HostBlob, Stream},
6+
infini::Device,
7+
infini_rt::{DevBlob, DevByte, Event, HostBlob, Stream},
78
random_sample::infini::Operator as RandomSampleNpu,
89
rearrange::infini::Operator as Rearrange,
910
ByteOf, QueueOf, TopoNode,

0 commit comments

Comments
 (0)