MCS Fast match pathway - #238
Open
scal444 wants to merge 4 commits into
Open
Conversation
There is exactly one topology representation. The QueryTopology / TargetTopology template parameters and the kHasAdjacencyBondIndices trait made it look like there were two, but the only type that ever set the trait false was a test double -- production code has always passed a CSR view with all four arrays populated. The trait dates from when the CSR-adjacency scan was added on top of the original linear bond-endpoint scan and the old path was kept alive behind `if constexpr`. Both paths now land together, so the fallback was dead on arrival: each `else` branch held a verbatim copy of the adjacency loop under a runtime null-check plus a linear scan nothing reaches. Hoist DeviceCsrView into a new fmcs_topology.cuh (along with the bond endpoint pack/unpack constants, which fmcs_grow.cuh had been duplicating), take it concretely in matchSingleBondWithinThread, matchIncrementalFastCooperative, and fillNewBondsCooperative, and delete the trait with both fallback branches. fmcs_match.cuh drops from 453 to 321 lines with no behaviour change. The match tests relied on the fallback -- they never populated CSR at all -- so they now build real CSR arrays via a TestGraph helper and exercise the path that actually ships.
Contributor
|
| Filename | Overview |
|---|---|
| src/mcs/fmcs_cuda/fmcs_match.cuh | Adds single-bond matching, incremental cooperative matching, and fallback scratch storage. |
| src/mcs/fmcs_cuda/fmcs_grow.cuh | Switches growth topology handling to DeviceCsrView and documents callback fallback responsibilities. |
| src/mcs/fmcs_cuda/fmcs_topology.cuh | Defines shared bond-endpoint encoding constants and the device CSR topology view. |
| tests/test_fmcs_match.cu | Adds CUDA unit coverage for single-bond and incremental greedy matching behavior. |
| tests/test_fmcs_grow.cu | Updates growth tests to construct the new DeviceCsrView type. |
| tests/CMakeLists.txt | Registers and links the new FMCS matching test executable. |
Reviews (2): Last reviewed commit: "Clarify greedy fMCS match contract" | Re-trigger Greptile
Collaborator
Author
|
Towards #221 |
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.
Attempts a quick match of a seed before falling back to (not yet implemented) full substructure search.