Conversation
Replace the compile-time `nassau` feature flag with a single `QueryModuleResolution` enum that dispatches to either the standard or Nassau algorithm at runtime. Key changes: - `nassau::Resolution` no longer has a type parameter; it now uses `SteenrodAlgebra`/`CCC` types externally, matching the standard resolution's associated types. A `milnor_algebra()` helper extracts `&MilnorAlgebra` internally for algorithm-specific operations. - `QueryModuleResolution` enum (Standard/Nassau) implements `ChainComplex` and `AugmentedChainComplex` via a `delegate!` macro, picking up the `FreeChainComplex` blanket impl automatically. - `construct()` auto-detects Nassau when: Milnor basis, p=2, finite dimensional module, no profile, no cofiber, and a save directory is provided. Without a save directory, standard is used to preserve in-memory quasi-inverse support for `ResolutionHomomorphism` and `SecondaryResolution`. - All `#[cfg(feature = "nassau")]` blocks removed from examples and utilities. - Nassau benchmark files deleted (standard benchmarks now cover them). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JoeyBF
added a commit
that referenced
this pull request
Sep 13, 2026
`MATRIX_GROUP x TERM_GROUP` was last closed by arguing from the loop's instruction mix that a wider tile amortises more `col_sums`/`masks` loads per pair. It does -- and it is slower anyway. ncu over one whole replayed frontier batch (the same 463 089 captured products through every arm, clocks locked, the 2x3 arm repeated and reproducing to 0.005%): 2x2 56 regs 9.310e11 inst 2.2904e9 cycles 15.6% slower 2x3 63 regs 7.744e11 inst 1.9821e9 cycles -- 3x3 76 regs 6.844e11 inst 2.0331e9 cycles 2.6% slower 4x2 64 regs 7.090e11 inst 2.0643e9 cycles 4.1% slower 4x3 80 regs 6.071e11 inst 2.0894e9 cycles 5.4% slower Above 2x3 instructions and time move in OPPOSITE directions: 4x3 issues 21.6% fewer instructions and takes 5.4% longer. The discriminator is registers -- 63 and 64 both fit four 256-thread blocks per SM, 76 and 80 only three -- so the amortisation argument was measuring the wrong quantity. What a wider tile removes is address arithmetic that already overlapped with the loads it serves. The comparison has to be per whole BATCH, not per launch: the tile changes threads per product, so it changes both how a batch is grouped into blocks (5 at 2x3, 3 at 4x3, 7 at 2x2) and how each block is chunked at 2^31 threads. "Launch #4" is different work for two tiles, and `pairs` in the `[launch]` log is a thread count, not a product count. No code change; 2x3 stays. Recorded so the next tile question is answered by reading the table. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuauwDGczEvcusxMZB8Vvs
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
nassaufeature flag with aQueryModuleResolutionenum that dispatches to the standard or Nassau algorithm at runtimenassau::Resolutionnow usesSteenrodAlgebra/CCCtypes externally (matching the standard resolution's associated types), with amilnor_algebra()helper for internal algorithm operationsconstruct()auto-detects Nassau when conditions are met (p=2, Milnor, finite-dimensional, no profile/cofiber) and a save directory is provided; without a save dir, standard is used to preserve in-memory quasi-inverse support#[cfg(feature = "nassau")]blocks removed from examples, utilities, and testsTest plan
make lintpassesmake testpasses (all lib, integration, doc, and pytest tests)make benchmarkspasses (output unchanged)cargo test --test milnor_vs_nassauconfirms nassau and standard produce identical output🤖 Generated with Claude Code