Comments (4)
Yes, absolutely! A few questions/comments.
- From my initial read, the Tullio macro expresses a (possibly compound) pointwise expression, to be eventually surrounded by nested loops. Is that correct?
- Is there an intermediate representation I can use after parsing but before lowering? Do most Tullio backends just use the input syntax directly?
- Some of the modifications to indices (e.g. mod) don't currently have Finch analogues, so that will have to wait till we implement those in Finch.
- We may want some sparsity-specific preprocessing to make it easier to use. For example, not all sparse formats support efficient random access, so we may want to automatically transpose and reformat some inputs before running the kernel, an example of this is described here
from tullio.jl.
Sorry I thought I replied to this, but must not have pasted what I wrote. Maybe this indicates how active this project is -- I aim to keep it working but don't have time for much re-thinking.
From my initial read, the Tullio macro expresses a (possibly compound) pointwise expression, to be eventually surrounded by nested loops. Is that correct?
Yes that's exactly right. In particular, this means it deviates from Einstein notation as something like z[i] := x[i,j]*x[i,j] + y[i]
has one loop nest, and y
is inside the sum.
Is there an intermediate representation I can use after parsing but before lowering? Do most Tullio backends just use the input syntax directly?
Unfortunately this is not very modular. The three backends are Base, LoopVectorization, KernelAbstractions. Different methods of the act!
function are generated for each, all at once. Everything that is parsed/resolved ends up in store::DotDict
which is used to write code. @tullio verbose=2
prints it out. Code for the gradients is generated at the same time, by different source.
Adding a 4th backend which similarly builds loops with @finch
in front would probably not be very hard. storage_type
would have to recognise Finch's sparse array types, to dispatch to them.
from tullio.jl.
Adding a 4th backend which similarly builds loops with @finch in front would probably not be very hard. storage_type would have to recognise Finch's sparse array types, to dispatch to them.
I agree, especially for the simpler expressions. Finch has similar features to storage_type
in https://github.com/willow-ahrens/Finch.jl/blob/1b0539cc04556d7a92871d5af9c2221cecc099e1/src/base/broadcast.jl#L43 and similar features to https://github.com/mcabbott/Tullio.jl#notation in https://github.com/willow-ahrens/Finch.jl/blob/1b0539cc04556d7a92871d5af9c2221cecc099e1/src/transforms/wrapperize.jl#L10. The challenge will be implementing features where semantics maybe disagree between the two systems. I won't have time to work on this till January, but perhaps we can start with a simple prototype that implements most of the stuff, and add remaining features later.
from tullio.jl.
Related Issues (20)
- Alternative to Tullio for Chained Multiplication HOT 4
- @views macro causes module compilation failure HOT 3
- Reporting a bug when Tullio being included with LoopVectorization HOT 1
- [Question] Is it possible to create a vector of SVectors from a Matrix using Tullio? HOT 2
- [Question] How to change summation order? HOT 5
- Use package extensions HOT 1
- How finalizers `|>` work HOT 5
- Method error when broadcast and sum of matrices HOT 1
- GPU Kernel Compilation Failed with Interpolations HOT 2
- Upgrade to CUDA.CUDAKernels HOT 9
- Bug when using Tullio + LoopVectorization HOT 5
- CUDA v4 support HOT 2
- Using threads, vs setting threads=false gives different result HOT 3
- Issue with vectorized functions on GPU HOT 3
- Error when specifying the range of an index with a UnitRange HOT 4
- Scalar indexing with CUDA HOT 10
- Please update dep of FillArrays to v1.
- Bad interaction with Enzyme? HOT 6
- Zygote with Tullio gives wrong gradients/pullbacks using CUDA HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tullio.jl.