Comments (4)
I thought about this as well. Maybe we can simply add an optional value to an axiom and have a pass that reduces axioms with their associated values later in the compilation pipeline?
We could a add a bit syntactic sugar to directly do sth like this:
.axm %foo.id (x: .Nat) -> .Nat = x;
Sugar for
.ax %foo.id: .Nat -> .Nat = .lm (x: .Nat) -> .Nat = x;
from thorin2.
Opaque functions as axioms would not be enough in my case.
For matrix, I want to have multiple options
- rewriting to map-reduce (which is in turn rewritten to affine for which is in turn rewritten to recursion)
- rewriting using an external function (blas)
For autodiff, I do not want to replace the axiom but rather in certain circumstances get an associated function (the augmented function that contains the pullback). (This is roughly equivalent to rewriting autodiff.ad axiom
to axiom_diff
.)
from thorin2.
Ah, I see. Another contender is #90. But this still isn't enough for your autodiff example, correct?
from thorin2.
Yes, #90 is rewrite-mapping dialect I was referring to.
This would (at least in the axiom mapping case) be enough. One would just have to introduce a rewrite-axiom to invoke the mapping. For ad, this could directly be autodiff.ad
.
The mapping would then go through thorin.
In this regard, the association dialect is isomorphic to a part of #90.
from thorin2.
Related Issues (20)
- Rewrite Phase Assertion Issue HOT 8
- Clos Conv FDA error
- Add mem unexpected behaviour HOT 2
- Rewrite phase issue with lambda vars. HOT 2
- Recent commits broke matrix axioms HOT 5
- Allocation of nested array HOT 6
- What should we do when allocating nominal arrays? HOT 2
- Core::zip Documentation HOT 1
- Closure Conversion dependent type rewrites HOT 1
- Code generation for floating point casts HOT 2
- Scheduler returns wrong position dynamically
- Automatic Dialect Loading HOT 4
- Shadowing for variables HOT 1
- Application Error with matching domain HOT 7
- Grammar Improvements HOT 1
- Add mem problem with dependent types
- Add mem adds too many mems HOT 2
- Backend Preparation: Nested Extract Splitting
- Float Infer Unification Issue
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 thorin2.