Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Actually test error throwing for lsvqr #604

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Actually test error throwing for lsvqr #604

merged 1 commit into from
Apr 13, 2020

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Feb 24, 2020

Can't test mismatched dimensions if the GPU doesn't know about them

@kshyatt kshyatt requested a review from maleadt February 24, 2020 15:34
@maleadt
Copy link
Member

maleadt commented Feb 24, 2020

CUBLAS_STATUS_ALLOC_FAILED -- these calls allocate? the calls should be wrapped in an @allocates like some CURAND calls are.

@kshyatt
Copy link
Contributor Author

kshyatt commented Feb 24, 2020

Oh, yeah, because they are making copies. Sorry about that.

@maleadt
Copy link
Member

maleadt commented Feb 24, 2020

Basically this but with a different code:

macro allocates(ex)
quote
CuArrays.extalloc(check=err->err.code == CURAND_STATUS_ALLOCATION_FAILED) do
$(esc(ex))
end
end
end

@maleadt
Copy link
Member

maleadt commented Feb 24, 2020

Also, if you know how much memory the call would probably allocate, pass that as the nb kwarg. Otherwise we might end up deallocating all cached memory.

@maleadt
Copy link
Member

maleadt commented Apr 13, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 13, 2020

Build succeeded

@bors bors bot merged commit a1a4dc0 into master Apr 13, 2020
@bors bors bot deleted the ksh/sparsesolver branch April 13, 2020 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants