Skip to content

Commit

Permalink
Add error reporting to command buffer completion handler (#521)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Besard <[email protected]>
  • Loading branch information
vovw and maleadt authored Feb 3, 2025
1 parent 1b811cb commit ca092c8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/compiler/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,14 @@ end
empty!(roots)
foreach(free, argument_buffers)

# TODO: access logs here to check for errors
# https://developer.apple.com/videos/play/wwdc2020/10616/
end
# Check for errors
# XXX: we cannot do this nicely, e.g. throwing an `error` or reporting with `@error`
# because we're not allowed to switch tasks from this contexts.
if buf.status == MTL.MTLCommandBufferStatusError
Core.println("ERROR: Failed to submit command buffer: $(buf.error.localizedDescription)")
end

end
commit!(cmdbuf)
end

Expand Down

0 comments on commit ca092c8

Please sign in to comment.