Skip to content

Add debug level to the compiler options#818

Merged
maleadt merged 3 commits into
mainfrom
tb/debug_level
Jun 2, 2026
Merged

Add debug level to the compiler options#818
maleadt merged 3 commits into
mainfrom
tb/debug_level

Conversation

@maleadt
Copy link
Copy Markdown
Member

@maleadt maleadt commented Jun 2, 2026

Instead of always relying on JLOptions(), makes it overridable. Still uses the global debug level as the default, so shouldn't impact anything.

maleadt and others added 3 commits June 2, 2026 07:52
Add a debug_level field (default the session's -g) so it is part of the compile cache key; emit_exception! and llvm_debug_info read it instead of Base.JLOptions().debug_level. Add kernel_debug_level() — the julia.gpu.debug_level intrinsic, lowered to the per-job constant by lower_debug_level! in irgen — so device code can branch on the level as a cache-keyed compile-time constant rather than the -g global.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It takes no back-end-specific argument (unlike kernel_state, which bakes in each back-end's KernelState type), so define the @generated accessor here and export it for back-end device runtimes rather than having each define a proxy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maleadt maleadt merged commit 3470709 into main Jun 2, 2026
34 of 37 checks passed
@maleadt maleadt deleted the tb/debug_level branch June 2, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant