Skip to content

Commit 0e74f2b

Browse files
authored
Merge pull request #1848 from valtron/patch-2
Fix `_psd_safe_cholesky` on CUDA
2 parents 7289e7d + 101d372 commit 0e74f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpytorch/utils/cholesky.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _psd_safe_cholesky(A, out=None, jitter=None, max_tries=3):
1919
settings.verbose_linalg.logger.debug(f"Running Cholesky on a matrix of size {A.shape}.")
2020

2121
if out is not None:
22-
out = (out, torch.empty(A.shape[:-2], dtype=torch.int32))
22+
out = (out, torch.empty(A.shape[:-2], dtype=torch.int32, device=out.device))
2323

2424
L, info = torch.linalg.cholesky_ex(A, out=out)
2525
if not torch.any(info):

0 commit comments

Comments
 (0)