Skip to content

Commit a601696

Browse files
maleadtclaude
andcommitted
Report device out-of-memory conditions
Print the out-of-memory error GPUCompiler's `gc_pool_alloc` reports when `malloc` returns null, as CUDA.jl does, instead of letting the work-item exit silently after exhausting its heap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fy9hCZkRFuf9fbRQNagCxf
1 parent b84ea97 commit a601696

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/device/runtime.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function malloc(sz::Csize_t)
6565
end
6666

6767
function report_oom(sz)
68+
@println("ERROR: Out of dynamic GPU memory (trying to allocate ", sz, " bytes)")
6869
return
6970
end
7071

0 commit comments

Comments
 (0)