Repository navigation
native: Drama 3's CUDA settings get table rows, so its open no longer panics - #2658
Merged
Merged
Conversation
… panics 6a1feb2 sent cuda_device.setting through the strict environment table. TF_DRAMA_PREFILL_ROWS and TF_DRAMA_REFERENCE_CACHE had no rows, so every CUDA Drama 3 open reached rule()'s "unregistered strict environment parser" panic, set or not. Both get .u32 rows trimmed of spaces, as their old reader was, in a new drama3 scope that the startup check leaves alone; drama_open keeps its own bounds and messages. setting() now takes its name at compile time and the build stops on a name with no row, so this cannot recur through it. Text of only tabs or line breaks, which the old reader refused, now reads as unset like every other table setting; docs/environment.md says so.
This was referenced Nov 9, 2026
ashhart
force-pushed
the
lead/drama-env-rows
branch
from
November 9, 2026 07:55
27fe9c1 to
83bea7d
Compare
4 of 8 tasks
ashhart
added a commit
that referenced
this pull request
Nov 9, 2026
…the backend gate GLM's env_defaults_test module takes core and canon beside cuda and heat, as main's GLM CUDA module has them: Settings.read now reaches cuda_l2pf.zig and the weight, format and shard files that import them. Drama's two settings read through the environment table since #2658, so a word in TF_DRAMA_PREFILL_ROWS is refused with the table's text, which the pin now expects; a new pin covers TF_DRAMA_REFERENCE_CACHE's default and its refusal past 16, and the table cases add the values only drama_open bounds. The flag-deps pin parsed --backend mlx everywhere, but off macOS a test root's build serves auto and cuda (cli.zig backend_values), so it failed on Linux; it now takes each build's own backend and refuses the other.
ashhart
added a commit
that referenced
this pull request
Nov 9, 2026
…the backend gate GLM's env_defaults_test module takes core and canon beside cuda and heat, as main's GLM CUDA module has them: Settings.read now reaches cuda_l2pf.zig and the weight, format and shard files that import them. Drama's two settings read through the environment table since #2658, so a word in TF_DRAMA_PREFILL_ROWS is refused with the table's text, which the pin now expects; a new pin covers TF_DRAMA_REFERENCE_CACHE's default and its refusal past 16, and the table cases add the values only drama_open bounds. The flag-deps pin parsed --backend mlx everywhere, but off macOS a test root's build serves auto and cuda (cli.zig backend_values), so it failed on Linux; it now takes each build's own backend and refuses the other.
ashhart
added a commit
that referenced
this pull request
Nov 9, 2026
…the backend gate GLM's env_defaults_test module takes core and canon beside cuda and heat, as main's GLM CUDA module has them: Settings.read now reaches cuda_l2pf.zig and the weight, format and shard files that import them. Drama's two settings read through the environment table since #2658, so a word in TF_DRAMA_PREFILL_ROWS is refused with the table's text, which the pin now expects; a new pin covers TF_DRAMA_REFERENCE_CACHE's default and its refusal past 16, and the table cases add the values only drama_open bounds. The flag-deps pin parsed --backend mlx everywhere, but off macOS a test root's build serves auto and cuda (cli.zig backend_values), so it failed on Linux; it now takes each build's own backend and refuses the other.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since 6a1feb2 (in 1.2.5),
cuda_device.settingreads through the strict environment table.TF_DRAMA_PREFILL_ROWSandTF_DRAMA_REFERENCE_CACHEhad no rows. So every CUDA Drama 3 open reachedrule()'s "unregistered strict environment parser" panic, whether or not either variable was set (drama_open.zig:44,50→cuda_device.setting→environment.parse→rule).The change
.u32rows trimmed of spaces, as their old reader was.drama3scope, which the startup check doesn't include.drama_openkeeps its own bounds (1 through 1024 rows; 0 through 16 entries) and its own messages.setting()now takes its name at compile time.environment.registeredstops the build on a name with no row, so this can't recur throughsetting.docs/environment.mdsays so, next to the Gemma 4 exception.Checked
test-environment-host,test-environment-report-hostandcheck-native-cuda-host(the Linux CUDA server, compiled on macOS) pass.TF_DRAMA_PREFILL_ROWSrow removed,check-native-cuda-hoststops withTF_DRAMA_PREFILL_ROWS has no row in platform/environment.zig.check-drama-cuda-hostdoes not reachdrama_open.zig, so the server compile is the one that guards it.Thanks to @Bizuayeu for #2591, which set out the table's blank-text convention this follows.