Skip to content

Commit 15a97de

Browse files
committed
fmt/fix
1 parent e0f0ed0 commit 15a97de

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

crates/burn-fusion/src/ops/float.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ use crate::{
88
unary_float_ops,
99
};
1010
use burn_ir::{
11-
BackendIr, BaseOperationIr, BinaryOpIr, CatOpIr, ClampOpIr, ExpandOpIr, FlipOpIr,
12-
FloatOperationIr, GatherOpIr, HandleContainer, InitOperationIr, MaskFillOpIr, MaskWhereOpIr,
13-
NumericOperationIr, OperationIr, PermuteOpIr, RandomOpIr, ReduceDimOpIr,
14-
ReduceDimWithIndicesOpIr, RepeatDimOpIr, ScalarOpIr, ScatterOpIr, SelectAssignOpIr, SelectOpIr,
15-
SliceAssignOpIr, SliceOpIr, SwapDimsOpIr, TensorIr, UnaryOpIr,
11+
BaseOperationIr, BinaryOpIr, CatOpIr, ClampOpIr, ExpandOpIr, FlipOpIr, FloatOperationIr,
12+
GatherOpIr, HandleContainer, InitOperationIr, MaskFillOpIr, MaskWhereOpIr, NumericOperationIr,
13+
OperationIr, PermuteOpIr, RandomOpIr, ReduceDimOpIr, ReduceDimWithIndicesOpIr, RepeatDimOpIr,
14+
ScalarOpIr, ScatterOpIr, SelectAssignOpIr, SelectOpIr, SliceAssignOpIr, SliceOpIr,
15+
SwapDimsOpIr, TensorIr, UnaryOpIr,
1616
};
1717
use burn_tensor::{
1818
Device, Distribution, Element, ElementConversion, Shape, TensorData, TensorMetadata,

crates/burn-fusion/src/ops/int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{
66
unary_int_ops,
77
};
88
use burn_ir::{
9-
BackendIr, BaseOperationIr, BinaryOpIr, CatOpIr, ClampOpIr, ExpandOpIr, FlipOpIr, GatherOpIr,
9+
BaseOperationIr, BinaryOpIr, CatOpIr, ClampOpIr, ExpandOpIr, FlipOpIr, GatherOpIr,
1010
HandleContainer, InitOperationIr, IntOperationIr, MaskFillOpIr, MaskWhereOpIr,
1111
NumericOperationIr, OperationIr, PermuteOpIr, RandomOpIr, ReduceDimOpIr,
1212
ReduceDimWithIndicesOpIr, RepeatDimOpIr, ScalarOpIr, ScatterOpIr, SelectAssignOpIr, SelectOpIr,

crates/burn-ndarray/src/ops/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ impl<E: FloatNdArrayElement, I: IntNdArrayElement, Q: QuantElement> ModuleOps<Se
109109
x.into(),
110110
offset.into(),
111111
weight.into(),
112-
mask.map(std::convert::Into::into),
113-
bias.map(std::convert::Into::into),
112+
mask.map(Into::into),
113+
bias.map(Into::into),
114114
)
115115
}
116116
)

crates/burn-ndarray/src/ops/simd/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ mod elemwise {
230230
use macerator::vload;
231231

232232
use super::{
233-
ArrayD, NdArrayElement, NdArrayTensor, PhantomData, Scalar, Simd, SimdCmpOp,
234-
TensorMetadata, Vector, is_accelerated, seq, should_use_simd, vload_unaligned,
233+
ArrayD, NdArrayElement, NdArrayTensor, PhantomData, Scalar, Simd, SimdCmpOp, Vector,
234+
is_accelerated, seq, should_use_simd, vload_unaligned,
235235
};
236236

237237
pub fn try_cmp_scalar_simd<E: NdArrayElement, T: NdArrayElement + Scalar, Op: SimdCmpOp<T>>(

crates/onnx-ir/src/node/pad.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn pad_config(node: &Node) -> PadConfig {
9595

9696
for (index, &item) in pads.iter().enumerate() {
9797
assert!(
98-
!(!index_list.contains(&index) && item != 0),
98+
index_list.contains(&index) || item == 0,
9999
"Pad: padding will only be applied to the last two dimensions but found non zero padding for other dimensions"
100100
);
101101
}

crates/onnx-ir/src/node/reduce_max.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn reduce_max_config(node: &Node) -> Option<usize> {
3232

3333
// Not supported in Burn
3434
assert!(
35-
!(!axes.is_empty() && keepdims == 0),
35+
axes.is_empty() || keepdims != 0,
3636
"ReduceMax: the reduce operation must preserve the reduced dimension"
3737
);
3838

crates/onnx-ir/src/node/reduce_mean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn reduce_mean_config(node: &Node) -> Option<usize> {
3232

3333
// Not supported in Burn
3434
assert!(
35-
!(!axes.is_empty() && keepdims == 0),
35+
axes.is_empty() || keepdims != 0,
3636
"ReduceMean: the reduce operation must preserve the reduced dimension"
3737
);
3838

crates/onnx-ir/src/node/reduce_min.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn reduce_min_config(node: &Node) -> Option<usize> {
3131
);
3232

3333
assert!(
34-
!(!axes.is_empty() && keepdims == 0),
34+
axes.is_empty() || keepdims != 0,
3535
"ReduceMin: the reduce operation must preserve the reduced dimension"
3636
);
3737

crates/onnx-ir/src/node/reduce_prod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn reduce_prod_config(node: &Node) -> Option<usize> {
3333

3434
// Not supported in Burn
3535
assert!(
36-
!(!axes.is_empty() && keepdims == 0),
36+
axes.is_empty() || keepdims != 0,
3737
"ReduceProd: the reduce operation must preserve the reduced dimension"
3838
);
3939

crates/onnx-ir/src/node/reduce_sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn reduce_sum_config(node: &Node) -> Option<usize> {
4242

4343
// Not supported in Burn
4444
assert!(
45-
!(!axes.is_empty() && keepdims == 0),
45+
axes.is_empty() || keepdims != 0,
4646
"ReduceSum: the reduce operation must preserve the reduced dimension"
4747
);
4848

0 commit comments

Comments
 (0)