Skip to content

[PTO 0.58.6][MC] Add single-line TileOp assembly and bundle-aware disassembly to dev-llvm15_56 #90

Description

@zhoubot

Problem

PTO 0.58.6 defines a canonical single-line TileOp macro-assembly surface over existing physical Block bundles. The dev-llvm15_56 branch has older per-operation pseudos and physical MC decoding, but it does not consume the current 117-operation / 141-form schema or fold complete bundles back into one TileOp line.

Normative input

Complete TileOp inventory

Every row below comes from the reviewed PTO-SPEC catalog. Forms are listed exactly as owned by PTO-SPEC.

VEC (31 operations)

TileOp Canonical one-line forms
TABS TABS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TADD TADD <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TADDS TADDS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TAND TAND <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TANDS TANDS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TCMP TCMP <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, PEMask>, SrcTile0, SrcTile1, ->PredicateTile<Size>
TCMP <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, PEMask>, SrcTile0, SrcTile1, ->PredicateCell<Size>
TCMP <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, SatMode?, PEMask>, SrcTile0, SrcTile1, ->PredicateGPR
TCMPS TCMPS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, PEMask>, SrcTile0, ScalarGPR0=zero, ->PredicateTile<Size>
TCMPS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, PEMask>, SrcTile0, ScalarGPR0=zero, ->PredicateCell<Size>
TCMPS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, CMode=EQ, PadValue=Null, SatMode?, PEMask>, SrcTile0, ScalarGPR0=zero, ->PredicateGPR
TCVT TCVT <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, SrcDataType, DstDataType?, RMode?, Sat?, Canonicalize?, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TEXPANDS TEXPANDS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, ScalarGPR0?, ->DstTile<Size>
TFMA TFMA <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, SrcTile2, ->DstTile<Size>
TMAX TMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TMAXS TMAXS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TMIN TMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TMINS TMINS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TMUL TMUL <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TMULS TMULS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TNEG TNEG <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TNOT TNOT <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TOR TOR <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TORS TORS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TRELU TRELU <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TSEL TSEL <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateTile0, SrcTile1, SrcTile2, ->DstTile<Size>
TSEL <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateCell0, SrcTile1, SrcTile2, ->DstTile<Size>
TSEL <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateGPR0, PredicateGPR1{if DataType=U8}, SrcTile1, SrcTile2, ->DstTile<Size>
TSELS TSELS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateTile0, SrcTile1, ScalarFalseGPR=zero, ->DstTile<Size>
TSELS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateCell0, SrcTile1, ScalarFalseGPR=zero, ->DstTile<Size>
TSELS <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PadValue=Null, PEMask>, PredicateGPR0, PredicateGPR1{if DataType=U8}, SrcTile1, ScalarFalseGPR=zero, ->DstTile<Size>
TSHL TSHL <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TSHLS TSHLS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TSHR TSHR <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TSHRS TSHRS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TSUB TSUB <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TSUBS TSUBS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TXOR TXOR <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TXORS TXORS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>

SFU (46 operations)

TileOp Canonical one-line forms
TCI TCI <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PEMask>, Start=0, Direction=ascending, ->DstTile<Size>
TCOLARGMAX TCOLARGMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLARGMIN TCOLARGMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLEXPAND TCOLEXPAND <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLEXPANDADD TCOLEXPANDADD <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDDIV TCOLEXPANDDIV <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDEXPDIF TCOLEXPANDEXPDIF <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDMAX TCOLEXPANDMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDMIN TCOLEXPANDMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDMUL TCOLEXPANDMUL <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLEXPANDSUB TCOLEXPANDSUB <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TCOLMAX TCOLMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLMIN TCOLMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLPROD TCOLPROD <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TCOLSUM TCOLSUM <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TDIV TDIV <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TDIVS TDIVS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TEXP TEXP <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TGATHER TGATHER <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, ValueDataType, Layout?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TGPR2T TGPR2T <LB0:ValidCol, LB1:ValidRow, U8, PadValueOrByteId?, RMode?, PEMask>, ScalarGPR0, ScalarGPR1, ScalarGPR2, ScalarGPR3, ->DstTile<Size>
TLOG TLOG <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TPACK TPACK <LB0?, LB1?, LB2?, U32, Layout?, PEMask>, SrcTile0, SrcTile1, ScalarGPR0, ->DstTile<Size>
TPERMUTE TPERMUTE <LB0?, LB1?, LB2?, DataType, Layout?, PEMask>, SrcTile0, SrcTile1, SrcTile2, ->DstTile<Size>
TRECIP TRECIP <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TREM TREM <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TREMS TREMS <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ScalarGPR0?, ->DstTile<Size>
TROWARGMAX TROWARGMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWARGMIN TROWARGMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWEXPAND TROWEXPAND <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWEXPANDADD TROWEXPANDADD <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDDIV TROWEXPANDDIV <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDEXPDIF TROWEXPANDEXPDIF <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDMAX TROWEXPANDMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDMIN TROWEXPANDMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDMUL TROWEXPANDMUL <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWEXPANDSUB TROWEXPANDSUB <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TROWMAX TROWMAX <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWMIN TROWMIN <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWPROD TROWPROD <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TROWSUM TROWSUM <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TRSQRT TRSQRT <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TSCATTER TSCATTER <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, ValueDataType, Layout?, PEMask>, SrcTile0, SrcTile1, ->DstTile<Size>
TSHUF TSHUF <LB0?, LB1?, LB2?, DataType, Layout?, PEMask>, SrcTile0, SrcTile1, ScalarGPR0, ->DstTile<Size>
TSQRT TSQRT <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, PEMask>, SrcTile0, ->DstTile<Size>
TTRI TTRI <LB0:ValidCol, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, PEMask>, Diagonal=0, Orientation=lower, ->DstTile<Size>
TUNPACK TUNPACK <LB0?, LB1?, LB2?, U32, Layout?, PEMask>, SrcTile0, ScalarGPR0, ->DstTile<Size>

TLSU (28 operations)

TileOp Canonical one-line forms
GMOV GMOV <DataType, Layout?, PEMask>, SrcTile0, PeerTid?, ->DstTile<Size>
MGATHER MGATHER <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, Layout?, PEMask>, [BaseGPR], RowStrideGPR, SrcTile0, ->DstTile<Size>
MGATHER_ADD MGATHER_ADD <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_AND MGATHER_AND <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_CAS MGATHER_CAS <DataType, PEMask>, [BaseGPR], RowStrideGPR, SrcTile0, SrcTile1, SrcTile2, ->DstTile<Size>
MGATHER_DEC MGATHER_DEC <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_EXCH MGATHER_EXCH <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_INC MGATHER_INC <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_MASK MGATHER_MASK <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, PadValue?, Layout?, PEMask>, [BaseGPR], RowStrideGPR, SrcTile0, PredicateTile1, ->DstTile<Size>
MGATHER_MAX MGATHER_MAX <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_MIN MGATHER_MIN <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_OR MGATHER_OR <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MGATHER_XOR MGATHER_XOR <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1, ->DstTile<Size>
MSCATTER MSCATTER <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PEMask>, [BaseGPR], RowStrideGPR, SrcTile0, SrcTile1
MSCATTER_ADD MSCATTER_ADD <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_AND MSCATTER_AND <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_DEC MSCATTER_DEC <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_INC MSCATTER_INC <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_MASK MSCATTER_MASK <LB0:ValidCol, LB1:ValidRow?, LB2:Col?, DataType, Layout?, PEMask>, [BaseGPR], RowStrideGPR, SrcTile0, SrcTile1, PredicateTile2
MSCATTER_MAX MSCATTER_MAX <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_MIN MSCATTER_MIN <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_OR MSCATTER_OR <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
MSCATTER_POPC MSCATTER_POPC <LB0:ValidCol, DataType, PEMask>, [BaseGPR], SrcTile0
MSCATTER_XOR MSCATTER_XOR <DataType, PEMask>, [BaseGPR], SrcTile0, SrcTile1
TLOAD TLOAD <LB0:ValidCol?, LB1:ValidRow?, LB2:Col=ValidCol, DataType, Layout?, PEMask>, [BaseGPR=zero, RowStrideGPR?], ->DstTile<Size>
TLOAD.SHARED <LB0:ValidCol?, LB1:ValidRow?, LB2:Col=ValidCol, DataType, Layout?, PEMask>, [BaseGPR=zero, RowStrideGPR?], ->DstShared<Size>
TLOAD.CUBE <LB0:ValidCol, LB1:ValidRow, CubeLayout, DTYPE_NONE, PadValue, PEMask>, [BaseGPR=zero, RowStrideGPR?], ->DstTile<Size>
TMOV TMOV <LB0, LB1?, LB2?, DataType, Layout?, PEMask>, SrcTile0, ->DstTile<Size>
TPREFETCH TPREFETCH <LB0:ValidCol=1, LB1:ValidRow=1, LB2:Col=ValidCol, DataType, Layout?>, [BaseGPR=zero, RowStrideGPR?]
TSTORE TSTORE <LB0:ValidCol=SourceDescriptor, LB1:ValidRow=SourceDescriptor, LB2:Col=SourceDescriptor, DataType, Layout?, PEMask>, SrcTile, [BaseGPR=zero, RowStrideGPR?]
TSTORE.SHARED <LB0:ValidCol=SourceOr1, LB1:ValidRow=SourceOr1, LB2:Col=SourceOrValidCol, DataType, Layout?, PEMask>, SrcShared, [BaseGPR=zero, RowStrideGPR?]
TSTORE.CUBE <LB0:ValidCol, LB1:ValidRow, CubeLayout, DTYPE_NONE, PadValue, PEMask>, SrcTile, [BaseGPR=zero, RowStrideGPR?]

CUBE (12 operations)

TileOp Canonical one-line forms
TGEMV TGEMV <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcVector, SrcMatrix, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TGEMV_ACC TGEMV_ACC <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, AccTile, SrcVector, SrcMatrix, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TGEMV_BIAS TGEMV_BIAS <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcVector, SrcMatrix, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TGEMV_MX TGEMV_MX <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcVector, RowScaleTile{if AType requires MX scale}, SrcMatrix, ColumnScaleTile{if BType requires MX scale}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TGEMV_MX_ACC TGEMV_MX_ACC <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, AccTile, SrcVector, RowScaleTile{if AType requires MX scale}, SrcMatrix, ColumnScaleTile{if BType requires MX scale}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TGEMV_MX_BIAS TGEMV_MX_BIAS <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcVector, RowScaleTile{if AType requires MX scale}, SrcMatrix, ColumnScaleTile{if BType requires MX scale}, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL TMATMUL <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcTile0, SrcTile1, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, LocalLeftGroup, SharedRightGroup, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, SharedLeftGroup, SharedRightGroup, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_ACC TMATMUL_ACC <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, AccTile, SrcTile0, SrcTile1, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_ACC.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, AccTile, LocalLeftGroup, SharedRightGroup, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_ACC.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, AccTile, SharedLeftGroup, SharedRightGroup, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_BIAS TMATMUL_BIAS <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcTile0, SrcTile1, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_BIAS.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, LocalLeftGroup, SharedRightGroup, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_BIAS.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, SharedLeftGroup, SharedRightGroup, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX TMATMUL_MX <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcTile0, RowScaleTile{if AType requires MX scale}, SrcTile1, ColumnScaleTile{if BType requires MX scale}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, LocalLeftGroup, SharedRightGroup, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, SharedLeftGroup, SharedRightGroup, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_ACC TMATMUL_MX_ACC <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, AccTile, SrcTile0, RowScaleTile{if AType requires MX scale}, SrcTile1, ColumnScaleTile{if BType requires MX scale}, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_ACC.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, AccTile, LocalLeftGroup, SharedRightGroup, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_ACC.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, AccTile, SharedLeftGroup, SharedRightGroup, CScaleTile{if CScaleEn}, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_BIAS TMATMUL_MX_BIAS <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask>, SrcTile0, RowScaleTile{if AType requires MX scale}, SrcTile1, ColumnScaleTile{if BType requires MX scale}, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_BIAS.SHARED_RIGHT <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, LocalLeftGroup, SharedRightGroup, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}
TMATMUL_MX_BIAS.SHARED_BOTH <LB0:M=1, LB1:N=1, LB2:K=1, AType, BType?, RMode?, Sat?, FPAttrs, PEMask{must be 1111}>, SharedLeftGroup, SharedRightGroup, BiasTile, RowMaxIn{if RowMaxEn&&RowMaxInit}, QuantParamTile{if PreQuantMode=vector}, ReluParamTile{if ReluMode=vector}, QuantParamGPR{if PreQuantMode=scalar}, ReluParamGPR{if ReluMode=scalar}, ->DstTile<Size>, ->RowMaxOut<Size>{if RowMaxEn}, ->GroupMaxOut<Size>{if GroupMaxEn}

LLVM implementation contract

Generated schema

  • Import a compact generated C++ table from the PTO catalog. Do not copy 117 operation definitions into hand-written switches.
  • Pin the source catalog digest and architecture identity. Generation must fail on unknown commands, fields, binding kinds, or physical slots.
  • Keep the generated table separate from instruction semantics: it maps macro fields to already-supported physical MC instructions.

Assembly

  • Intercept a recognized TileOp mnemonic in LinxV5AsmParser before the generic TableGen matcher.
  • Parse the whole macro from one source line; reject a newline or continuation before the form is complete.
  • Resolve one exact form, apply only schema-owned defaults, then emit header, B.DATR/B.FPATR/B.DIM, B.IOR/B.IOT/B.IOS and a boundary in canonical order.
  • Reuse existing physical operand parsers and MC opcodes. Replace the older per-operation pseudo expansion only after parity tests cover the same bytes.
  • Reject ambiguous forms, missing physical arguments, illegal carrier kinds, and range modifiers not attached to the mapped physical role.

Disassembly

  • Folding cannot be implemented only in LinxV5InstPrinter::printInst, because that API receives one MCInst and cannot safely own subsequent instruction bytes, labels, or annotations.
  • Extend LinxV5Disassembler::getInstruction: when decoding an accepted at a BSTART, scan through the exact BSTOP or next-BSTART boundary, validate the complete command sequence, and match it against the generated schema.
  • On one exact physical match, return a synthetic TileOp macro MCInst whose reported size covers the complete folded bundle; the printer renders exactly one line.
  • On no match, incomplete boundary, illegal sequence, or multiple matches, return the physical BSTART normally. PredicateTile/PredicateCell pairs remain physical unless runtime descriptor state proves a unique carrier.
  • Preserve -linxv5-no-aliases as a physical-assembly escape hatch.

Delivery stages

  • Generate and validate the compact 117-operation / 141-form C++ schema.
  • Add parser infrastructure and representative expansion tests for VEC, SFU, TLSU Local/Shared/CUBE, CUBE Local/Shared, GPR predicate, and range modifiers.
  • Close all 141 assembly forms against expected physical bytes.
  • Add bundle-aware disassembler folding with explicit BSTOP and next-BSTART boundaries.
  • Add fail-closed disassembly cases for ambiguous Tile/Cell carriers, missing boundary, noncanonical command order, unsupported default, and stale mnemonic.
  • Run llvm-mc and Clang integrated-assembler coverage on the rebuilt dev-llvm15_56 toolchain.

Acceptance

  • Exactly 117 operation identities and 141 forms match the pinned PTO catalog.
  • Every accepted macro occupies one source line and round-trips to the same physical bytes.
  • Every uniquely foldable physical bundle prints one macro line.
  • Ambiguous or noncanonical bundles remain physical assembly.
  • Existing physical assembly remains accepted and -linxv5-no-aliases remains available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions