Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Accelerators: NATIVE, Metal, and placeholders for CUDA, LLVM, WebGPU #380

Merged
merged 28 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wrap around ...:
  • Loading branch information
hikettei committed Dec 30, 2024
commit 8d9907d553a464d67decef07e29daa1611329c47
5 changes: 3 additions & 2 deletions source/byoc/lisp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
(macrolet ((def (id op &optional (offset 0))
`(defmethod %render-node ((renderer LispStyle-Renderer) (id (eql ,id)) node)
(let ((lhs (render-node renderer (nth ,(+ 0 offset) (node-reads node))))
(rhs (render-node renderer (nth ,(+ 1 offset) (node-reads node)))))
(rhs (render-node renderer (nth ,(+ 1 offset) (node-rgeads node)))))
(list ',op lhs rhs)))))
(def :ADD +)
(def :MUL *)
Expand Down Expand Up @@ -121,8 +121,9 @@
(defmethod %render-node ((renderer LispStyle-Renderer) (id (eql :Allocate)) node) nil)
(defmethod %render-node ((renderer LispStyle-Renderer) (id (eql :Cast)) node)
(let ((x (render-node renderer (second (node-reads node)))))
;; [TODO] Inline dtype/cast
;; [TODO] Inline dtype/cast properly (from compilation-time know information like dtype)
`(dtype/cast ,x ,(getattr node :dtype))))

(defmethod %render-node ((renderer LispStyle-Renderer) (id (eql :Index-Components)) node)
(render-expr 'LispStyle-Renderer (expr-index-components renderer node (renderer-index-space renderer))))
(defmethod %render-node ((renderer LispStyle-Renderer) (id (eql :WHERE)) node)
Expand Down
Loading