Skip to content

Instantly share code, notes, and snippets.

Mathieu Poumeyrol kali

View GitHub Profile
View gist:038dd69dfec7bbfe289eded9c92863d6
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
View gist:7a958e164c6265e0c5fdf97d69dba49a
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
View a.txt
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,
],
[
View gist:3434db87ed583391dbfadb3b5e552baa
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
View gist:33de1a975dc1f5c7c67594dd02a3c3e5
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)
View gist:6b0b79cf7fd03964b41d5592e9b76e1d
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)
View parse.rs
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>(),
View geal.rs
use std::arch::x86_64::*;
fn main() {
unsafe { run() }
}
#[target_feature(enable = "avx")]
unsafe fn run() {
let mut data:Vec<u8> = Vec::new();
for i in 0..32 {
View gist:dad3c1b4b6fa69782f3edab9d0a22b28
// should recognize:
// input-node name=foo dim=12
// i want to assume both are here, but not necessarily in this order
// i have similar case with more numrous foo=bar cases
fn parse_input_node_line(i: &str) -> IResult<&str, (String, usize)> {
use crate::parser::spaced;
use std::cell::Cell;
let name: Cell<Option<String>> = Cell::new(None);
let dim: Cell<Option<usize>> = Cell::new(None);
View gist:962e26250a19a1067b4b6a3cf31e0214
pub fn spaced<I, O, E: nom::error::ParseError<I>, F>(
it: F,
) -> impl Fn(I) -> IResult<I, O, E> where
I: nom::InputTakeAtPosition,
<I as nom::InputTakeAtPosition>::Item: nom::AsChar + Clone,
F: Fn(I) -> IResult<I, O, E> {
delimited(space0, it, space0)
}
pub fn multispaced<I, O, E: nom::error::ParseError<I>, F>(
You can’t perform that action at this time.