Skip to content

0.21.0: CMake cross contracts and owned accelerator targets - #52

Merged
Sunrisepeak merged 24 commits into
mainfrom
wip/deps-cmake-contract
Nov 8, 2026
Merged

Sunrisepeak merged 24 commits into
mainfrom
wip/deps-cmake-contract

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

mcpp-plugins 0.21.0. Tracks mcpp-community/mcpp#885 (design 2026-11-07, §4.3) and closes #887 on release.

Changes

  • CMake cross contracts. A CMake cross build consumes the engine's compiler, flags, archiver and target contract when the action runs; a subproject installs a static library and an independent executable links it (tests/cmake-cross).
  • Owned accelerator targets. Accelerator rules read complete, brace-aware requests and match exact implementation names. SYCL owns its code targets: sycl+{nvptx64-sm_89,nvptx64-sm_90} emits both NVIDIA images, sycl+{spir64,nvptx64-sm_89} emits SPIR-V beside NVIDIA; the CUDA toolkit is requested only for SYCL NVIDIA targets; the older target-inheritance spelling is accepted with a migration warning; unknown SYCL targets and unavailable AMD routes are refused. CUDA, HIP and Vulkan share the reader.
  • Optional action progress. plugins-progress provides an atomic, rate-limited worker writer; CMake reports its configure and build-install stages and continues when the channel is absent or unwritable. The worker reads the channel through the UTF-8 environment API (Windows ACP 1252 verified).
  • Incremental correctness. Object-surface assembly records payload content, so restat does not hide a changed payload behind an unchanged .incbin path.
  • The system through modules. No unit includes a header or branches in the preprocessor (CI refuses both). A member asks a program for a fact through mcpp::plugins::tool::capture (its arguments as a vector, no shell); the CUDA rule opens the driver through mcpplibs::os::library; the test kit states each case's environment in its spawn options instead of writing its own; a platform difference of the building machine is if constexpr (mcpplibs::os::is_windows), so every host compiles every branch. mcpplibs.os (exactly 0.4.0, the release mcpp names) is a dependency of plugins-core and plugins-progress. docs/plugin-development.md §4 states the rule and the route for a C macro (mcpplibs.mwrap.libc).

Verification

  • 50 plugin-logic cases; the CMake musl cross build and run; SYCL consumers in legacy, owned NVIDIA, multi-architecture and mixed forms, with the device images inspected; a dual-rule CUDA sm_90 + SYCL sm_89 consumer. GPU execution is not qualified (local driver: CUDA error 803).
  • all-rules-compile, embed-consumer, embed-module-consumer, plugin-logic and island-interface build with the C-library change.

Release pins

  • CI builds with the published mcpp 2026.11.7.1 on every lane; cross subprojects that link need it.
  • Dependencies are exact releases named by identity (mcpplibs.os = "0.4.0").

SYCL libraries of several NVIDIA architectures

Each package's device link reads its own objects, so a library built for sycl+{nvptx64-sm_89,nvptx64-sm_90} links into a program with each image its own architecture's; tests/sycl-library-consumer builds it in CI and inspects the images. Not supported, and documented with the workaround: handing the SDK an archive of several NVIDIA architectures to device-link (a prebuilt SYCL .a, or a kernel calling another package's SYCL_EXTERNAL function) -- DPC++ 7.1.0's offload bundler matches its five-part bundle IDs to every NVPTX request (mcpp#899, an SDK defect).

Sunrisepeak and others added 5 commits October 30, 2026 01:40
…e's contract

When the build's target is not the machine, the subproject is configured with
the compilers, words and archiver of the engine's contract for the
configuration (${mcpp.contract}, mcpp 2026.10.30.1+), read when the action
runs, under Ninja; CMAKE_SYSTEM_NAME is the target's system and the
try-compile builds a static library. The package needs mcpp 2026.10.30.1.

Co-authored-by: speak-agent <[email protected]>
…e whole list of an older engine

mcpp 2026.10.27.1 lists zip and single-file among the built-in formats.

Co-authored-by: speak-agent <[email protected]>
@Sunrisepeak Sunrisepeak changed the title 0.21.0: deps-cmake compiles a cross build's subproject from the engine's contract 0.21.0: CMake cross contracts and owned accelerator targets Nov 4, 2026
Sunrisepeak and others added 13 commits November 6, 2026 18:24
2026.11.7.1 keeps the consumer's link inputs out of a foreign build's contract,
which the cmake-cross fixture's independent executable needs; the docs named the
unreleased 2026.11.5.2.

Co-authored-by: speak-agent <[email protected]>
…upported

DPC++ 7.1.0's offload bundler matches five-part bundle IDs to every NVPTX
request (intel/llvm#23767, mcpp#899).

Co-authored-by: speak-agent <[email protected]>
The library's device link reads its own objects, so a consumer never asks
the SDK to unbundle an archive of several architectures; the documented
limitation is narrowed to a prebuilt multi-architecture archive or a
cross-package SYCL_EXTERNAL call (mcpp#899), with its workaround.

Co-authored-by: speak-agent <[email protected]>
…r, no preprocessor branch

The rules and dist members ask programs for facts through mcpp::plugins::tool::capture
(argv, no shell), the CUDA rule opens the driver through os::library, the test kit states
each case's environment in its spawn options, and platform differences are if constexpr.
CI refuses an #include or #if in a unit.

Co-authored-by: speak-agent <[email protected]>
…nnot read back from an importer

Co-authored-by: speak-agent <[email protected]>
…est the collection loads on

Co-authored-by: speak-agent <[email protected]>
@Sunrisepeak
Sunrisepeak merged commit 06729d4 into main Nov 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant