Add Mapping analysis to support IR mapping. - #39
Draft
KFAFSP wants to merge 3 commits into
Draft
Conversation
Changing the ID of a resource is now a blocking operation. Additionally, calling `getOrAssign` will block before the test, meaning that it will never override the IDs of resources. Signed-off-by: Karl F. A. Friebel <karl.friebel@ibm.com>
KFAFSP
force-pushed
the
kfaf/mapping
branch
2 times, most recently
from
September 10, 2026 13:05
24879f9 to
694bd51
Compare
This new class provides a way of querying and updating the mappings of operations to architecture graph resources. It hard-codes the requirement that our programs may only refer to one device at a time. This needed some minor improvements to existing infrastructure: - Added some helpers to `MapsToAttr` to declare intent. - Changed the `DeviceOp` verifier such that the device name is not a legal Resource ID. - Changed interface of `ResourceIds` and `ResourceKinds` with built-in casting feature. Signed-off-by: Karl F. A. Friebel <karl.friebel@ibm.com>
This class provides a box-standard MLIR analysis that can be used to obtain a `ktdf_arch` Device based on the mapping of the current op. It unifies the downstream handling of obtaining the device, as well as error messaging, and canonicalizes the `DeviceRef` as the safest way for derived analyses to reference the device. Signed-off-by: Karl F. A. Friebel <karl.friebel@ibm.com>
KFAFSP
force-pushed
the
kfaf/mapping
branch
from
September 10, 2026 13:12
694bd51 to
5c82022
Compare
KFAFSP
marked this pull request as ready for review
September 10, 2026 13:30
KFAFSP
requested review from
Prasanth-Chatarasi,
acgatea1,
ani300,
bmahjour,
lupalby,
mudhakar,
viji560 and
vswagath1989
as code owners
September 10, 2026 13:30
Contributor
Author
|
This is needed for torch-spyre/dataflow-scheduler#148 and is lacking test coverage of the new features (since they are quite straight-forward and based on ones with existing coverage). |
KFAFSP
marked this pull request as draft
September 10, 2026 16:04
Contributor
Author
|
After some discussion, a better design is needed:
|
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.
This PR adds the
Mappinghelper that is used downstream to query and manipulate the mapping of mappable operations to architecture graph resources.It also adds the light weight
DefaultDeviceanalysis which streamlines downstream users and is built on the mapping annotations.