Skip to content

rust panic with CPU backend in xor example #71

Open
@MellKam

Description

@MellKam

Hi! I just copied the xor example from the readme to test this library, but I couldn't run it. I also needed to add import for tensor1D, as it was not defined in the example.

> deno run -A ./src/xor.ts
Downloading https://github.com/denosaurs/netsaur/releases/download/0.4.2/libnetsaur.so
CPU Backend Initialized
thread '<unnamed>' panicked at crates/core/src/cpu/layers/dense.rs:65:59:
called `Result::unwrap()` on an `Err` value: ShapeError/IncompatibleShape: incompatible shapes
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7fd0c4375a3a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h7265b42392dc0061
   1:     0x7fd0c43965d3 - core::fmt::write::h2ec550f80b7defd0
   2:     0x7fd0c43733a3 - std::io::Write::write_fmt::h36bfe942596e7c0c
   3:     0x7fd0c4375882 - std::sys::backtrace::BacktraceLock::print::h91696b5f38231729
   4:     0x7fd0c43767a7 - std::panicking::default_hook::{{closure}}::h9bab7dd14eb60554
   5:     0x7fd0c43765d6 - std::panicking::default_hook::hf96ee8bd37f2a078
   6:     0x7fd0c4376d97 - std::panicking::rust_panic_with_hook::h78f8bdf8cf52544b
   7:     0x7fd0c4376bf6 - std::panicking::begin_panic_handler::{{closure}}::hefdc3b651bce153f
   8:     0x7fd0c4375f19 - std::sys::backtrace::__rust_end_short_backtrace::ha5a68a90f678ccff
   9:     0x7fd0c43768bc - rust_begin_unwind
  10:     0x7fd0c4394a9d - core::panicking::panic_nounwind_fmt::h2fd0917b1a8df192
  11:     0x7fd0c4394b32 - core::panicking::panic_nounwind::h545911dcc38f2643
  12:     0x7fd0c4394bf5 - core::panicking::panic_cannot_unwind::h3f615319d02b7fb8
  13:     0x7fd0c4318af4 - ffi_backend_predict
  14:     0x564290908052 - ffi_call_unix64
  15:     0x564293b813fa - ffi_call_int.llvm.8777122752065301370
  16:     0x564293b81171 - ffi_call
  17:     0x564293b4fe9c - <extern "C" fn(A0) .> R as v8::support::CFnFrom<F>>::mapping::c_fn::h8ff842577632e711
  18:     0x564231d8f1c6 - <unknown>
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
> deno --version
deno 2.1.4 (stable, release, x86_64-unknown-linux-gnu)
v8 13.0.245.12-rusty
typescript 5.6.2

Platform: WSL2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions