Skip to content

Commit 11f260d

Browse files
committed
build(tensor): 使用发布版 ndarray-layout
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent 2f894fa commit 11f260d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ causal-lm.path = "causal-lm"
2424
test-utils = { path = "test-utils", default-features = false }
2525

2626
ggus = "0.3"
27+
ndarray-layout = "0.0"
2728
itertools = "0.13"
2829
regex = "1.11"
2930
env_logger = "0.11"
3031
build-script-cfg = "0.0"
3132

32-
ndarray-layout = { git = "https://github.com/YdrMaster/ndarray-layout", rev = "f1fdd24" }
3333
operators = { git = "https://github.com/YdrMaster/operators-rs", rev = "b9e6fdd", default-features = false }
34-
3534
search-cl-tools = { git = "https://github.com/InfiniTensor/clrt", rev = "6846d52" }
3635
search-infini-tools = { git = "https://github.com/InfiniTensor/infini-rt", rev = "136c30b" }
3736
search-cuda-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "e2ec203" }

tensor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<T> Tensor<T> {
188188
// 所有维度可以合并成一个
189189
.merge(0..self.layout.ndim())
190190
// 合并后元素之间步长等于元素的长度
191-
.map_or(false, |layout| {
191+
.is_some_and(|layout| {
192192
let [s] = layout.strides() else {
193193
unreachable!()
194194
};

0 commit comments

Comments
 (0)