Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pixi configuration #281

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Update pixi configuration #281

merged 6 commits into from
Nov 13, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Nov 8, 2024


📚 Documentation preview 📚: https://jaxsim--281.org.readthedocs.build//281/

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@diegoferigo
Copy link
Member Author

Can you please check upon review if the current GPU configuration works on your setup? It seems that CUDA is detected and arrays can be allocated on GPUs, but then jax fails to jit-compile functions.

Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Diego! I would keep the CI name of pixi e.g. drop 4d42133, as in the future we might think to use pixi for running the tests on CI and it may create confusion

@diegoferigo
Copy link
Member Author

Thanks Diego! I would keep the CI name of pixi e.g. drop 4d42133, as in the future we might think to use pixi for running the tests on CI and it may create confusion

Reverting the name would be ok for me, just note that in this PR I also added a new step that runs the tests against the newly resolved pixi environment. For what regards CI/CD, I'd suggest to keep the functionality (regardless to the way dependencies are installed) in ci_cd.yml. What do you think?

pyproject.toml Show resolved Hide resolved
Copy link
Member

@xela-95 xela-95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @diegoferigo ! LGTM!

@flferretti
Copy link
Collaborator

in this PR I also added a new step that runs the tests against the newly resolved pixi environment

This is great, thanks!

I'd suggest to keep the functionality (regardless to the way dependencies are installed) in ci_cd.yml. What do you think

Yes, it definitely makes sense to keep the two things in two separate workflows

@diegoferigo
Copy link
Member Author

Great! I just need now someone that can confirm whether the resolved GPU environment fully works. I'm transitioning to a new setup and I don't have Nvidia GPUs available at the moment.

@flferretti
Copy link
Collaborator

I could solve the GPU environment with these modifications:

diff --git a/pyproject.toml b/pyproject.toml
index 1be8b1d..bb4fa88 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -258,13 +258,12 @@ robot_descriptions = "*"
 
 [tool.pixi.feature.gpu]
 platforms = ["linux-64"]
-system-requirements = { cuda = "12.1" }
+system-requirements = { cuda = "12"}
 
 [tool.pixi.feature.gpu.dependencies]
-cuda-version = "12.*"
 cuda-nvcc-tools = "*"
 cuda-nvvm-tools = "*"
-cudnn = "9.3.0.*"
+cudnn = "*"
 # Pinning a specific version awaiting the following to get addressed:
 # https://github.com/conda-forge/jaxlib-feedstock/issues/285
 jaxlib = { version = "<0.4.32", build = "*cuda*" }

@diegoferigo
Copy link
Member Author

Does the following work on your setup? On mine it doesn't:

jaxsim on  update_pixi_confuguration via 🐍 v3.10.12
❯ pixi run --environment gpu python -c "import jax.numpy as jnp; jnp.linalg.norm(jnp.ones(3))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
jaxlib.xla_extension.XlaRuntimeError: INTERNAL: libdevice not found at ./libdevice.10.bc
--------------------
For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.

@flferretti
Copy link
Collaborator

Does the following work on your setup? On mine it doesn't:

jaxsim on  update_pixi_confuguration via 🐍 v3.10.12
❯ pixi run --environment gpu python -c "import jax.numpy as jnp; jnp.linalg.norm(jnp.ones(3))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
jaxlib.xla_extension.XlaRuntimeError: INTERNAL: libdevice not found at ./libdevice.10.bc
--------------------
For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.

Yes but I get some logs from PTXAS. It seems related to openxla/xla#16431 as I'm on CUDA 12.6:

$ pixi run --environment gpu python -c "import jax.numpy as jnp; jnp.linalg.norm(jnp.ones(3))"

 WARN The feature 'style' is defined but not used in any environment
 WARN The feature 'testing' is defined but not used in any environment
 WARN The feature 'viz' is defined but not used in any environment
 WARN The feature 'all' is defined but not used in any environment
'+ptx86' is not a recognized feature for this target (ignoring feature)
'+ptx86' is not a recognized feature for this target (ignoring feature)
'+ptx86' is not a recognized feature for this target (ignoring feature)
'+ptx86' is not a recognized feature for this target (ignoring feature)
'+ptx86' is not a recognized feature for this target (ignoring feature)
'+ptx86' is not a recognized feature for this target (ignoring feature)

@diegoferigo
Copy link
Member Author

Can you please upload your pixi.lock? Also on my new setup, I get the same libdevice error.

@flferretti
Copy link
Collaborator

Can you please upload your pixi.lock? Also on my new setup, I get the same libdevice error.

You're right, it still does not work. I'm currently using jaxlib==0.4.28 in a working setup, maybe we could try to pin that as the upper limit

@diegoferigo
Copy link
Member Author

Can you try now @flferretti? The resolved environment now seems working here after the last push.

@flferretti
Copy link
Collaborator

Can you try now @flferretti? The resolved environment now seems working here after the last push.

It works now, thanks!

Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Diego, LGTM!

@diegoferigo diegoferigo merged commit cdaf723 into main Nov 13, 2024
23 of 24 checks passed
@diegoferigo diegoferigo deleted the update_pixi_configuration branch November 13, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants