huggingface / ratchet

A cross-platform browser ML framework.
https://ratchet.sh
MIT License
627 stars 33 forks source link

Feature/CPU init #245

Closed ivarflakstad closed 3 months ago

ivarflakstad commented 3 months ago

Initial steps adding CPU implementation for ratchet.

todo:

Ops implemented in this first PR:

Currently we are using Tensor::to_vec<T> to access the data in the cpu buffer. At some point we should look into "peeking" into the storage as a slice instead. Probably at the same time as introducing vectorized operations and wasm.

github-actions[bot] commented 3 months ago
Code Metrics Report
  ===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 TOML                    1           70           58            2           10
-------------------------------------------------------------------------------
 Rust                   66        14516        12421          200         1895
 |- Markdown            35          343            0          272           71
 (Total)                          14859        12421          472         1966
===============================================================================
 Total                  67        14586        12479          202         1905
===============================================================================

  
pkg-pr-new[bot] commented 3 months ago

commit: a89855a

npm i https://pkg.pr.new/huggingface/ratchet/@ratchet/ratchet-web@245

Open in Stackblitz

FL33TW00D commented 3 months ago

Excellent 🚀