Giter Site home page Giter Site logo

Comments (4)

Chillee avatar Chillee commented on August 16, 2024

Thanks for providing lists of batching rules where we still need to fill in the gaps :) We'll work towards adding them.

Other than allclose (where we couldn't generate a fallback), does the API suffice for your needs? We're looking for feedback on APIs and such :)

Ps: thank you for using the same vmap syntax as jax that saved a lot of time converting the code.

Yeah, all credit to the Jax team for coming up with such a great API :)

from functorch.

Chillee avatar Chillee commented on August 16, 2024

Looking closer at the usage of aten::allclose, I'm not sure that you'll be able to vmap through it without some modifications to the library.

Unfortunately, the code looks something like this:

is_hermitian: bool = torch.allclose(a, a.t())

The problem is that a is now batched, so what should torch.allclose return? A list of booleans? Then what happens if you have

is_hermitian: bool = torch.allclose(a, a.t())
if is_hermitian:
    do foo
else:
   do blah

My suspicion is that the code will need to be restructured in order to vmap over it.

from functorch.

JonathanSchmidt1 avatar JonathanSchmidt1 commented on August 16, 2024

Thank you for taking a look at the xitorch issue, than I will rewrite the code as this check is not 100% required.
Concerning the api if you just use the jax api I have no suggestions for improvements, it already works great.

from functorch.

Chillee avatar Chillee commented on August 16, 2024

I suspect that in order to resolve this, we may need to have control flow operators (like Jax's lax.cond).

from functorch.

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.