Code Monkey home page Code Monkey logo

jax2torch's Issues

Is XLA_PYTHON_CLIENT_PREALLOCATE needed for this?

Hello,

My understanding was that Jax preallocates ~90% of the GPU memory, and setting XLA_PYTHON_CLIENT_PREALLOCATE to false is needed when interoping with other frameworks in order to avoid this. However, this isn't mentioned anywhere here. I figure this should probably be explicitly mentioned?

The SMURF repo does set os.environ["XLA_PYTHON_CLIENT_PREALLOCATE"] = "false", so I assume it is necessary?

Not working on PyTorch 2.1 and CUDA 11.8

When I run this on PyTorch 2.1 and CUDA 11.8, I get this error:
Traceback (most recent call last):
File "", line 12, in
File "/home/nzubic/anaconda3/envs/events_signals/lib/python3.11/site-packages/jax2torch/jax2torch.py", line 54, in inner
return JaxFun.apply(*bound.arguments.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nzubic/anaconda3/envs/events_signals/lib/python3.11/site-packages/torch/autograd/function.py", line 542, in apply
raise RuntimeError(
RuntimeError: In order to use an autograd.Function with functorch transforms (vmap, grad, jvp, jacrev, ...), it must override the setup_context staticmethod. For more details, please see https://pytorch.org/docs/master/notes/extending.func.html

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.