@@ -472,15 +472,16 @@ void PrefetchNdOp::build(OpBuilder &builder, OperationState &state,
472472 Value tensorDesc, ArrayRef<OpFoldResult> offsets,
473473 xegpu::CachePolicyAttr l1_hint,
474474 xegpu::CachePolicyAttr l2_hint,
475- xegpu::CachePolicyAttr l3_hint) {
475+ xegpu::CachePolicyAttr l3_hint,
476+ xegpu::DistributeLayoutAttr layout) {
476477 SmallVector<Value> dynamicOffsets;
477478 SmallVector<int64_t > staticOffsets;
478479 dispatchIndexOpFoldResults (offsets, dynamicOffsets, staticOffsets);
479480
480481 auto staticOffsetsAttr = builder.getDenseI64ArrayAttr (staticOffsets);
481482
482483 build (builder, state, tensorDesc, dynamicOffsets, staticOffsetsAttr, l1_hint,
483- l2_hint, l3_hint, /* anchor_layout=*/ nullptr );
484+ l2_hint, l3_hint, /* anchor_layout=*/ layout );
484485}
485486
486487LogicalResult PrefetchNdOp::verify () {
@@ -527,7 +528,8 @@ void LoadNdOp::build(OpBuilder &builder, OperationState &state, Type retType,
527528 UnitAttr packed, DenseI64ArrayAttr transpose,
528529 xegpu::CachePolicyAttr l1_hint,
529530 xegpu::CachePolicyAttr l2_hint,
530- xegpu::CachePolicyAttr l3_hint) {
531+ xegpu::CachePolicyAttr l3_hint,
532+ xegpu::DistributeLayoutAttr layout) {
531533 SmallVector<Value> dynamicOffsets;
532534 SmallVector<int64_t > staticOffsets;
533535 dispatchIndexOpFoldResults (offsets, dynamicOffsets, staticOffsets);
@@ -536,7 +538,7 @@ void LoadNdOp::build(OpBuilder &builder, OperationState &state, Type retType,
536538
537539 build (builder, state, retType, tensorDesc, dynamicOffsets, staticOffsetsAttr,
538540 packed, transpose, l1_hint, l2_hint, l3_hint,
539- /* anchor_layout=*/ nullptr );
541+ /* anchor_layout=*/ layout );
540542}
541543
542544LogicalResult LoadNdOp::verify () {
@@ -647,15 +649,16 @@ void StoreNdOp::build(OpBuilder &builder, OperationState &state, Value value,
647649 Value tensorDesc, ArrayRef<OpFoldResult> offsets,
648650 xegpu::CachePolicyAttr l1_hint,
649651 xegpu::CachePolicyAttr l2_hint,
650- xegpu::CachePolicyAttr l3_hint) {
652+ xegpu::CachePolicyAttr l3_hint,
653+ xegpu::DistributeLayoutAttr layout) {
651654 SmallVector<Value> dynamicOffsets;
652655 SmallVector<int64_t > staticOffsets;
653656 dispatchIndexOpFoldResults (offsets, dynamicOffsets, staticOffsets);
654657
655658 auto staticOffsetsAttr = builder.getDenseI64ArrayAttr (staticOffsets);
656659
657660 build (builder, state, value, tensorDesc, dynamicOffsets, staticOffsetsAttr,
658- l1_hint, l2_hint, l3_hint, /* anchor_layout=*/ nullptr );
661+ l1_hint, l2_hint, l3_hint, /* anchor_layout=*/ layout );
659662}
660663
661664LogicalResult StoreNdOp::verify () {
0 commit comments