Skip to content

Commit

Permalink
Pin JAX version to use old CPU runtime (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler authored Jan 29, 2025
1 parent 5145025 commit e6f7ab0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 0.6.0

### Pin of JAX version

Installing `Jaxley` will no longer install the newest version of `JAX`. We realized that, on CPU, with version `jax==0.4.32` or newer, simulation time in `Jaxley` is 10x slower and gradient time is 5x slower as compared to older versions of JAX. Newer versions of `JAX` can be made equally fast as older versions by setting `os.environ['XLA_FLAGS'] = '--xla_cpu_use_thunk_runtime=false'` at the beginning of your jupyter notebook (#570, @michaeldeistler).

### New Features

- Add ability to record synaptic currents (#523, @ntolley). Recordings can be turned on with
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ requires-python = ">=3.10"
readme = "README.md"
keywords = ["neuroscience", "biophysics", "simulator", "jax"]
dependencies = [
"jax",
# See #571 for the pin on the JAX version. Jaxley runs with newer versions of JAX
# but is much slower on CPU. Newer versions can be made equally fast by setting
# `os.environ['XLA_FLAGS'] = '--xla_cpu_use_thunk_runtime=false'` at the beginning
# of a jupyter notebook.
"jax <= 0.4.31",
"matplotlib",
"numpy",
"pandas>=2.2.0",
Expand Down Expand Up @@ -77,4 +81,4 @@ profile = "black"
[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["*"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)

0 comments on commit e6f7ab0

Please sign in to comment.