Tests failing on HEAD /w cargo 1.78.0
twitchyliquid64 opened this issue · 0 comments
twitchyliquid64 commented
First one:
error[E0277]: cannot add `Const<1>` to `Const<1>`
--> dfdx/tests/issue_tests.rs:35:43
|
35 | let _y: Tensor<Rank1<2>, _, _, _> = m.forward(x);
| ^^^^^^^ no implementation for `Const<1> + Const<1>`
|
= help: the trait `Add` is not implemented for `Const<1>`, which is required by `(_, _): dfdx::prelude::TryConcatTensorAlong<dfdx::prelude::Axis<0>>`
= help: the trait `Add<usize>` is implemented for `Const<1>`
= help: for that trait implementation, expected `usize`, found `Const<1>`
= note: required for `((Const<1>,), (Const<1>,))` to implement `TryConcatShapeAlong<dfdx::prelude::Axis<0>>`
= note: required for `(dfdx::prelude::Tensor<(Const<1>,), {float}, dfdx::prelude::Cpu>, dfdx::prelude::Tensor<(Const<1>,), {float}, dfdx::prelude::Cpu>)` to implement `dfdx::prelude::TryConcatTensorAlong<dfdx::prelude::Axis<0>>`
Second:
error[E0599]: the method `conv1d` exists for tuple `(Tensor<(Const<1>, Const<2>), f32, Cpu, OwnedTape<_, Cpu>>, Tensor<(Const<2>, ..., ...), ..., ...>)`, but its trait bounds were not satisfied
--> dfdx-core/src/tensor_ops/conv1d/tests.rs:14:43
|
14 | (x.leaky_trace(), weight.clone()).conv1d(Const::<1>, Const::<0>, Const::<1>, Const::<1>);
| ^^^^^^ method cannot be called due to unsatisfied trait bounds
|
::: dfdx-core/src/shapes/shape.rs:28:1
|
28 | pub struct Const<const M: usize>;
| -------------------------------- doesn't satisfy `<_ as Div<usize>>::Output = Const<1>`
|
= note: the full type name has been written to '/home/xxx/projects/dfdx/target/debug/deps/dfdx_core-6dc480f1f999c226.long-type-15613452805294519034.txt'
= note: consider using `--verbose` to print the full type name to the console
note: trait bound `(shape::Const<2>, shape::Const<2>): conv1d::TryConv1D<_, _, _, usize>` was not satisfied
--> dfdx-core/src/tensor_ops/conv1d/mod.rs:176:18
|
157 | TryConv1D<Stride, Padding, Dilation, Groups>
| --------------------------------------------
158 | for (
| _________-
159 | | Tensor<(InpChan, L), E, D, T>,
160 | | Tensor<(OutChan, <InpChan as std::ops::Div<Groups>>::Output, Kernel), E, D>,
161 | | )
| |_____-
...
176 | (L, Kernel): TryConv1D<Stride, Padding, Dilation, Groups>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here
177 | <(L, Kernel) as TryConv1D<Stride, Padding, Dilation, Groups>>::Convolved: Dim,
| ^^^ unsatisfied trait bound introduced here
= note: the following trait bounds were not satisfied:
`<shape::Const<1> as Div<usize>>::Output = shape::Const<1>`
which is required by `(tensor_impls::Tensor<(shape::Const<1>, shape::Const<2>), f32, tensor::cpu::device::Cpu, gradients::OwnedTape<_, tensor::cpu::device::Cpu>>, tensor_impls::Tensor<(shape::Const<2>, shape::Const<1>, shape::Const<2>), f32, tensor::cpu::device::Cpu>): conv1d::TryConv1D<_, _, _, usize>`
= help: items from traits can only be used if the trait is implemented and in scope
note: `conv1d::TryConv1D` defines an item `conv1d`, perhaps you need to implement it
--> dfdx-core/src/tensor_ops/conv1d/mod.rs:87:1
|
87 | pub trait TryConv1D<Stride, Padding, Dilation, Groups>: Sized {
These both seem related to the Const
type.