Repository navigation
fix(test): respect cuda device visibility in aime memory probe - #821
Merged
Merged
Conversation
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.
Summary
Extracted from #797 at the reviewer's request (review). This PR only changes the generic AIME gate's GPU free-memory probe.
The CUDA path parses the first
CUDA_VISIBLE_DEVICESentry as an integer and then matches an NVML /nvidia-smiindex. A GPU UUID raisesValueError, and CUDA device ordering can differ from NVML ordering.Query
torch.cuda.mem_get_info(0)in a child process on CUDA, as the ROCm path already does. Logical device zero follows the child's inherited visibility and ordering; the subprocess exits before engine creation, so the parent does not gain an initialized CUDA context from this probe. Remove the now-unused integer-only helper.Validation provenance
This is the exact change previously exercised in #797 at
711a86ef11c67bbe6c69ff59370594f64c6ef1b8. The existing AIME gate passed on an RTX 3060 selected by UUID. The failing integer conversion can be read directly in the old helper; no separate before/after runtime reproduction was recorded.The new branch is based on
mainat32056cf4608b07c21afc45fa510c74fba67dcf17and contains only this harness change. Tests were not rerun after extraction. The historical Flint run below also required the Flint model support in #797; it is not a claim that unmerged Flint support exists on this independent branch. ROCm and alternate numeric CUDA ordering were not separately exercised locally.Environment and historical command
PYTHONPATH=pythonin an isolated uv-created venv. Native extensions (including ggml-cpu variants) and prebuilt kernels were reused fromfreetoken 0.2.0+gfe5a5ec9c/freetoken-kernel-cache 0.2.0+cu130.gfe5a5ec9c. No clean native-extension/CUDA build was performed for this revision; this PR changes no C++/CUDA source.FutureMLS-Lab/flint-nvfp4-coldgptq56f37fcfc7bd17834512ec2e53696b8da15f3658RecursiveSI/flint-nvfp4-gguf,flint-nvfp4.gguf6ec43e19b565fc8d560e2d04985d7724f20673bfRecursiveSI/flintreference config/tokenizer2a247be0c0aec895ccb0ac7ca92229ec6df37288Commands below ran from the source checkout; the sibling venv/checkpoint paths reflect the local validation layout:
Historical AIME result
Dataset:
math-ai/aime25, revision563bb8404243c5f09de6ec262f2db674fe5bce9b,test.jsonl; convertproblemto the gate'spromptkey and preserveanswerand row order. AIME 2025 problem 1, pass@3, 8192-token maximum per sample. This is one problem, not an AIME-suite accuracy claim. Sampling comes from the checkpoint: temperature 1.0, top-p 0.95, top-k 20.Result:
1 passed, 1 warning in 61.45s; existing CUDA allocator deprecation warning.Implementation and local test execution were assisted by Codex.