Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle MTLCommandBuffer Error Logs #510

Open
tgymnich opened this issue Dec 25, 2024 · 2 comments
Open

Handle MTLCommandBuffer Error Logs #510

tgymnich opened this issue Dec 25, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@tgymnich
Copy link
Member

Access logs to check for errors.

Relevant TODO:

# TODO: access logs here to check for errors
# https://developer.apple.com/videos/play/wwdc2020/10616/

@tgymnich tgymnich added the good first issue Good for newcomers label Dec 25, 2024
@vovw
Copy link

vovw commented Jan 10, 2025

taking a shot at this, do i need to handle all the error cases?

  • Timeout errors (kernel took too long)
  • Page faults
  • Out of memory conditions
  • Invalid resource access
  • Stack overflows
  • Access revocation
  • Other unspecified errors

also each check should be a simple

    if error.code == MTL.Timeout
                @error "GPU kernel timed out" kernel_name=nameof(kernel.f)

like so?

@maleadt
Copy link
Member

maleadt commented Jan 10, 2025

Maybe it's sufficient to just render the NSError with @error "GPU kernel failure" exception=(the_nserror, a_backtrace)? You probably can't throw from within that context, but some information will be needed to identify the specific launch that failed, so it'll need some experimentation to make this useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants