Sparse Halide #7683
soufianekhiat
started this conversation in
Ideas
Sparse Halide
#7683
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would to open a discussion about feasability and a possible new feature to change index for being able to remap sparse data to dense memory layout.
Here few of my prototype:
Version 0 (working but limited)
I'm exploring the feasability to extend the usage of Halide for Sparse data.
Based on:
"Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines."
That can fit on this definition.
A simple way to tackle the problem is to keep everything in dense memory, and considering sparse as a simple reindexing to a dense memory layout.
Here my first prototype:
The reindexing job is done with:
Produces:
This approch would work for single indirection data. But limit us for richer indirection from "local sparse data". For instance I would like to have NanoVDB version based on Halide.
Version 1 (WIP proposition, open to discussion).
Inspired by Taichi (the C++ front-end is barely usable). I have a new front-end:
Here few usecase:
The Read function should produce the offset for the read or write.
RegularGrid AoS
RegularGrid SoA
Here the main idea is the operator () or the function Read will produce another function for reading,
Exactly what BoundaryCondition do:
Quadtree MaxDepth 3
Some extra sparse layout:
I'm open to any comment.
Beta Was this translation helpful? Give feedback.
All reactions