GithubHelp home page GithubHelp logo

beverm2391 / teenyarray Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 139 KB

The vision: teenyarray is to numpy as teenygrad is to tinygrad (or torch)

C++ 62.75% CMake 0.90% Jupyter Notebook 34.29% Python 2.07%

teenyarray's Introduction

Teenyarray

The Vision...

I'm building this as a personal project in hopes of producing a distillation of a library like Numpy. Just as teenygrad includes only core deep-learning functionality needed to train the MNIST, my goal is to implement a core array API that I can use to train the MNIST. This means replacing Numpy as a dependency of teenygrad with this library.

Personal Goals

  • build my first "real" cpp project
  • build my first "under the hood" project that exposes Python bindings
  • Learn about numpy internals
  • Practice lower level systems concepts as I write (hopefully clean and efficient) cpp
  • (eventually) learn some GPU programming by implementing this on METAL

TODO

  • get the 4 main classes defined (skeleton) and exposed via bindings
    • Dtype
    • Tarray
      • add array creation methods
        • static methods (.zeroes() .ones(), etc)
        • figure out a way to bind fill to python (takes in python type, passes through correct func with C-type (which is manually created from the temlate function))
          • might need a new typeMap??
        • from python data (.array())
        • figure out a default datatype if no argument is provided
      • getitem and setitem
        • basic indexing
        • slicing
      • reshape
      • tranposing
    • Tfunc
      • break the the 28 OPs into categories: Unary, Binary, Reduce, Ternary, and Load
      • handle broadcasting
    • ArrayScalar
      • get element-wise ops working
  • figure out how iteration will work
  • work on memory management
    • lazy evaluation
    • copy on write?
  • get a testing framework setup
    • write tests for all the foundational methods
  • add an overall line counter (resist the bloat!)

Long Term

  • do a writeup on why i built this, clearly outlining the process
  • work on optimizations (matmul, etc.)
  • once end to end CPU is working, port to METAL
  • get some sort of benchmark going

teenyarray's People

Contributors

beverm2391 avatar

Watchers

 avatar

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.