Skip to content
/ clobber Public

Clojure inspired LISP implementation with native NPU hardware acceleration support via LLVM + ONNX interop

Notifications You must be signed in to change notification settings

bryjen/clobber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clobber


logo
Clojure inspired Lisp dialect with native hardware acceleration support.
WIP


  Clobber is a statically typed, general purpose language combining the robustness and expressivity of Lisp languages with the speed of hardware accelerated code - all in one package.

 

Native Hardware Acceleration

(defn -main [& ^string args]
  ; assuming 'read-img' parses an img into a tensor
  (let [^tensor<f32,1,28,28> img1 (read-img "img1.png")
        ^tensor<f32,1,28,28> img2 (read-img "img2.png")]

    (accel
        [^tensor<f32,1,28,28> a img1 
         ^tensor<f32,1,28,28> b img2]
      (matmul (reshape a [1 (* 28 28)])
              (transpose (reshape b [1 (* 28 28)]))))))

Clobber provides bindings to interface with various low-level APIs such as Vulkan or specialized runtimes such as the ONNX Runtime. This is done by defining acceleration blocks and defining tensor operations, which gets parsed into MLIR TOSA, which is then emitted as target-specific, lower-level IR.

About

Clojure inspired LISP implementation with native NPU hardware acceleration support via LLVM + ONNX interop

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published