Coder Social home page Coder Social logo

Comments (5)

dham avatar dham commented on July 25, 2024

I think this is something like where we ought to go. I'm not sure whether proxy block is the right way to do it.

The way we share state between forward solves right now is by having all the related solve blocks share some state information. This could be expanded to more shared state (particularly the adjoint solves).

I think it would be worth fleshing out which of these approaches is preferable. Maybe put it on the meeting agenda.

from firedrake.

colinjcotter avatar colinjcotter commented on July 25, 2024

I like this idea of leaving it up to the coder to decide

from firedrake.

dham avatar dham commented on July 25, 2024

I like this idea of leaving it up to the coder to decide

I don't think either of these options does that. This is still the same taping process.

What is proposed is that if a e.g. NonLinearVariationalSolver has its solve method called twice, you either get:

  1. A Solve block the first time and then a Proxy block pointing at the Solve block the second time.
  2. Two solve blocks but they both have an (e.g.) ._ad_block_shared_state member which contains the data that is shared between the two blocks (the forward and adjoint solvers, for example).

from firedrake.

connorjward avatar connorjward commented on July 25, 2024

A related pipe dream of mine is for us to employ enough smart caching that we could get near to equivalent performance calling the solve function compared with creating and reusing solvers.

This would all be interesting to discuss in this week's meeting.

from firedrake.

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.