Git Product home page Git Product logo

autograph's People

Contributors

albertogp avatar charles-r-earp avatar follower avatar nkconnor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autograph's Issues

Build fails with oneDNN, missing CMakeLists.txt

Downloaded as zip file, ran cargo run --example mnist_dense --features "datasets" --release:

CMake Error: The source directory "autograph-master/oneDNN" does not appear to contain CMakeLists.txt.

This was just a quick test, maybe I’m missing some obvious step.

16 and 64 bit support

Currently 64 bit operations are not fully supported on windows and macos. Additionally, 8 and 16 bit ops require extensions, and may not be fully supported as well.

For images, it is very beneficial to load data as u8 to the device and then convert it to floating point, as this increases bandwidth by a factor 4. What I did before was just pack the u8's into a u32, and then do bitwise operations to extract those into 4 u32's on the device. Not sure on the performance, but at least it's the most portable.

I would like to support bf16 eventually, even if 16 bit values are simply converted to f32s for operations. Potentially this may be faster due to 2x the bandwidth and memory.

[question] how to convert BufferBase to Vec

Hi, I use the network defined in https://github.com/charles-r-earp/autograph/blob/main/examples/neural-network-mnist/src/main.rs
The output of the model in inference as_raw_slice() is F32(BufferBase { device: Device(0), len: 14190, elem: "f32" }).
Now I try to get a Vec<32> of it to interpret the results.
Can you help me to understand how to get the data?

Here is a peace of code:

autograph=v0.1.1

let prediction = self
        .net
        .clone()
        .into_device(device)
        .await
        .unwrap()
        .infer(&x)
        .unwrap();
let prediction: FloatBuffer = prediction
        .as_raw_slice()
        .into_device(Device::host())
        .await
        .unwrap();
println!("{:?}", prediction);
// F32(BufferBase { device: Host, len: 14190, elem: "f32" })

Some examples show to "read" data back: let output = y.read().await?;
But FloatBuffer does not have the read() function.

Tests fail on Mac OS Monterey, Rust 1.57

Tests fail to finish on M1 Mac

$ cargo test device_new --features device_tests
running 1 test
test device::tests::device_new has been running for over 60 seconds
error: test failed, to rerun pass '--lib'
Caused by:
  process didn't exit successfully: `/Users/rjzak/Downloads/autograph/target/debug/deps/autograph-868587c6365604da device_new` (signal: 9, SIGKILL: kill)

$ cargo test --features "full device_tests"
test device::buffer::tests::device_buffer_copy_from_slice has been running for over 60 seconds
test device::buffer::tests::device_buffer_serde has been running for over 60 seconds
test device::buffer::tests::fill_bf16 has been running for over 60 seconds
test device::buffer::tests::fill_f16 has been running for over 60 seconds
test device::buffer::tests::fill_f32 has been running for over 60 seconds
test device::buffer::tests::fill_f64 has been running for over 60 seconds
test device::buffer::tests::fill_i16 has been running for over 60 seconds
test device::buffer::tests::fill_i32 has been running for over 60 seconds
error: test failed, to rerun pass '--lib'
Caused by:
  process didn't exit successfully: `/Users/rjzak/Downloads/autograph/target/debug/deps/autograph-aa9dbc5e89ab94bc` (signal: 9, SIGKILL: kill)

$ uname -a
Darwin macmini.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64
$ rustc --version
rustc 1.57.0 (f1edd0429 2021-11-29)

Parametrized tests?

I was checking out cargo test on metal and all non-f64 tests pass 🎉

Going forward, I think tests parametrized on dtype and Device (include/exclude via test params?) would make for a DRY yet granular foundation. I'm no expert in rust fixtures, but saw rstest and macro approaches.

Do you have any opinion on that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.