[UIL] Add scalar IR API, on-device net construction, and per-peer staging fix#506
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Device IR / LLVM-IR-facing API surface by adopting explicit suffixes for the two calling styles: C-suffixed struct-based wrappers (existing path) and a new S-suffixed scalar, struct-free API intended for Triton/LLVM IR consumers. It also expands the device IR test coverage to exercise the new scalar entry points.
Changes:
- Renames existing IR wrapper entry points to C-suffixed symbols and updates kernels/tests accordingly.
- Introduces scalar enums (
flagcxCoopKind_t,flagcxTeamKind_t) and a new S-suffixed scalar IR API (+ implementation). - Extends the device IR unit test to add S1–S6 scalar IR kernel tests and updates exported IR symbol lists.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unittest/device_api/test_device_ir.cpp | Adds scalar IR (S1–S6) test coverage and includes scalar results in overall pass/fail aggregation. |
| test/device_api/device_ir.h | Declares scalar IR (S-suffixed) kernel launchers used by unit tests. |
| test/device_api/device_ir.cu | Updates kernels to call renamed C-suffixed wrappers and adds scalar IR kernels exercising S APIs. |
| flagcx/adaptor/include/device_api/flagcx_device_enums.h | Adds scalar enum types used by the S API to avoid struct instantiation in IR. |
| flagcx/adaptor/include/device_api/flagcx_device_core.h | Exposes scalar enums via core header for shared native + IR integration. |
| bindings/ir/public_symbols.txt | Updates exported symbol list to include C/S-suffixed APIs and scalar additions. |
| bindings/ir/flagcx_device_wrapper.h | Renames wrapper declarations to C-suffixed names and adds API documentation/deprecation note. |
| bindings/ir/flagcx_device_wrapper_impl.h | Renames wrapper implementations to C-suffixed names and includes scalar IR implementations. |
| bindings/ir/flagcx_device_scalar_ir.h | Adds new struct-free scalar IR API declarations for Triton/LLVM IR users. |
| bindings/ir/flagcx_device_scalar_ir_impl.h | Implements scalar IR APIs (coop/team/barrier/net) as inline device functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3887590 to
1bbf457
Compare
e29aff8 to
20d2f65
Compare
42e904d to
ffd1fd9
Compare
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.
PR Category
UIL
PR Types
New Features
PR Description
This PR updates the Device IR / LLVM-IR-facing API surface by adopting explicit suffixes for the two calling styles: C-suffixed struct-based wrappers (existing path) and a new S-suffixed scalar, struct-free API intended for Triton/LLVM IR consumers. It also expands the device IR test coverage to exercise the new scalar entry points.