Skip to content

Commit fac59c9

Browse files
committed
remove unused numReps param
1 parent 953e305 commit fac59c9

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

third_party/intel/include/Dialect/TritonIntelGPU/IR/TritonIntelGPUAttrDefs.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ def Subgroup2DBlockEncodingAttr : DistributedEncoding<"Subgroup2DBlockEncoding",
311311
"CTALayoutAttr":$CTALayout,
312312
ArrayRefParameter<"unsigned">:$instrShape,
313313
"unsigned":$numBlocks,
314-
ArrayRefParameter<"unsigned">:$numReps,
315314
ArrayRefParameter<"unsigned">:$order,
316315
"unsigned":$kWidth,
317316
"unsigned":$threadsPerWarp

third_party/intel/lib/Dialect/TritonIntelGPU/IR/Dialect.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,7 @@ void maybePrintCTALayout(mlir::MLIRContext *context, mlir::AsmPrinter &printer,
531531
LogicalResult Subgroup2DBlockEncodingAttr::verify(
532532
function_ref<InFlightDiagnostic()> emitError,
533533
ArrayRef<unsigned> warpsPerCTA, CTALayoutAttr CTALayout,
534-
ArrayRef<unsigned> instrShape, unsigned numBlocks,
535-
ArrayRef<unsigned> numReps, ArrayRef<unsigned> order, unsigned kWidth,
534+
ArrayRef<unsigned> instrShape, unsigned numBlocks, ArrayRef<unsigned> order, unsigned kWidth,
536535
unsigned threadsPerWarp) {
537536
if (instrShape.size() != 2) {
538537
return emitError() << "instrShape must be rank 2 but was: "
@@ -570,7 +569,6 @@ Attribute Subgroup2DBlockEncodingAttr::parse(AsmParser &parser, Type type) {
570569
std::optional<SmallVector<unsigned>> CTAOrder;
571570
SmallVector<unsigned> instrShape;
572571
unsigned numBlocks = 0;
573-
SmallVector<unsigned> numReps;
574572
SmallVector<unsigned> order;
575573
unsigned kWidth = 0;
576574
unsigned threadsPerWarp = 0;
@@ -603,10 +601,6 @@ Attribute Subgroup2DBlockEncodingAttr::parse(AsmParser &parser, Type type) {
603601
if (parseUInt(parser, attr, numBlocks, "numBlocks").failed())
604602
return {};
605603
}
606-
if (attr.getName() == "numReps") {
607-
if (parseIntArrayAttr(parser, attr, numReps, "numReps").failed())
608-
return {};
609-
}
610604
if (attr.getName() == "order") {
611605
if (parseIntArrayAttr(parser, attr, order, "order").failed())
612606
return {};
@@ -628,7 +622,7 @@ Attribute Subgroup2DBlockEncodingAttr::parse(AsmParser &parser, Type type) {
628622

629623
return parser.getChecked<Subgroup2DBlockEncodingAttr>(
630624
parser.getContext(), warpsPerCTA, *CTALayout, instrShape, numBlocks,
631-
numReps, order, kWidth, threadsPerWarp);
625+
order, kWidth, threadsPerWarp);
632626
}
633627

634628
SmallVector<unsigned> Subgroup2DBlockEncodingAttr::getRepOrder() const {
@@ -658,8 +652,7 @@ void Subgroup2DBlockEncodingAttr::print(AsmPrinter &printer) const {
658652
maybePrintCTALayout(getContext(), printer, getCTALayout(), getRank());
659653

660654
printer << ", instrShape = [" << getInstrShape()
661-
<< "], numBlocks=" << getNumBlocks() << ", numReps=[" << getNumReps()
662-
<< "], order=[" << getOrder() << "], kWidth=" << getKWidth()
655+
<< "], numBlocks=" << getNumBlocks() << ", order=[" << getOrder() << "], kWidth=" << getKWidth()
663656
<< ", threadsPerWarp=" << getThreadsPerWarp() << "}>";
664657
}
665658

unittest/Dialect/TritonIntelGPU/LinearLayoutConversionsTest.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,13 @@ class LinearLayoutConversionsTest : public ::testing::Test {
2929
opsPerChannel, warpsPerCTA, repCluster,
3030
/*threadsPerWarp=*/16);
3131

32-
auto dpasRepsRef =
33-
llvm::to_vector(dpasLayout.getDPASRepetitions(blockShape, opIdx));
34-
assert(dpasRepsRef.size() == 3);
35-
auto dpasReps =
36-
SmallVector<unsigned>{static_cast<unsigned>(dpasRepsRef[1]),
37-
static_cast<unsigned>(dpasRepsRef[2])};
38-
3932
// TODO: could put the getOrderForDotOperand in the builder?
4033
auto layout = Subgroup2DBlockEncodingAttr::get(
4134
&ctx, warpsPerCTA,
4235
CTALayoutAttr::get(
4336
&ctx, dpasLayout.getCTAsPerCGA(), // TODO: add to DpasLayout?
4437
dpasLayout.getCTASplitNum(), dpasLayout.getCTAOrder()),
45-
instrShape, numBlocks, dpasReps,
46-
getOrderForDotOperand(opIdx, /*rank*/ 2, /*kContig*/ true), kWidth,
38+
instrShape, numBlocks, getOrderForDotOperand(opIdx, /*rank*/ 2, /*kContig*/ true), kWidth,
4739
dpasLayout.getThreadsPerWarp());
4840
return layout;
4941
}

0 commit comments

Comments
 (0)