We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e85bf52 commit 4179f1fCopy full SHA for 4179f1f
src/compiler/execution.jl
@@ -300,8 +300,18 @@ end
300
empty!(roots)
301
foreach(free, argument_buffers)
302
303
- # TODO: access logs here to check for errors
304
- # https://developer.apple.com/videos/play/wwdc2020/10616/
+ # Check for errors
+ if buf.status == MTL.MTLCommandBufferStatusError
305
+ err = buf.error
306
+ if err !== nothing
307
+ # Get error details
308
+ code = err.code # MTLCommandBufferError enum value
309
+ description = err.localizedDescription
310
+
311
+ # Log the error
312
+ @error "GPU kernel execution failed" exception=(err, catch_backtrace()) kernel=nameof(kernel.f) error_code=code description=description
313
+ end
314
315
end
316
317
commit!(cmdbuf)
0 commit comments