@@ -56,6 +56,7 @@ Right now, Triton implements two main classes of layouts: shared, and distribute
5656 code extraBaseClassDeclaration = [{
5757 unsigned getTotalElemsPerThread(ArrayRef<int64_t> shape, Type eltTy) const;
5858 SmallVector<unsigned> getElemsPerThread(ArrayRef<int64_t> shape, Type eltTy) const;
59+ ::mlir::LogicalResult verifyLayoutForArg(::mlir::Operation* op, unsigned argNo) const;
5960 }];
6061}
6162
@@ -146,6 +147,7 @@ addition, if there's only one CTA per CGA, then Triton canonicalizes CTAOrder to
146147 let genVerifyDecl = 1;
147148 let skipDefaultBuilders = 1;
148149}
150+
149151//===----------------------------------------------------------------------===//
150152// Shared Layout Encoding
151153//===----------------------------------------------------------------------===//
@@ -569,34 +571,6 @@ L(T) = [ {0,8} , {1,9} , {2,10}, {3,11}, {0,8} , {1, 9} , {2, 10}, {3, 11},
569571 }];
570572}
571573
572- //===----------------------------------------------------------------------===//
573- // Linear Layout Encoding
574- //===----------------------------------------------------------------------===//
575-
576- def LinearEncodingAttr : DistributedEncoding<"LinearEncoding", "linear_encoding"> {
577- let mnemonic = "linear";
578-
579- let description = [{
580- See the docs in LinearLayout.h for the definition of linear layouts.
581- }];
582-
583- let parameters = (ins "LinearLayout":$linearLayout);
584-
585- let extraClassDeclaration = extraDistributedDeclaration # [{
586- SmallVector<unsigned> getContigPerThread() const;
587- SmallVector<unsigned> getOrder() const;
588- }];
589-
590- let genVerifyDecl = 1;
591- // Example of assembly format:
592- // <{register = [[0, 1], [8, 0], [0, 8], [64, 0]],
593- // lane = [[0, 2], [0, 4], [1, 0], [2, 0], [4, 0]],
594- // warp = [[16, 0], [32, 0]],
595- // block = []}>
596- let hasCustomAssemblyFormat = 1;
597- }
598-
599-
600574//===----------------------------------------------------------------------===//
601575// Blocked Layout Encoding
602576//===----------------------------------------------------------------------===//
0 commit comments