Comments (7)
Example file links to 404. Do you have an update?
Here is the file from when the issue was opened:
https://github.com/NeuralCoder3/thorin2/blob/84af1a073ab4e1a848def18cce2e6afc7fe567f1/enzyme/brussel.thorin
Here is the file currently: (Nothing big regarding this issue should have changed)
https://github.com/NeuralCoder3/thorin2/blob/84af1a073ab4e1a848def18cce2e6afc7fe567f1/enzyme/brussel.thorin
(the enzyme folder was moved into the eval folder)
from thorin2.
Example file links to 404. Do you have an update?
from thorin2.
I have to double-check with @f-fries but I think the problem is that the whole clos dialect assumes that the first argument is a mem
. Otherwise, things go south as in your example.
from thorin2.
This is indeed the problem. I opened a new issue #126 as it really is an enhancement and closing this here for now.
from thorin2.
This is indeed the problem. I opened a new issue #126 as it really is an enhancement and closing this here for now.
Therefore, one needs a pass that reorders mem to the front and propagates it to functions without mem (higher order arguments and others) in order to generate the code.
Or would it be easier to adapt closure conversion?
from thorin2.
I think it makes everyone's life easier if we can just assume that the first argument is mem
if present at all. But we should also enhance the closure conversion to also cope with functions without mem
. I think it's cool to have this explicitly annotated on the type that a function is pure and it would be a pity if we would enforce impure functions.
from thorin2.
It might still be a good idea to uniformly add mem
s before/during closure conversion as @NeuralCoder3 has suggested.
Closure conversion actually introduces new side-effects (environment allocation etc).
So some pure functions would get a "pure closure" while others would end up with an "impure closure" with a different type.
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
- Association Dialect HOT 4
- 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.