Skip to content
Snippets Groups Projects
Unverified Commit 5e3865cf authored by Benjamin Cumming's avatar Benjamin Cumming Committed by GitHub
Browse files

Fix thread-GPU affinity bug. (#656)

Ensure that all threads use the same GPU, which wasn't the case before.

* add `gpu_context::set_gpu()` method that will set all subsequent GPU calls from the calling thread run on the GPU of `gpu_context`.
* `fvm_lowered_cell_impl` now calls the `set_gpu` method on construction and `advance`.
* Also changed GPU memory allocation errors in `arb::memory` to throw `arb_exception` instead of calling `std::terminate` on error. Now errors due to poor GPU configuration can be caught by the calling application, and unit tests fail gracefully and allow other tests to run.

Fixes #655 
parent af15856d
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment