Skip to content

Commit

Permalink
Provide workaround for kernel ridge solver (#5064)
Browse files Browse the repository at this point in the history
Authors:
  - William Hicks (https://github.com/wphicks)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #5064
  • Loading branch information
wphicks authored Dec 8, 2022
1 parent b82e24b commit aba6889
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/cuml/kernel_ridge/kernel_ridge.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def _safe_solve(K, y):
err_mode = geterr()["linalg"]
seterr(linalg="raise")
dual_coef = lapack.posv(K, y)
# Perform following check as a workaround for cusolver issue to be
# fixed in a future CUDA version
if cp.all(cp.isnan(dual_coef)):
raise np.linalg.LinAlgError
seterr(linalg=err_mode)
except np.linalg.LinAlgError:
warnings.warn(
Expand Down

0 comments on commit aba6889

Please sign in to comment.