Clarify partial-PE Shared TLOAD followed by cooperative TMATMUL
Summary
Please clarify the intended 0.58.4 semantics for a common compiler-generated pattern:
# producer
BSTART.TLSU TLOAD, FP32
B.DIM LB0=64
B.DIM LB1=128
B.DIM LB2=64
B.IOS mask=0001, ->S0<32KB>
B.IOR [a1,a3],[]
BSTOP
BSTART.TLSU TLOAD, FP32
B.DIM LB0=32
B.DIM LB1=64
B.DIM LB2=32
B.IOS mask=0001, ->S1<8KB>
B.IOR [a2,a3],[]
BSTOP
# consumer
BSTART.CUBE TMATMUL, FP32
B.DATR FP32, byte0, Null
B.FPATR 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
B.DIM LB0=128
B.DIM LB1=32
B.DIM LB2=64
B.IOS S0, mask=1111
B.IOS S1, mask=1111
B.IOT mask=1111, last, ->T<4KB>
BSTOP
The actual example is from:
kernel_multi_thread_matmul_matmul_shared_cube_layout_B1_M256_N256_K256_tM128_tN32_tK64_DTypefloat.elf.diss
Relevant addresses in the disassembly:
- producer S0:
0x113a0–0x113b6
- producer S1:
0x113bc–0x113d0
- consumer TMATMUL:
0x113d2–0x113f6
The producer uses B.IOS mask=0001 for both Shared destinations. The later TMATMUL uses the same S0/S1 as Shared sources with mask=1111.
What is unambiguous in the current ASL
BSTART.TLOAD defines the Shared destination form as one B.IOS with SharedTileID, TSize, and PE_MASK, and says that each selected quarter uses that PE's private GPR base and stride:
The same machine-readable ASL contract says that a successful Shared form updates selected valid elements and that unselected PE regions remain unchanged for partial-mask updates.
- Shared state records initialized quarters explicitly:
SharedTileCooperativeMatrixReady() requires:
SharedTileDescriptorLegal(shared_tile_id)
shared.allocation_mask == '1111'
shared.initialized_mask == '1111'
shared.published
shared.tile.contents_defined
- Shared CUBE source schema calls the readiness predicate before accepting the source:
Specifically, BundleMatrixSharedSourceSchemaLegal() returns FALSE when SharedTileCooperativeMatrixReady(shared_tile_id) is false.
- Cooperative TMATMUL mask and Group-M behavior are defined separately:
- The release ADRs add the following requirements:
- ADR-0097:67-73: Shared
B.IOS destination allocates one Core-wide object; PE mode controls participation and quarter updates;
- ADR-0098:84-100: range modifiers attach only to the immediately preceding B.IOT/B.IOS group, and a multi-PE Shared destination requires
B.ASSEMBLE;
- ADR-0100:50-76: cooperative TMATMUL uses group-M and requires four-PE participation/readiness.
The unresolved combination
From the above, the following interpretation appears required:
TLOAD B.IOS mask=0001
=> only the PE0-selected quarter is updated
=> PE1/PE2/PE3 quarters remain unchanged
TMATMUL B.IOS mask=1111
=> cooperative Shared source
=> S0/S1 must already satisfy SharedTileCooperativeMatrixReady()
=> all four quarters must be initialized and published
However, the ASL does not appear to state the complete producer sequence for the intended single-PE-issuer case.
Please clarify the following points in the spec:
- Is
TLOAD B.IOS mask=0001 intended to load only one fixed Shared quarter, or is one PE allowed to issue a complete logical Shared tile while the other PE quarters are implicitly populated?
- If it loads only one quarter, what exact architectural instruction sequence must initialize the remaining three quarters before a
TMATMUL B.IOS mask=1111 consumer?
- Is a single-PE issuer followed by a four-PE TMATMUL an explicitly supported execution pattern? If yes, please define the issuer/consumer synchronization and the state transition from
initialized_mask=0001 to initialized_mask=1111.
- For Shared TLOAD with
PE_MASK=1111, is B.ASSEMBLE INIT_LAST mandatory under ADR-0098, and what are the exact B.ASSEMBLE fields and association for the TLOAD form?
- For a Local TLOAD followed by
TMOV.L2S.PUBLISH, does TMOV.L2S.PUBLISH with PE_MASK=0001 produce only one quarter or can it complete a Shared generation? Please provide the normative source-order and INIT/MIDDLE/LAST carrier.
- If the intended behavior is that an uninitialized quarter is readable by TMATMUL using
ReadSharedTileWord() undefined values, this conflicts with the current SharedTileCooperativeMatrixReady() precondition. Please state which behavior is intended.
- For the example above, should the compiler generate four producer executions (one per PE), a Shared
B.ASSEMBLE generation, or a different Shared/Local operand form?
Requested normative clarification
Please add an ASL executable point and/or an explicit normative NDF covering:
- the legal producer carrier for a partial-mask Shared update that is later consumed cooperatively;
- whether single-PE issuer/four-PE consumer is supported;
- the required
allocation_mask, initialized_mask, published, and contents_defined transitions;
- the required
B.ASSEMBLE association, if any;
- the exact example carrier for the
group_M=128, N=32, K=64 case.
Until this is clarified, a model must choose between two plausible interpretations: reject the example because the Shared primary is not fully ready, or accept a single-PE issuer as an implicit complete Shared producer. The current ASL predicates clearly define the readiness check, but do not provide an unambiguous end-to-end carrier for the latter behavior.
Clarify partial-PE Shared TLOAD followed by cooperative TMATMUL
Summary
Please clarify the intended 0.58.4 semantics for a common compiler-generated pattern:
The actual example is from:
kernel_multi_thread_matmul_matmul_shared_cube_layout_B1_M256_N256_K256_tM128_tN32_tK64_DTypefloat.elf.dissRelevant addresses in the disassembly:
0x113a0–0x113b60x113bc–0x113d00x113d2–0x113f6The producer uses
B.IOS mask=0001for both Shared destinations. The later TMATMUL uses the same S0/S1 as Shared sources withmask=1111.What is unambiguous in the current ASL
BSTART.TLOADdefines the Shared destination form as oneB.IOSwithSharedTileID, TSize, and PE_MASK, and says that each selected quarter uses that PE's private GPR base and stride:The same machine-readable ASL contract says that a successful Shared form updates selected valid elements and that unselected PE regions remain unchanged for partial-mask updates.
SharedTileAnyQuarterInitialized();SharedTileFullyInitialized();SharedTilePublished();SharedTileCooperativeMatrixReady().SharedTileCooperativeMatrixReady()requires:Specifically,
BundleMatrixSharedSourceSchemaLegal()returns FALSE whenSharedTileCooperativeMatrixReady(shared_tile_id)is false.'1111';M_per_PEandvalid_M;B.IOSdestination allocates one Core-wide object; PE mode controls participation and quarter updates;B.ASSEMBLE;The unresolved combination
From the above, the following interpretation appears required:
However, the ASL does not appear to state the complete producer sequence for the intended single-PE-issuer case.
Please clarify the following points in the spec:
TLOAD B.IOS mask=0001intended to load only one fixed Shared quarter, or is one PE allowed to issue a complete logical Shared tile while the other PE quarters are implicitly populated?TMATMUL B.IOS mask=1111consumer?initialized_mask=0001toinitialized_mask=1111.PE_MASK=1111, isB.ASSEMBLE INIT_LASTmandatory under ADR-0098, and what are the exactB.ASSEMBLEfields and association for the TLOAD form?TMOV.L2S.PUBLISH, doesTMOV.L2S.PUBLISHwithPE_MASK=0001produce only one quarter or can it complete a Shared generation? Please provide the normative source-order andINIT/MIDDLE/LASTcarrier.ReadSharedTileWord()undefined values, this conflicts with the currentSharedTileCooperativeMatrixReady()precondition. Please state which behavior is intended.B.ASSEMBLEgeneration, or a different Shared/Local operand form?Requested normative clarification
Please add an ASL executable point and/or an explicit normative NDF covering:
allocation_mask,initialized_mask,published, andcontents_definedtransitions;B.ASSEMBLEassociation, if any;group_M=128, N=32, K=64case.Until this is clarified, a model must choose between two plausible interpretations: reject the example because the Shared primary is not fully ready, or accept a single-PE issuer as an implicit complete Shared producer. The current ASL predicates clearly define the readiness check, but do not provide an unambiguous end-to-end carrier for the latter behavior.