Run tests with CPU mode when on CPU+GPU version
See original GitHub issueI have built the package with
python build/build.py --enable_march_native --enable_mkl_dnn --enable_cuda
pip install -e build
pip install -e .
I think this should build a CPU + GPU version.
When I tried to run pytest -n 2 tests examples -W ignore
, some of the tests failed. It appeared to me that some of the functions are only support in CPU mode.
I also tried JAX_ENABLE_X64=1 JAX_NUM_GENERATED_CASES=100 pytest -n auto tests
and JAX_ENABLE_X64=0 JAX_NUM_GENERATED_CASES=100 pytest -n auto tests
, but neither of them worked.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to Stress-Test your PC the 'Creator' Way FREE! [CPU ...
How to test if your PC is working properly after you've built it? This is HOW! ... Your browser can't play this video....
Read more >How to stress test a PC to find errors and crashes - YouTube
Tutorial: Learn how to stress test a new PC build and the software involved! Start configuring your next custom gaming PC with NZXT...
Read more >Detecting Divergence Using PCAST to Compare GPU to CPU ...
PCAST helps to quickly isolate divergence between CPU and GPU results so you can isolate bugs. Parallel Compiler Assisted Software Testing ( ...
Read more >The 11 Best Tools to Stress Test Your PC (CPU, RAM, & GPU)
Hardware Monitoring Tools to Use While Running Stress Tests · 1. Core Temp · 2. GPU-Z · 3. MSI Afterburner · 4. HWiNFO64....
Read more >TensorFlow performance test: CPU VS GPU - Medium
will install tensorflow in CPU mode not optimally, ... How will mobile version of pre-Pascal GPU architecture and only 2Gb of video memory ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Setting JAX_PLATFORM_NAME is the best way to do this. You can also manually
device_put
values and/or use thebackend
argument to various functions likepmap
to run things on CPU, but the env var is the best way to set the platform globally (e.g. for performance comparisons).@mattjj So does this mean that if you want to be able to toggle using the GPU and the CPU (use case: do a performance comparison of the speedup you get with code using JAX on the GPU (without having to switch between virtual environments with two versions installed)) the preferred way of doing this is by setting the environment value? So either setting it through the Shell like you show above, or by doing
? Or is there recommended API?