Giter Club home page Giter Club logo

Comments (2)

jrevels avatar jrevels commented on August 17, 2024 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.

jrevels avatar jrevels commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.