Repository navigation
Conversation
why your beast does not use |
| disable the others. It is not set if `/proc/cpuinfo` shows no | ||
| disable the others. Existing exclusions are retained and missing profile | ||
| targets appended, so wrapping a command does not re-enable excluded paths. | ||
| It is not set if `/proc/cpuinfo` shows no |
There was a problem hiding this comment.
to KISS -- shouldn't we just skip setting them at all if already defined (even if totally empty) by the caller?!
…hmagupta-jsqg3p Conflict in tests/test_basic.sh "source check output": master switched to $(...) with quoted "$out", this branch added 2>&1 since messages now go to stderr; kept both. Merged rather than rebased, since #11 is based on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0142mrYgtL7zA9zCpBtEgcxn
Previously a different preset value was overridden with a warning, which e.g. replaced an explicit MKL_CBWR=COMPATIBLE or AVX2,STRICT, or NumPy exclusions such as NPY_DISABLE_CPU_FEATURES=X86_V3 (found by @leej3 in #11). Now any of these variables already set, even to an empty value, is left as is, silently, as is NPY_DISABLE_CPU_FEATURES when NPY_ENABLE_CPU_FEATURES is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0142mrYgtL7zA9zCpBtEgcxn
yarikoptic-gitmate
left a comment
There was a problem hiding this comment.
This review checks this PR against #9, whose branch is now at da85ebd. I fetched the head of this PR: its 21 bats tests and shellcheck pass.
Confirmed. Intel's Specifying Code Branches states that "Settings other than AUTO or COMPATIBLE are available only for Intel processors", and that unsupported values silently fall back to AUTO. That matches your measurement on Unity (AMD). #9 now documents this and points to MKL_CBWR=COMPATIBLE for mixed Intel/AMD use (da85ebd). Whether the default should change to COMPATIBLE (consistent across vendors, but slower) is for @yarikoptic to decide.
Superseded by #9 (216b22d). Following @yarikoptic's KISS suggestion, reproseed now leaves any of its CPU variables alone if the caller has already set it, even to an empty value. That preserves MKL_CBWR=AVX2,STRICT or COMPATIBLE, and the caller's NumPy exclusions such as X86_V3. It needs no allow-list, no warning, and no merging into NPY_DISABLE_CPU_FEATURES; merging also changed the caller's value. The reproseed.sh and test changes here are therefore no longer needed, and they now conflict.
Worth keeping, as a docs-only change rebased onto #9:
- The MKL reproducibility conditions:
MKL_DYNAMIC=FALSE/OMP_DYNAMIC=FALSE, and strict CNR. Both match Intel's Reproducibility Conditions. - The oneDNN
ONEDNN_ENABLE_MAX_CPU_ISAnote. It defaults toON, so "takes effect only when built withONEDNN_ENABLE_MAX_CPU_ISA=ON" reads as if it were opt-in. Something like "unless built withONEDNN_ENABLE_MAX_CPU_ISA=OFF" would be clearer. - The scope wording ("does not guarantee identical results …").
Style nits for that rebase:
- In
docs/cpu-features.md, the "Except for the NumPy exclusions …" paragraph is a single long line; please wrap it to about 72 columns like the rest of the file. [mkl-cnr]should go into the sorted block of link definitions, without a blank line before it.- New tests should use tabs, as
tests/test_basic.shdoes.
Generated by Claude Code
AI draft - not reviewed by John
PR 11 targets PR 9's branch. Under PR 9's x86-64-v3 profile, an explicit
MKL_CBWR=AVX2,STRICTorCOMPATIBLEis replaced withAVX2. On an AVX512 host, PR 9 also replaces existing NumPy exclusions such asNPY_DISABLE_CPU_FEATURES=X86_V3.PR 11 preserves explicit
MKL_CBWRvalues, warns for unverified/out-of-profile values, and appends missing NumPy exclusions without duplicate growth. PR 11 retains AVX2 as the default whenMKL_CBWRis unset; it does not make COMPATIBLE the default. The documentation changes describe these exceptions, qualify the scope as configuring supported libraries, and link MKL reproducibility conditions and oneDNN's build dependency.Recorded experiments use a pinned Pixi environment, DataLad run/rerun, and published arrays on Typhon and Smaug (Intel) and Unity cpu053 (AMD EPYC 7763). The recorded
candidate-reproseed.shis byte-for-byte identical toreproseed.shat PR 11 commit51d4c3578fe3bb43aeae87a29c5768a2cc53c4fd(Git blobd12fc032648e047d19e225cc32c32a9b44eba9fd).strict_fixedbenchmark preserves AVX2,STRICT and restores the direct results.numpy_fixedbenchmark matches manually supplying the combined exclusion list. On Typhon, PR 9's replacement and PR 11's merge produce different float32 exp/log/sin outputs; runtime metadata confirms that only the merge retains the X86_V3 exclusion.prbenchmark), all ten tested arrays match between Typhon and Smaug at each fixed thread count (1, 2, or 4). Comparing either Intel host with Unity at the same thread count, the four MKL products differ and the six NumPy/OpenBLAS arrays match. With an explicitMKL_CBWR=COMPATIBLEpreserved by PR 11 (compatible_fixedbenchmark), all ten arrays match across the three hosts at each fixed thread count. This supports preserving the user's explicit COMPATIBLE choice. It does not establish agreement across different thread counts or untested workflows, and no performance tradeoff was measured.Validation: ShellCheck passes; all 21 Bats tests pass on Linux. Added tests cover STRICT/COMPATIBLE preservation, a warning for AVX512, NumPy merge idempotence, and native preservation. No numerical-library dependencies are added to reproseed's shell tests.