Skip to content

Commit 0917afe

Browse files
committed
[LDS] Do not use DMA in the presence of tensor.pad
1 parent ce1244f commit 0917afe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/iree/compiler/Codegen/Dialect/GPU/TargetUtils/ConfigUtils.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,10 @@ getMatmulOrIGEMMLoweringConfigAndWorkgroupSize(
922922
// and scaled GEMM respectively.
923923
promotionList.push_back(promotionList.size());
924924
}
925-
ArrayRef<Attribute> promotionTypes = useDirectLoad
926-
? ArrayRef<Attribute>(promotionArray)
925+
// Do not use direct load DMA when padding is needed, as the source will
926+
// go through tensor.pad and won't be directly from global memory.
927+
ArrayRef<Attribute> promotionTypes =
928+
(useDirectLoad && !couldNeedPadding) ? ArrayRef<Attribute>(promotionArray)
927929
: ArrayRef<Attribute>{};
928930
GPU::appendPromotedOperandsList(context, attrs, promotionList,
929931
promotionTypes);

0 commit comments

Comments
 (0)