Skip to content

Commit 226be97

Browse files
authored
Merge pull request #923 from Kaggle/jax-preallocation
Disable JAX memory preallocation
2 parents 5cb6834 + fcbe1e2 commit 226be97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ fi
8888
# This is causing issue when other libraries are trying to run tests using a GPU.
8989
# See: https://www.tensorflow.org/guide/gpu#allowing_gpu_memory_growth
9090
#
91+
# Note about `XLA_PYTHON_CLIENT_PREALLOCATE`. By default, JAX preallocates 90%
92+
# of the GPU memory which is causing issues when other libraries are trying to run
93+
# tests using a GPU.
94+
# See: https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
95+
#
9196
# Note about `--hostname localhost` (b/158137436)
9297
# hostname defaults to the container name which fails DNS name
9398
# resolution with --net=none (required to keep tests hermetic). See details in bug.
@@ -98,6 +103,7 @@ docker run --rm -t --read-only --net=none \
98103
-e KAGGLE_DATA_PROXY_URL=http://127.0.0.1:8000 \
99104
-e KAGGLE_DATA_PROXY_PROJECT=test \
100105
-e TF_FORCE_GPU_ALLOW_GROWTH=true \
106+
-e XLA_PYTHON_CLIENT_PREALLOCATE=false \
101107
--hostname localhost \
102108
--shm-size=2g \
103109
-v $PWD:/input:ro -v /tmp/python-build/working:/working \

0 commit comments

Comments
 (0)