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
Ipython and jupyter notebook keep failing while testing jax #7239
Comments
This means that JAX could not find |
The same thing happened to me when I was running the following code in Jupyter (with VScode), whereas the code works well in the terminal: # test random from jax
key = jrd.PRNGKey(0)
x = jrd.normal(key, (10,))
print(x) Here is the error: 2022-12-03 10:15:18.889345: E external/org_tensorflow/tensorflow/compiler/xla/stream_executor/gpu/asm_compiler.cc:114] *** WARNING *** You are using ptxas 10.1.243, which is older than 11.1. ptxas before 11.1 is known to miscompile XLA code, leading to incorrect results or invalid-address errors.
2022-12-03 10:15:18.890789: W external/org_tensorflow/tensorflow/compiler/xla/stream_executor/gpu/asm_compiler.cc:231] Falling back to the CUDA driver for PTX compilation; ptxas does not support CC 8.6
2022-12-03 10:15:18.890811: W external/org_tensorflow/tensorflow/compiler/xla/stream_executor/gpu/asm_compiler.cc:234] Used ptxas at ptxas
2022-12-03 10:15:18.892319: E external/org_tensorflow/tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:628] failed to get PTX kernel "shift_right_logical" from module: CUDA_ERROR_NOT_FOUND: named symbol not found
2022-12-03 10:15:18.892343: E external/org_tensorflow/tensorflow/compiler/xla/pjrt/pjrt_stream_executor_client.cc:2153] Execution of replica 0 failed: INTERNAL: Could not find the corresponding function No idea why. The weird thing is that it runs in the jupyter when you open the file via the command line |
The python environment used by Jupyter, by VSCode, and by your command-line are not necessarily the same. I'd run this in all cases: import sys
print(sys.executable) I suspect the executables are different, and that JAX is incorrectly installed for the executable used by VSCode. |
Thanks for your reply @jakevdp I just ran I think it is because of VScode using different environment path and JAX cannot search for the right cuda. |
Solve it with Docker Container, here is how you can set it up: https://github.com/oceanumeric/cuda-container-vscode |
There is another way to make it work: within virtual environment,
This will make sure everything running will be within the virtual environment (this avoids the case that VS Code Jupyter extension is installed globally when you launch the project). |
python version 3.6.10
cuda version 11
jax version '0.2.17'
gcc 7.3.0
Error obtained
2021-07-10 19:06:52.914859: W external/org_tensorflow/tensorflow/stream_executor/gpu/asm_compiler.cc:77] Couldn't get ptxas version string: Internal: Couldn't invoke ptxas --version
2021-07-10 19:06:52.915444: F external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:480] ptxas returned an error during compilation of ptx to sass: 'Internal: Failed to launch ptxas' If the error message indicates that a file could not be written, please verify that sufficient filesystem space is provided.
Aborted (core dumped)
The text was updated successfully, but these errors were encountered: