Created
February 27, 2023 12:52
-
-
Save haydnv/5c2f9bd5905b57b6168ff19a82f77eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0053]: method `construct` has an incompatible type for trait | |
--> src/devices/cuda/cuda_device.rs:86:72 | |
| | |
86 | fn construct<T, S: Shape>(ptr: &Self::Ptr<T, S>, len: usize, node: crate::Node) -> Self::CT { | |
| ^^^^^^^^^^^ | |
| | | |
| expected enum `AllocFlag`, found struct `node::Node` | |
| help: change the parameter type to match the trait: `AllocFlag` | |
| | |
note: type in trait | |
--> src/devices/cache.rs:21:72 | |
| | |
21 | fn construct<T, S: Shape>(ptr: &Self::Ptr<T, S>, len: usize, flag: AllocFlag) -> Self::CT; | |
| ^^^^^^^^^ | |
= note: expected fn pointer `fn(&CUDAPtr<T>, _, AllocFlag) -> devices::cuda::kernel_cache::RawCUBuf` | |
found fn pointer `fn(&CUDAPtr<T>, _, node::Node) -> devices::cuda::kernel_cache::RawCUBuf` | |
error[E0050]: method `destruct` has 2 parameters but the declaration in trait `devices::cache::RawConv::destruct` has 1 | |
--> src/devices/cuda/cuda_device.rs:94:34 | |
| | |
94 | fn destruct<T, S: Shape>(ct: &Self::CT, flag: AllocFlag) -> (Self::Ptr<T, S>, crate::Node) { | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter, found 2 | |
| | |
::: src/devices/cache.rs:22:34 | |
| | |
22 | fn destruct<T, S: Shape>(ct: &Self::CT) -> Self::Ptr<T, S>; | |
| --------- trait requires 1 parameter | |
error[E0053]: method `clear` has an incompatible type for trait | |
--> src/devices/cuda/cuda_device.rs:170:26 | |
| | |
168 | impl<T: CDatatype, S: Shape> ClearBuf<T, S, CUDA> for CUDA { | |
| - this type parameter | |
169 | #[inline] | |
170 | fn clear(&self, buf: &mut Buffer<T, CUDA>) { | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| expected type parameter `S`, found `()` | |
| help: change the parameter type to match the trait: `&mut buffer::Buffer<'_, T, cuda_device::CUDA, S>` | |
| | |
note: type in trait | |
--> src/op_traits.rs:22:26 | |
| | |
22 | fn clear(&self, buf: &mut Buffer<T, D, S>); | |
| ^^^^^^^^^^^^^^^^^^^^ | |
= note: expected fn pointer `fn(&cuda_device::CUDA, &mut buffer::Buffer<'_, T, cuda_device::CUDA, S>)` | |
found fn pointer `fn(&cuda_device::CUDA, &mut buffer::Buffer<'_, T, cuda_device::CUDA>)` | |
error[E0053]: method `write` has an incompatible type for trait | |
--> src/devices/cuda/cuda_device.rs:205:26 | |
| | |
204 | impl<T, S: Shape> WriteBuf<T, S, CUDA> for CUDA { | |
| - this type parameter | |
205 | fn write(&self, buf: &mut Buffer<T, CUDA>, data: &[T]) { | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| expected type parameter `S`, found `()` | |
| help: change the parameter type to match the trait: `&mut buffer::Buffer<'_, T, cuda_device::CUDA, S>` | |
| | |
note: type in trait | |
--> src/op_traits.rs:94:26 | |
| | |
94 | fn write(&self, buf: &mut Buffer<T, D, S>, data: &[T]); | |
| ^^^^^^^^^^^^^^^^^^^^ | |
= note: expected fn pointer `fn(&cuda_device::CUDA, &mut buffer::Buffer<'_, T, cuda_device::CUDA, S>, &[T])` | |
found fn pointer `fn(&cuda_device::CUDA, &mut buffer::Buffer<'_, T, cuda_device::CUDA>, &[T])` | |
error[E0046]: not all trait items implemented, missing: `write_buf` | |
--> src/devices/cuda/cuda_device.rs:204:1 | |
| | |
204 | impl<T, S: Shape> WriteBuf<T, S, CUDA> for CUDA { | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `write_buf` in implementation | |
| | |
::: src/op_traits.rs:111:5 | |
| | |
111 | fn write_buf(&self, dst: &mut Buffer<T, D, S>, src: &Buffer<T, D, S>); | |
| ---------------------------------------------------------------------- `write_buf` from trait | |
error[E0061]: this function takes 4 arguments but 3 arguments were supplied | |
--> src/devices/cuda/cuda_device.rs:244:9 | |
| | |
244 | Cache::get(self, len, CachedLeaf) | |
| ^^^^^^^^^^ ---- --- expected struct `ident::Ident`, found `usize` | |
| | | |
| an argument of type `&mut devices::cache::Cache<cuda_device::CUDA>` is missing | |
| | |
note: expected fn pointer, found struct `add_graph::CachedLeaf` | |
--> src/devices/cuda/cuda_device.rs:244:31 | |
| | |
244 | Cache::get(self, len, CachedLeaf) | |
| ^^^^^^^^^^ | |
= note: expected fn pointer `fn()` | |
found struct `add_graph::CachedLeaf` | |
note: associated function defined here | |
--> src/devices/cache.rs:201:12 | |
| | |
201 | pub fn get<'a, T, S: Shape>( | |
| ^^^ | |
202 | &mut self, | |
| --------- | |
203 | device: &'a D, | |
| ------------- | |
204 | ident: Ident, | |
| ------------ | |
205 | //add_node: impl AddGraph, | |
206 | callback: fn(), | |
| -------------- | |
help: provide the argument | |
| | |
244 | Cache::get(/* &mut devices::cache::Cache<cuda_device::CUDA> */, self, /* ident::Ident */, /* fn() */) | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
error[E0560]: struct `buffer::Buffer<'_, A, cuda_device::CUDA>` has no field named `node` | |
--> src/static_api/iter.rs:26:13 | |
| | |
26 | node: device.graph().add_leaf(from_iter.len()), | |
| ^^^^ `buffer::Buffer<'_, _, _, _>` does not have this field | |
| | |
= note: available fields are: `ptr`, `device`, `ident` | |
error[E0599]: no method named `graph` found for reference `&cuda_device::CUDA` in the current scope | |
--> src/static_api/iter.rs:26:26 | |
| | |
26 | node: device.graph().add_leaf(from_iter.len()), | |
| ^^^^^ field, not a method | |
| | |
= help: items from traits can only be used if the trait is in scope | |
help: remove the arguments | |
| | |
26 - node: device.graph().add_leaf(from_iter.len()), | |
26 + node: device.graph.add_leaf(from_iter.len()), | |
| | |
help: the following trait is implemented but not in scope; perhaps add a `use` for it: | |
| | |
1 | use crate::graph::GraphReturn; | |
| | |
error[E0599]: no method named `alloc_with_vec` found for reference `&cuda_device::CUDA` in the current scope | |
--> src/static_api/iter.rs:27:25 | |
| | |
27 | ptr: device.alloc_with_vec(from_iter), | |
| ^^^^^^^^^^^^^^ method not found in `&cuda_device::CUDA` | |
| | |
= help: items from traits can only be used if the trait is in scope | |
help: the following trait is implemented but not in scope; perhaps add a `use` for it: | |
| | |
1 | use crate::Alloc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment