-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Metal logging #2904
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
base: main
Are you sure you want to change the base?
Metal logging #2904
Conversation
awni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thank you!
b50c82a to
32c1a60
Compare
| #include <metal_logging> | ||
| #include <metal_math> | ||
|
|
||
| constant os_log logger("mlx", "binary_ops"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test failed building for macOS 14 cause this API is not available. It might make sense to make a stub for lower version so we don't have to use ifdef everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks — I added a no-op os_log stub for older macOS/SDKs
Proposed changes
-fenable-metal-loggingandsetEnableLogging(true)(for JIT) to enableos_logfor debug build.os_log.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes