{{ message }}
feat(mcpp.plugins): 0.2.2 — each rule takes the extensions it claims - #362
Merged
Conversation
Every rule changes and no floor moves.
A rule used to take the whole of `mcpp::device_sources()`, which is the
PACKAGE's device set and not one rule's share of it. That is right for exactly
as long as a build has one rule in it, and the premise was never written down.
Measured with two rules in one build program:
cuda:scale clang -x cuda shaders/scale.comp -o scale.cu.o
mcpp.rules.spirv: src/kernels/saxpy.cu has no shader stage.
Two failures, and the quieter one is worse: the CUDA rule did not refuse the
shader, it compiled it and produced an object.
Each rule now selects by extension -- `.cu`, `.hip`, `.sycl`, the shader stages
-- and a rule whose backend the build does not name returns without complaint,
which is what lets a build program call every rule it imports unconditionally
and `--no-accel` compile nothing.
No floor moves: none of that needs a newer engine. mcpp 2026.9.6.5 adds the
engine's half -- a device source that reached no action is refused, naming the
file -- but a rule package does not require it.
Verified by the package's own CI (green on main) with a new fixture,
tests/multi-rule-consumer: one package with a `.cu` and a `.comp`, both rules in
one build program, both products asserted, and `test ! -f scale.cu.o` for the
shader that must not have been compiled as CUDA. Run on a real device as well.
Both mirrors were downloaded and compared byte for byte before this descriptor
was written; one sha256 names both.
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.

mcpp:plugins@0.2.2, andlatestmoves to it.What changed upstream
A rule used to take the whole of
mcpp::device_sources()— the package'sdevice set, not one rule's share of it. Correct for exactly as long as a build
has one rule in it. Measured with two:
The quieter failure is the worse one: the CUDA rule did not refuse the shader,
it compiled it.
Each rule now selects by extension, and a rule whose backend this build does not
name returns without complaint — which is what lets a build program call every
rule it imports unconditionally.
Floors
None move. No part of this needs a newer engine. mcpp 2026.9.6.5 adds the
engine's half (a device source that reached no action is refused, naming the
file), but a rule package does not require it.
Verification
mainat the tagged commit, including the newtests/multi-rule-consumerfixture.cmp-ed byte for byte before this descriptor waswritten; one sha256 names both.
["latest"]lines, one per platform, all pointing at 0.2.2.