@@ -27,7 +27,7 @@ using namespace mlir::nvgpu;
2727
2828#include " mlir/Dialect/NVGPU/IR/NVGPUDialect.cpp.inc"
2929
30- void nvgpu:: NVGPUDialect::initialize () {
30+ void NVGPUDialect::initialize () {
3131 addTypes<
3232#define GET_TYPEDEF_LIST
3333#include " mlir/Dialect/NVGPU/IR/NVGPUTypeDefs.cpp.inc"
@@ -42,7 +42,7 @@ void nvgpu::NVGPUDialect::initialize() {
4242 >();
4343}
4444
45- bool nvgpu:: NVGPUDialect::isSharedMemoryAddressSpace (Attribute memorySpace) {
45+ bool NVGPUDialect::isSharedMemoryAddressSpace (Attribute memorySpace) {
4646 if (!memorySpace)
4747 return false ;
4848 if (auto intAttr = llvm::dyn_cast<IntegerAttr>(memorySpace))
@@ -52,7 +52,7 @@ bool nvgpu::NVGPUDialect::isSharedMemoryAddressSpace(Attribute memorySpace) {
5252 return false ;
5353}
5454
55- bool nvgpu:: NVGPUDialect::hasSharedMemoryAddressSpace (MemRefType type) {
55+ bool NVGPUDialect::hasSharedMemoryAddressSpace (MemRefType type) {
5656 Attribute memorySpace = type.getMemorySpace ();
5757 return isSharedMemoryAddressSpace (memorySpace);
5858}
@@ -140,7 +140,6 @@ static LogicalResult verifyMmaSyncOp(Operation *op,
140140 TypedValue<VectorType> matrixC,
141141 const std::array<int64_t , 3 > &mmaShape,
142142 bool tf32Enabled, bool sparse = false ) {
143-
144143 // The verification for mma.sync covering various shapes and data types is
145144 // based on the fundamental tensor core shape.
146145
@@ -292,7 +291,6 @@ LogicalResult MmaSparseSyncOp::verify() {
292291// NVGPU_LdMatrixOp
293292// ===----------------------------------------------------------------------===//
294293LogicalResult LdMatrixOp::verify () {
295-
296294 // ldmatrix reads data from source in shared memory
297295 auto srcMemref = llvm::cast<MemRefType>(getSrcMemref ().getType ());
298296
@@ -345,7 +343,7 @@ LogicalResult LdMatrixOp::verify() {
345343// NVGPU_TmaAsyncLoadOp
346344// ===----------------------------------------------------------------------===//
347345
348- unsigned getSwizzleBytes (TensorMapSwizzleKind kind) {
346+ static unsigned getSwizzleBytes (TensorMapSwizzleKind kind) {
349347 switch (kind) {
350348 case TensorMapSwizzleKind::SWIZZLE_32B:
351349 return 32 ;
@@ -359,7 +357,7 @@ unsigned getSwizzleBytes(TensorMapSwizzleKind kind) {
359357}
360358
361359std::optional<InFlightDiagnostic> verifyTmaDescriptorWithMemref (
362- Operation *op, nvgpu:: TensorMapDescriptorType descType,
360+ Operation *op, TensorMapDescriptorType descType,
363361 std::optional<MemRefType> memrefType = std::nullopt ) {
364362 MemRefType descMemref = descType.getTensor ();
365363 // Limitation
@@ -655,8 +653,7 @@ LogicalResult WarpgroupMmaStoreOp::verify() {
655653// ===----------------------------------------------------------------------===//
656654
657655LogicalResult WarpgroupMmaInitAccumulatorOp::verify () {
658-
659- nvgpu::WarpgroupAccumulatorType accType = getMatrixC ().getType ();
656+ WarpgroupAccumulatorType accType = getMatrixC ().getType ();
660657 int64_t sizeM = accType.getFragmented ().getDimSize (0 );
661658 int64_t sizeN = accType.getFragmented ().getDimSize (1 );
662659 Type elemType = accType.getFragmented ().getElementType ();
0 commit comments