File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
third_party/intel/lib/TritonIntelGPUTransforms Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,16 @@ bool isExpensiveLoadOrStore(Operation *op) {
120120 if (isSingleValue (base))
121121 return false ;
122122
123- // Loads that use a block pointer are expensive if they cannot be lowered to
124- // 2D block read operations. Temporarily leverage the
123+ // Loads or stores that use a block pointer are expensive if they cannot be
124+ // lowered to 2D block read/write operations. Temporarily leverage the
125125 // "ttig.block_io" attribute to filter out inexpensive loads.
126126 Attribute blockIOAttr =
127127 op->getAttr (TritonIntelGPUDialect::getBlockIOAttrName ());
128128 if (blockIOAttr)
129129 return false ;
130130
131- // Loads that use more threads than elements can be presumed to have a high
132- // hit-rate that makes them cheap to load .
131+ // Loads or stores that use more threads than elements can be presumed to have
132+ // a high hit-rate that makes them cheap.
133133 if (auto ptrType = getRankedTensorType (base.getType ())) {
134134 int numWarps = ttg::lookupNumWarps (op);
135135 auto mod = op->getParentOfType <ModuleOp>();
@@ -197,6 +197,11 @@ LogicalResult getConvertBackwardSlice(
197197
198198 auto updateLayout = [&](Value value, Attribute encoding) {
199199 assert (isTensorOrTensorPointerType (value.getType ()));
200+
201+ if (RankedTensorType tensorType = getRankedTensorType (value.getType ()))
202+ if (tensorType.getEncoding () == encoding)
203+ return success ();
204+
200205 slice.insert (value);
201206 Attribute &existing = layout[value];
202207 if (existing && existing != encoding)
You can’t perform that action at this time.
0 commit comments