Opt-in CUDA, CPU default - #15
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
--device cpu|cudaoniqforge trainandiqforge measure-leakage. The default stays CPU even when a GPU is present;cudaerrors if torch reports none.TrainingResult.environment(and measurement runs) recordcpuvscudaso two tables can be told apart. No GPU bit-equality is claimed.scripts/parity_gate.py, andartifacts/*.jsonstay on CPU. The parity path does not pass--device. Seed lists andnare unchanged.Why
ROADMAP optional CUDA for new measurements only. A silent GPU default would break the reproducibility promise and mix devices inside paired experiments.
How it was verified
uv run pytest tests/test_models.py tests/test_measurement.py tests/test_preflight.py— 53 passed, 2 skipped.Mutation check:
resolve_devicewas temporarily changed to pick CUDA whenevertorch.cuda.is_available().test_default_stays_cpu_even_when_cuda_is_available,test_cpu_flag_must_not_silently_use_cuda, andtest_current_environment_stamps_an_opt_in_cuda_devicewent red, then the mutation was reverted.Conventions it touches
--device cudaerrors if torch reports no CUDA; a present GPU does not change the defaultartifacts/was rewritten; the parity gate does not opt in to CUDAMade with Cursor