Comments (2)
So I think this is running into known "undefined" behavior of Cassette's tagging system: "context-unobservable" mutation of "context-observed" state in the target program can corrupt the state's contextual metadata (and if the mutation is performed concurrently from different tasks, it can similarly induce race conditions in the corresponding metadata mutation).
Here, IIUC, a task is being popped from a global task queue before that task's metadata has even been enqueued in the task queue's metadata storage.
I've basically been ignoring this problem - the plan was to just document it as undefined behavior and call it a day - but now that people are trying to use the tagging system for nonnumerical work it seems now is the time to figure this out...
from cassette.jl.
Okay, I have a very vague start of an idea of how to proceed here.
Basically, my intuition is that Cassette will have to consider all Julia tasks + Julia's built-in scheduler/work queue to always be "context-observable", regardless of what the Julia program is actually doing. This should be similar to the way Cassette currently treats "tagged modules" - just part of the state of "Julia itself" that must be tracked as it could result in non-local interactions with contextual metadata.
I think this addition to Cassette's semantics might at least make it possible to discuss a definition for this behavior, though I'm still not sure yet what the definition will even be. For example, I'm not sure this helps that much with being able to actually identify when two tasks concurrently interfere with the same contextual metadata, or helps us decide what to do if primal read/writes are torn from metadata read/writes across tasks...hmmm...
from cassette.jl.
Related Issues (20)
- Inference issues with accessing hcat-ed arrays
- Tag new version HOT 5
- Internal error when overdubbing HTTP.request HOT 1
- Open discussion - support for dynamic pass creation HOT 3
- Overdubbing not working when function called from within `@threads for` loop HOT 2
- Code using Cassette fails for nightly builds HOT 2
- Discriminating overdub calls for "same" function/args HOT 1
- Is there a way to bail out of overdubbing? HOT 2
- TagBot trigger issue HOT 10
- Errors on Julia v1.6 HOT 3
- less helpful stacktraces on 1.6 HOT 3
- Error compiling Cubature.hcubature in context Traceur.Trace
- Default value to `reflect` should be `Base.current_world` HOT 1
- Cassette and AbstractInterpeter
- Cassette compilation fails as of Julia commit 6ce28008ba6db324b171909fa8e641fe8bce9db4 HOT 1
- Error in overdub with StaticArrays.jl HOT 5
- Error on ColorTypes HOT 2
- Very high TTFX HOT 1
- nightly failing to precompile with `ERROR: LoadError: invalid struct allocation` HOT 3
- `Reflection` should probably store the `MethodInstance` and possibly the `world`.
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 cassette.jl.