Repository navigation
[Loom] Separate external resource effects from memory reports - #1316
Merged
Merged
Conversation
Low read and write effects describe either memory or external resources, with the memory-space attachment carrying that distinction. Teach descriptor classification, source-memory propagation, footprint summaries, verification, and compile reporting to consume that shared fact while leaving scheduling effects intact. Focused descriptor and reporting coverage keeps real unknown-width accesses visible and proves attachment-free effects do not become memory traffic.
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.
Compile reports now count a read or write as memory traffic only when the effect carries a memory-space attachment. Attachment-free effects continue to model external resources for scheduling and result lifetime, but no longer appear as generic memory operations or unknown-width transfers.
AMDGPU counter-returning instructions expose the distinction directly. For example,
s_sendmsg_rtn_b32reads its completion counter without aliasing memory:Its generated effect has
memory_space=NONE. Previously, descriptor classification and traffic aggregation looked only atREADorWRITE, so a clock query became both a generic memory instruction and an unknown-width memory read.One attachment contract
The authored and runtime descriptor models now expose the same
is_memory_accesspredicate: an effect is a memory access when it is a read or write with a non-NONEmemory space. Memory-specific consumers use that fact for:Dependency construction, scheduling traits, wait planning, and storage leases continue to consume the underlying external-resource effect. The counter read therefore retains its ordering and completion behavior. No opcode-specific reporting exception is needed, and real memory effects with unknown widths remain visible.
Report behavior
The reduced clock witness and a representative resident kernel remove exactly the attachment-free counter reads while preserving measured byte traffic:
Both witnesses emit byte-identical HSACO before and after the change, confirming that the correction is confined to classification and reporting.
Coverage
Descriptor compiler tests distinguish external effects from attached memory effects and require actual memory for load, store, and atomic classes. Lowering contract coverage proves that only attached reads propagate source-memory flags. Shared C descriptor and compile-report tests mix external reads and writes with known- and unknown-width memory accesses, ensuring that real traffic remains accounted for while external resources stay out of the totals.
Reviewer Notes
The key boundary is intentional: memory-only consumers call the shared attachment predicate, while scheduling and dependency consumers retain the raw
READandWRITEeffects. The highest-value review surface is the set of converted consumers, to ensure each one is truly asking a memory question.