Add a mutex in cuda_solvers GetrfImpl. (#14492)
* Add a mutex in cuda_solvers GetrfImpl. The NVIDIA documentation claims the cuSolverDn functions are thread-safe. However, issue #13558 gives an example of code where two threads simultaneously call GetrfImpl and a segmentation fault occurs. Although one can not prove the bug is in the NVIDIA code, this is most likely the case. Note that GetrsImpl was already protected by a lock for a similar reason. * Revert changes to cuda_solvers. The mutex was already added by a different commit.
This commit is contained in:
parent
c17d085f34
commit
3629fc4e98
@ -210,7 +210,7 @@ class MatrixInverseOpGpu : public AsyncOpKernel {
|
||||
done);
|
||||
}
|
||||
} else {
|
||||
// For large matrices, we wompute the inverse of each matrix in the batch
|
||||
// For large matrices, we compute the inverse of each matrix in the batch
|
||||
// sequentially. Here we use the cuSolver methods GETRF/GETRS because they
|
||||
// are MUCH faster than their batched cuBlas equivalents for large
|
||||
// matrices.
|
||||
|
Loading…
Reference in New Issue
Block a user