Skip to content

[NFC] Make NVGPU casing consistent #91903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mlir/lib/Bindings/Python/DialectNVGPU.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- DialectNvgpu.cpp - Pybind module for Nvgpu dialect API support ---===//
//===--- DialectNVGPU.cpp - Pybind module for NVGPU dialect API support ---===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -17,7 +17,7 @@ using namespace mlir;
using namespace mlir::python;
using namespace mlir::python::adaptors;

static void populateDialectNvgpuSubmodule(const pybind11::module &m) {
static void populateDialectNVGPUSubmodule(const pybind11::module &m) {
auto nvgpuTensorMapDescriptorType = mlir_type_subclass(
m, "TensorMapDescriptorType", mlirTypeIsANVGPUTensorMapDescriptorType);

Expand All @@ -34,8 +34,8 @@ static void populateDialectNvgpuSubmodule(const pybind11::module &m) {
py::arg("ctx") = py::none());
}

PYBIND11_MODULE(_mlirDialectsNvgpu, m) {
PYBIND11_MODULE(_mlirDialectsNVGPU, m) {
m.doc() = "MLIR NVGPU dialect.";

populateDialectNvgpuSubmodule(m);
populateDialectNVGPUSubmodule(m);
}
2 changes: 1 addition & 1 deletion mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ struct PrepareContractToGPUMMA
}
};

// Fold transpose op into the transfer read op. Nvgpu mma.sync op only supports
// Fold transpose op into the transfer read op. NVGPU mma.sync op only supports
// row-, column-, and row-major layout for matrixA, matrixB, and matrixC,
// respectively. We can fold the transpose operation when loading the data from
// Shared Memory to registers.
Expand Down
6 changes: 3 additions & 3 deletions mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class SubViewOfSubViewFolder : public OpRewritePattern<memref::SubViewOp> {

/// Folds nvgpu.device_async_copy subviews into the copy itself. This pattern
/// is folds subview on src and dst memref of the copy.
class NvgpuAsyncCopyOpSubViewOpFolder final
class NVGPUAsyncCopyOpSubViewOpFolder final
: public OpRewritePattern<nvgpu::DeviceAsyncCopyOp> {
public:
using OpRewritePattern<nvgpu::DeviceAsyncCopyOp>::OpRewritePattern;
Expand Down Expand Up @@ -694,7 +694,7 @@ LogicalResult StoreOpOfCollapseShapeOpFolder<OpTy>::matchAndRewrite(
return success();
}

LogicalResult NvgpuAsyncCopyOpSubViewOpFolder::matchAndRewrite(
LogicalResult NVGPUAsyncCopyOpSubViewOpFolder::matchAndRewrite(
nvgpu::DeviceAsyncCopyOp copyOp, PatternRewriter &rewriter) const {

LLVM_DEBUG(DBGS() << "copyOp : " << copyOp << "\n");
Expand Down Expand Up @@ -769,7 +769,7 @@ void memref::populateFoldMemRefAliasOpPatterns(RewritePatternSet &patterns) {
LoadOpOfCollapseShapeOpFolder<memref::LoadOp>,
StoreOpOfCollapseShapeOpFolder<affine::AffineStoreOp>,
StoreOpOfCollapseShapeOpFolder<memref::StoreOp>,
SubViewOfSubViewFolder, NvgpuAsyncCopyOpSubViewOpFolder>(
SubViewOfSubViewFolder, NVGPUAsyncCopyOpSubViewOpFolder>(
patterns.getContext());
}

Expand Down
2 changes: 1 addition & 1 deletion mlir/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ declare_mlir_python_extension(MLIRPythonExtension.Dialects.Quant.Pybind
)

declare_mlir_python_extension(MLIRPythonExtension.Dialects.NVGPU.Pybind
MODULE_NAME _mlirDialectsNvgpu
MODULE_NAME _mlirDialectsNVGPU
ADD_TO_PARENT MLIRPythonSources.Dialects.nvgpu
ROOT_DIR "${PYTHON_SOURCE_DIR}"
SOURCES
Expand Down
2 changes: 1 addition & 1 deletion mlir/python/mlir/dialects/nvgpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from ._nvgpu_ops_gen import *
from ._nvgpu_enum_gen import *
from .._mlir_libs._mlirDialectsNvgpu import *
from .._mlir_libs._mlirDialectsNVGPU import *
4 changes: 2 additions & 2 deletions mlir/test/lib/Dialect/NVGPU/TestNVGPUTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ struct TestMmaSyncF32ToTF32Patterns

namespace mlir {
namespace test {
void registerTestNvgpuLowerings() {
void registerTestNVGPULowerings() {
PassRegistration<TestMmaSyncF32ToTF32Patterns>();
}

} // namespace test
} // namespace mlir
} // namespace mlir
4 changes: 2 additions & 2 deletions mlir/tools/mlir-opt/mlir-opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void registerTestTransformDialectEraseSchedulePass();
void registerTestWrittenToPass();
void registerTestVectorLowerings();
void registerTestVectorReductionToSPIRVDotProd();
void registerTestNvgpuLowerings();
void registerTestNVGPULowerings();
#if MLIR_ENABLE_PDL_IN_PATTERNMATCH
void registerTestDialectConversionPasses();
void registerTestPDLByteCodePass();
Expand Down Expand Up @@ -270,7 +270,7 @@ void registerTestPasses() {
mlir::test::registerTestTransformDialectEraseSchedulePass();
mlir::test::registerTestVectorLowerings();
mlir::test::registerTestVectorReductionToSPIRVDotProd();
mlir::test::registerTestNvgpuLowerings();
mlir::test::registerTestNVGPULowerings();
mlir::test::registerTestWrittenToPass();
#if MLIR_ENABLE_PDL_IN_PATTERNMATCH
mlir::test::registerTestDialectConversionPasses();
Expand Down
Loading