@@ -27,7 +27,7 @@ using namespace mlir::nvgpu;
27
27
28
28
#include " mlir/Dialect/NVGPU/IR/NVGPUDialect.cpp.inc"
29
29
30
- void nvgpu:: NVGPUDialect::initialize () {
30
+ void NVGPUDialect::initialize () {
31
31
addTypes<
32
32
#define GET_TYPEDEF_LIST
33
33
#include " mlir/Dialect/NVGPU/IR/NVGPUTypeDefs.cpp.inc"
@@ -42,7 +42,7 @@ void nvgpu::NVGPUDialect::initialize() {
42
42
>();
43
43
}
44
44
45
- bool nvgpu:: NVGPUDialect::isSharedMemoryAddressSpace (Attribute memorySpace) {
45
+ bool NVGPUDialect::isSharedMemoryAddressSpace (Attribute memorySpace) {
46
46
if (!memorySpace)
47
47
return false ;
48
48
if (auto intAttr = llvm::dyn_cast<IntegerAttr>(memorySpace))
@@ -52,7 +52,7 @@ bool nvgpu::NVGPUDialect::isSharedMemoryAddressSpace(Attribute memorySpace) {
52
52
return false ;
53
53
}
54
54
55
- bool nvgpu:: NVGPUDialect::hasSharedMemoryAddressSpace (MemRefType type) {
55
+ bool NVGPUDialect::hasSharedMemoryAddressSpace (MemRefType type) {
56
56
Attribute memorySpace = type.getMemorySpace ();
57
57
return isSharedMemoryAddressSpace (memorySpace);
58
58
}
@@ -140,7 +140,6 @@ static LogicalResult verifyMmaSyncOp(Operation *op,
140
140
TypedValue<VectorType> matrixC,
141
141
const std::array<int64_t , 3 > &mmaShape,
142
142
bool tf32Enabled, bool sparse = false ) {
143
-
144
143
// The verification for mma.sync covering various shapes and data types is
145
144
// based on the fundamental tensor core shape.
146
145
@@ -292,7 +291,6 @@ LogicalResult MmaSparseSyncOp::verify() {
292
291
// NVGPU_LdMatrixOp
293
292
// ===----------------------------------------------------------------------===//
294
293
LogicalResult LdMatrixOp::verify () {
295
-
296
294
// ldmatrix reads data from source in shared memory
297
295
auto srcMemref = llvm::cast<MemRefType>(getSrcMemref ().getType ());
298
296
@@ -345,7 +343,7 @@ LogicalResult LdMatrixOp::verify() {
345
343
// NVGPU_TmaAsyncLoadOp
346
344
// ===----------------------------------------------------------------------===//
347
345
348
- unsigned getSwizzleBytes (TensorMapSwizzleKind kind) {
346
+ static unsigned getSwizzleBytes (TensorMapSwizzleKind kind) {
349
347
switch (kind) {
350
348
case TensorMapSwizzleKind::SWIZZLE_32B:
351
349
return 32 ;
@@ -359,7 +357,7 @@ unsigned getSwizzleBytes(TensorMapSwizzleKind kind) {
359
357
}
360
358
361
359
std::optional<InFlightDiagnostic> verifyTmaDescriptorWithMemref (
362
- Operation *op, nvgpu:: TensorMapDescriptorType descType,
360
+ Operation *op, TensorMapDescriptorType descType,
363
361
std::optional<MemRefType> memrefType = std::nullopt ) {
364
362
MemRefType descMemref = descType.getTensor ();
365
363
// Limitation
@@ -655,8 +653,7 @@ LogicalResult WarpgroupMmaStoreOp::verify() {
655
653
// ===----------------------------------------------------------------------===//
656
654
657
655
LogicalResult WarpgroupMmaInitAccumulatorOp::verify () {
658
-
659
- nvgpu::WarpgroupAccumulatorType accType = getMatrixC ().getType ();
656
+ WarpgroupAccumulatorType accType = getMatrixC ().getType ();
660
657
int64_t sizeM = accType.getFragmented ().getDimSize (0 );
661
658
int64_t sizeN = accType.getFragmented ().getDimSize (1 );
662
659
Type elemType = accType.getFragmented ().getElementType ();
0 commit comments