Giter Club home page Giter Club logo

Comments (14)

wsmoses avatar wsmoses commented on August 16, 2024 1

@martinjm97 this PR #1712 tells Enzyme to act conservative on non-affine things which hopefully fixes your issue here (aka hopefully having the effect of saying non-differentiable vars can be non-affine)

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

@martinjm97 I don't see the relevant code, can you upload to enzyme explorer (enzyme.mit.edu/explorer)

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

ah I see, the code is not the same as in the CI test harness

e.g. see https://github.com/martinjm97/sparse_deriv_enzyme/blob/0650345099790f8ac4e3471de1d7330c543fd9b5/eigenanalysis/eigen_analysis.cpp#L75

vs

static void matrix_multiply(T (&result)[m][k], const T matrix1[m][n], const T matrix2[n][k]) {

Can you just use the version from CI (e.g. https://github.com/EnzymeAD/Enzyme/blob/main/enzyme/test/Integration/Sparse/eigen_analysis.cpp) which should have the relevant setup / code, and then add the harness onto it?

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

Sorry, the code I'm referring to isn't: https://github.com/martinjm97/sparse_deriv_enzyme/blob/0650345099790f8ac4e3471de1d7330c543fd9b5/eigenanalysis/eigen_analysis.cpp#L75

It's https://github.com/martinjm97/sparse_deriv_enzyme/blob/cpp-viz/harness/eigenanalysis.cpp. Does the link not work for you?

Here I use matrix.h as in CI. Everything is the same modulo some minor changes to types.

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

So I don't see any autodiff call in that file? Nor any todense

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

Sorry, just edited! I realized I was on main instead of cpp-viz. The link should now be correct.

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

Do you see it here: https://github.com/martinjm97/sparse_deriv_enzyme/blob/cpp-viz/harness/eigenanalysis.cpp.

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

Yeah so there's still indirect indexing there via faces (https://github.com/martinjm97/sparse_deriv_enzyme/blob/bba6af8b79d7aa34bd6deceb32f775a884a2c5a2/harness/eigenanalysis.cpp#L103)

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

That the same as in

I think it's okay because we don't differentiate wrt that part of the computation.

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

I mean I think that's what it is yelling about. We can extend it to add support for that [and be conservative and assume it is always the worst case condition].

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

It's weird that it's working in CI, but not in the version in harness.

I'll can try again from scratch and see if there's some mistake that popped in somewhere.

from enzyme.

wsmoses avatar wsmoses commented on August 16, 2024

The CI one does a different L vs M, and the one in CI had the affine-ification, the other didn't

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

Yeah. You're right. I'll revert and debug.

from enzyme.

martinjm97 avatar martinjm97 commented on August 16, 2024

Good point. I'll try getting L working

from enzyme.

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.