Skip to content

Commit c8be3d8

Browse files
committed
style: code cleanup
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent 62ab3e8 commit c8be3d8

File tree

7 files changed

+10
-14
lines changed

7 files changed

+10
-14
lines changed

models/llama/common-cpu/src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ use operators::{
1212
Blob, ByteOf, QueueOf, TopoNode,
1313
};
1414
use std::{
15-
cell::Ref,
16-
ops::Range,
17-
slice::{from_raw_parts, from_raw_parts_mut},
18-
};
19-
use std::{
20-
cell::RefCell,
15+
cell::{Ref, RefCell},
2116
marker::PhantomData,
2217
mem::size_of,
23-
ops::{Deref, RangeBounds},
18+
ops::{Deref, Range, RangeBounds},
19+
slice::{from_raw_parts, from_raw_parts_mut},
2420
};
2521

2622
pub struct Operators<N = Cpu, R = NonAllReduce<Cpu, Rearrange>>(PhantomData<(N, R)>);

models/llama/infini/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use build_script_cfg::Cfg;
33
use search_infini_tools::find_infini_rt;
44

5-
let cfg = Cfg::new("src_detected");
5+
let cfg = Cfg::new("detected");
66
if find_infini_rt().is_some() {
77
cfg.define();
88
}

models/llama/infini/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(src_detected)]
1+
#![cfg(detected)]
22

33
use llama::{BlkWeight, Contiguous, LlamaBlkStorage, LlamaStorage, Tensor, WeightLoader};
44
use operators::{

models/llama/nvidia-gpu/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
use build_script_cfg::Cfg;
33
use search_cuda_tools::{find_cuda_root, find_nccl_root};
44

5-
let cfg = Cfg::new("hw_detected");
5+
let driver = Cfg::new("driver_detected");
66
let nccl = Cfg::new("nccl_detected");
77
if find_cuda_root().is_some() {
8-
cfg.define();
8+
driver.define();
99
if find_nccl_root().is_some() {
1010
nccl.define();
1111
}

models/llama/nvidia-gpu/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(hw_detected)]
1+
#![cfg(driver_detected)]
22

33
use llama::{BlkWeight, Contiguous, LlamaBlkStorage, LlamaStorage, Tensor, WeightLoader};
44
use operators::{

models/llama/opencl/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use build_script_cfg::Cfg;
33
use search_cl_tools::find_opencl;
44

5-
let cfg = Cfg::new("hw_detected");
5+
let cfg = Cfg::new("detected");
66
if find_opencl().is_some() {
77
cfg.define();
88
}

models/llama/opencl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(hw_detected)]
1+
#![cfg(detected)]
22

33
use llama::{BlkWeight, Contiguous, LlamaStorage, Tensor, WeightLoader};
44
use operators::{

0 commit comments

Comments
 (0)