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

Commit c3d02fc

Browse files
committed
Fix CURAND OOM checker.
1 parent 05c864c commit c3d02fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rand/wrappers.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ version() = VersionNumber(curandGetProperty(CUDAapi.MAJOR_VERSION),
1212

1313
macro allocates(ex)
1414
quote
15-
CuArrays.extalloc(check=err->err.code == CURAND_STATUS_ALLOCATION_FAILED) do
15+
CuArrays.extalloc(check=err->isa(err, CURANDError) &&
16+
err.code == CURAND_STATUS_ALLOCATION_FAILED) do
1617
$(esc(ex))
1718
end
1819
end

0 commit comments

Comments
 (0)