Skip to content

Instantly share code, notes, and snippets.

---- ops::cnn::conv::test::test_eval_ntc_simple stdout ----
thread 'ops::cnn::conv::test::test_eval_ntc_simple' panicked at 'assertion failed: `(left == right)`
left: `[1,2,1,F32 2, 0]`,
right: `[1,2,1,F32 2, 0]`', hir/src/ops/cnn/conv.rs:387:9
@kali
kali / foo.rs
Created December 13, 2021 16:16
use tract_onnx::prelude::*;
fn init() {
let _ = env_logger::builder().is_test(true).try_init();
}
const VOCAB: [char; 28] = [
' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\'',
];
const TOINT: f32 = 1.0f32 / f32::EPSILON;
fn foo(x: f32) -> f32 {
let u = x.to_bits();
let e = u >> 23 & 0xff;
if e >= 0x7f + 23 {
return x;
}
let s = u >> 31;
let y = if s == 1 { x - TOINT + TOINT } else { x + TOINT - TOINT };
TSAR 29/05 18:28 ~/dev/snips/tract/cli% cargo run -- ../.cached/onnx/onnx-1.5.0/onnx/backend/test/data/real/test_squeezenet/squeezenet/model.onnx -i 2x3x224x224xf32 dump --info
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/home/kali/dev/snips/tract/target/debug/tract ../.cached/onnx/onnx-1.5.0/onnx/backend/test/data/real/test_squeezenet/squeezenet/model.onnx -i 2x3x224x224xf32 dump --info`
┏ 52 Source data_0
┃ ━━━ 2x3x224x224xF32
┣┻┻ 53 Conv conv1_1
┃ ━━━ 2x64x111x111xF32
┣ 54 ScalarMax conv1_2
┣ 55 MaxPool pool1_1
┃ ━━━ 2x64x55x55xF32
TSAR 29/05 18:26 ~/dev/snips/tract/cli% cargo run -- ../.cached/onnx/onnx-1.5.0/onnx/backend/test/data/real/test_squeezenet/squeezenet/model.onnx -i 1x1x1xf32 dump --info
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `/home/kali/dev/snips/tract/target/debug/tract ../.cached/onnx/onnx-1.5.0/onnx/backend/test/data/real/test_squeezenet/squeezenet/model.onnx -i 1x1x1xf32 dump --info`
┏ 52 Source data_0
┃ ━━━ 1x1x1xF32
┣┻┻ 53 Conv conv1_1
┃ ━━━ ?x?x?x?x?
┣ 54 ScalarMax conv1_2
┃ ━━━ ?x?x?x?xF32
┣ 55 MaxPool pool1_1
@kali
kali / a.txt
Created November 28, 2019 14:52
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/home/kali/dev/snips/tract/target/debug/tract qtdnn_10x5_101/model.onnx --kaldi-left-context 1 --kaldi-right-context 1 --input-bundle qtdnn_10x5_101/io.npz run`
[linalg/src/generic/mmm.rs:209] ab = [
[
3110,
3989,
-1533,
2595,
],
[
Uninitialized bytes in __interceptor_memchr at offset 0 inside [0x701000000000, 4)
==9004==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x557a674dfc3d in std::sys::unix::memchr::memchr::h5840791e4212eaf3 /rustc/17e73e801a75559eac5c932ff07bd9c8499a1364/src/libstd/sys/unix/memchr.rs:6:8
#1 0x557a674dfc3d in std::memchr::memchr::h7bc89c85557a6347 /rustc/17e73e801a75559eac5c932ff07bd9c8499a1364/src/libstd/memchr.rs:25:4
#2 0x557a674dfc3d in std::ffi::c_str::CString::_new::hb9eb885837f6022f /rustc/17e73e801a75559eac5c932ff07bd9c8499a1364/src/libstd/ffi/c_str.rs:334:14
#3 0x557a674dfc3d in std::ffi::c_str::CString::new::he0b176bdd316ff10 /rustc/17e73e801a75559eac5c932ff07bd9c8499a1364/src/libstd/ffi/c_str.rs:330:8
#4 0x557a674dfc3d in std::thread::Thread::new::_$u7b$$u7b$closure$u7d$$u7d$::hd51489f94e0efb44 /rustc/17e73e801a75559eac5c932ff07bd9c8499a1364/src/libstd/thread/mod.rs:1118:12
#5 0x557a674dfc3d in core::option::Option$LT$T$GT$::map::h06f690899790a79c /rustc/17e73e801a755
Uninitialized bytes in __interceptor_memchr at offset 0 inside [0x701000000000, 4)
==25215==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55d0ba4b4dcd (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/release/tract+0xcefdcd)
#1 0x55d0ba4c2177 (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/release/tract+0xcfd177)
#2 0x55d0ba679d7e (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/release/tract+0xeb4d7e)
#3 0x7f7cb886409a (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#4 0x55d0b9838289 (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/release/tract+0x73289)
Running `/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract -v /home/kali/.cache/hey_snips_v3.1.pb -i Sx40xf32 dump`
Uninitialized bytes in __interceptor_memchr at offset 0 inside [0x701000000000, 4)
==31975==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55ee6131f09e (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract+0x98f409e)
#1 0x55ee6132928e (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract+0x98fe28e)
#2 0x55ee57eee0fd (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract+0x4c30fd)
#3 0x55ee582a7141 (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract+0x87c141)
#4 0x7f0d89da909a (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#5 0x55ee57c3f1e9 (/home/kali/dev/snips/tract/target/x86_64-unknown-linux-gnu/debug/tract+0x2141e9)
pub fn integer<'a>(bin: bool) -> impl Fn(&'a [u8]) -> IResult<&'a [u8], i32> {
map(pair(
cond(bin, be_i32),
cond(!bin,
map_res(
map_res(
recognize(pair(opt(tag("-")), take_while(nom::character::is_digit))),
std::str::from_utf8,
),
|s| s.parse::<i32>(),