Skip to content

Instantly share code, notes, and snippets.

@haydnv
haydnv / gist:f7b2d5847a8dbcc1cf5e68a3aee6a841
Created February 9, 2023 11:52
custos-math compile errors
~/Documents/custos-math$ cargo check --no-default-features
Checking custos-math v0.5.0 (/home/haydn/Documents/custos-math)
error[E0432]: unresolved imports `custos::get_device`, `custos::CUdeviceptr`
--> src/matrix.rs:10:5
|
10 | get_device, Alloc, BufFlag, Buffer, CDatatype, CUdeviceptr, Device, GenericBlas, GraphReturn,
| ^^^^^^^^^^ no `get_device` in the root ^^^^^^^^^^^ no `CUdeviceptr` in the root
error[E0432]: unresolved import `custos::get_device`
--> src/ops/nn/activations.rs:6:33
$ cargo test --no-default-features
Updating crates.io index
Compiling proc-macro2 v1.0.51
Compiling quote v1.0.23
Compiling unicode-ident v1.0.6
Compiling syn v1.0.107
Compiling custos v0.6.2
Compiling custos-math v0.6.2 (/home/haydn/Documents/custos-math-upstream)
Compiling custos-macro v0.1.0
warning: unused imports: `each_op_slice_mut`, `each_op`
@haydnv
haydnv / cargo test --features=opencl.log
Created February 11, 2023 10:57
custos-math with opencl feature
# cargo test --features=opencl
Updating crates.io index
Downloaded custos v0.6.2
Downloaded 1 crate (107.3 KB) in 0.98s
Compiling custos v0.6.2
Compiling custos-math v0.6.2 (/root/crate/custos-math)
error[E0425]: cannot find function `construct_buffer` in module `custos::opencl`
--> src/opencl.rs:95:29
|
95 | custos::opencl::construct_buffer(device, no_drop.to_buf(), matrix.node.idx)
error[E0277]: the trait bound `cuda_device::CUDA: shape::Shape` is not satisfied
--> src/devices/cuda/cuda_device.rs:168:20
|
168 | impl<T: CDatatype> ClearBuf<T, CUDA> for CUDA {
| ^^^^^^^^^^^^^^^^^ the trait `shape::Shape` is not implemented for `cuda_device::CUDA`
|
= help: the following other types implement trait `shape::Shape`:
()
Dim3<C, B, A>
shape::Dim1<N>
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
@haydnv
haydnv / hyper.rs
Created March 26, 2024 09:14
Hyper client-server test demonstrating deadlock bug
use std::error::Error;
use std::net::{Ipv4Addr, SocketAddr};
use futures::TryStreamExt;
use http_body_util::{combinators::BoxBody, BodyExt, BodyStream, Empty, Full};
use hyper::body::{Bytes, Incoming};
use hyper::server::conn::http1;
use hyper::service::service_fn;
use hyper::{body::Body, Method, Request, Response};
use hyper_util::rt::TokioIo;