jaxsim 0.5.1.dev99__py3-none-any.whl → 0.5.1.dev103__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jaxsim/__init__.py +11 -3
- jaxsim/_version.py +2 -2
- jaxsim/exceptions.py +3 -2
- {jaxsim-0.5.1.dev99.dist-info → jaxsim-0.5.1.dev103.dist-info}/METADATA +1 -1
- {jaxsim-0.5.1.dev99.dist-info → jaxsim-0.5.1.dev103.dist-info}/RECORD +8 -8
- {jaxsim-0.5.1.dev99.dist-info → jaxsim-0.5.1.dev103.dist-info}/LICENSE +0 -0
- {jaxsim-0.5.1.dev99.dist-info → jaxsim-0.5.1.dev103.dist-info}/WHEEL +0 -0
- {jaxsim-0.5.1.dev99.dist-info → jaxsim-0.5.1.dev103.dist-info}/top_level.txt +0 -0
jaxsim/__init__.py
CHANGED
@@ -8,19 +8,27 @@ def _jnp_options() -> None:
|
|
8
8
|
|
9
9
|
import jax
|
10
10
|
|
11
|
-
# Check if running on TPU
|
11
|
+
# Check if running on TPU.
|
12
12
|
is_tpu = jax.devices()[0].platform == "tpu"
|
13
13
|
|
14
|
+
# Check if running on Metal.
|
15
|
+
is_metal = jax.devices()[0].platform == "METAL"
|
16
|
+
|
14
17
|
# Enable by default 64-bit precision to get accurate physics.
|
15
18
|
# Users can enforce 32-bit precision by setting the following variable to 0.
|
16
19
|
use_x64 = os.environ.get("JAX_ENABLE_X64", "1") != "0"
|
17
20
|
|
18
21
|
# Notify the user if unsupported 64-bit precision was enforced on TPU.
|
19
|
-
if is_tpu and use_x64:
|
20
|
-
msg = "64-bit precision is not allowed on
|
22
|
+
if (is_tpu or is_metal) and use_x64:
|
23
|
+
msg = f"64-bit precision is not allowed on {jax.devices()[0].platform.upper}. Enforcing 32bit precision."
|
21
24
|
logging.warning(msg)
|
22
25
|
use_x64 = False
|
23
26
|
|
27
|
+
if is_metal:
|
28
|
+
logging.warning(
|
29
|
+
"JAX Metal backend is experimental. Some functionalities may not be available."
|
30
|
+
)
|
31
|
+
|
24
32
|
# Enable 64-bit precision in JAX.
|
25
33
|
if use_x64:
|
26
34
|
logging.info("Enabling JAX to use 64-bit precision")
|
jaxsim/_version.py
CHANGED
@@ -12,5 +12,5 @@ __version__: str
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
13
13
|
version_tuple: VERSION_TUPLE
|
14
14
|
|
15
|
-
__version__ = version = '0.5.1.
|
16
|
-
__version_tuple__ = version_tuple = (0, 5, 1, '
|
15
|
+
__version__ = version = '0.5.1.dev103'
|
16
|
+
__version_tuple__ = version_tuple = (0, 5, 1, 'dev103')
|
jaxsim/exceptions.py
CHANGED
@@ -19,8 +19,9 @@ def raise_if(
|
|
19
19
|
format string (fmt), whose fields are filled with the args and kwargs.
|
20
20
|
"""
|
21
21
|
|
22
|
-
# Disable host callback if running on
|
23
|
-
|
22
|
+
# Disable host callback if running on unsupported hardware or if the user
|
23
|
+
# explicitly disabled it.
|
24
|
+
if jax.devices()[0].platform in {"tpu", "METAL"} or os.environ.get(
|
24
25
|
"JAXSIM_DISABLE_EXCEPTIONS", 0
|
25
26
|
):
|
26
27
|
return
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.5.1.
|
3
|
+
Version: 0.5.1.dev103
|
4
4
|
Summary: A differentiable physics engine and multibody dynamics library for control and robot learning.
|
5
5
|
Author-email: Diego Ferigo <dgferigo@gmail.com>, Filippo Luca Ferretti <filippoluca.ferretti@outlook.com>
|
6
6
|
Maintainer-email: Filippo Luca Ferretti <filippo.ferretti@iit.it>, Alessandro Croci <alessandro.croci@iit.it>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
jaxsim/__init__.py,sha256=
|
2
|
-
jaxsim/_version.py,sha256=
|
3
|
-
jaxsim/exceptions.py,sha256=
|
1
|
+
jaxsim/__init__.py,sha256=OQcCxXn4BXiSvGjAatqvw5fAEVfXbxyavQZN25NEyBo,3675
|
2
|
+
jaxsim/_version.py,sha256=zdHXFLMTP9gf9Mb93H_-kwqd5cnJDwjqSFX1iUItBJ4,428
|
3
|
+
jaxsim/exceptions.py,sha256=5rYd0kGrIaq1e0WK0qMVTCkoGJtMWz_uWlVtxHbjH_A,2322
|
4
4
|
jaxsim/logging.py,sha256=STI-D_upXZYX-ZezLrlJJ0UlD5YspST0vZ_DcIwkzO4,1553
|
5
5
|
jaxsim/typing.py,sha256=7msl8t5Jt09RNYfKdPJtpjLfWurldcycDappb045Eso,761
|
6
6
|
jaxsim/api/__init__.py,sha256=8eV22t2S3UwNyCg8karPetG1dmX1VDBXkyv28_FwNQA,210
|
@@ -67,8 +67,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
67
67
|
jaxsim/utils/jaxsim_dataclass.py,sha256=TGmTQV2Lq7Q-2nLoAEaeNtkPa_qj0IKkdBm4COj46Os,11312
|
68
68
|
jaxsim/utils/tracing.py,sha256=eEY28MZW0Lm_jJNt1NkFqZz0ek01tvhR46OXZYCo7tc,532
|
69
69
|
jaxsim/utils/wrappers.py,sha256=ZY7olSORzZRvSzkdeNLj8yjwUIAt9L0Douwl7wItjpk,4008
|
70
|
-
jaxsim-0.5.1.
|
71
|
-
jaxsim-0.5.1.
|
72
|
-
jaxsim-0.5.1.
|
73
|
-
jaxsim-0.5.1.
|
74
|
-
jaxsim-0.5.1.
|
70
|
+
jaxsim-0.5.1.dev103.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
71
|
+
jaxsim-0.5.1.dev103.dist-info/METADATA,sha256=QWMkkVWOPO0aedePnBihvUEV395YxLafSFGzxnYVmVE,17938
|
72
|
+
jaxsim-0.5.1.dev103.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
73
|
+
jaxsim-0.5.1.dev103.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
74
|
+
jaxsim-0.5.1.dev103.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|