Skip to content

Commit

Permalink
[mlir][NFC] Rename QuantOps to Quant
Browse files Browse the repository at this point in the history
Summary:
Renamed QuantOps to Quant to avoid the Ops suffix. All dialects will contain
ops, so the Ops suffix is redundant.

Differential Revision: https://reviews.llvm.org/D76318
  • Loading branch information
rsuderman authored and River707 committed Mar 17, 2020
1 parent 1d19b15 commit 363dd3f
Show file tree
Hide file tree
Showing 45 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(LoopOps)
add_subdirectory(OpenMP)
add_subdirectory(QuantOps)
add_subdirectory(Quant)
add_subdirectory(Shape)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define DIALECT_FXPMATHOPS_FXPMATH_OPS_

include "mlir/IR/OpBase.td"
include "mlir/Dialect/QuantOps/QuantOpsBase.td"
include "mlir/Dialect/Quant/QuantOpsBase.td"
include "mlir/Interfaces/SideEffects.td"

def FxpMathOps_Dialect : Dialect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_FAKEQUANTSUPPORT_H_
#define MLIR_DIALECT_QUANTOPS_FAKEQUANTSUPPORT_H_
#ifndef MLIR_DIALECT_QUANT_FAKEQUANTSUPPORT_H_
#define MLIR_DIALECT_QUANT_FAKEQUANTSUPPORT_H_

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"

namespace mlir {
namespace quant {
Expand All @@ -64,4 +64,4 @@ fakeQuantAttrsToType(Location loc, unsigned numBits, int32_t quantizedDimension,
} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_FAKEQUANTSUPPORT_H_
#endif // MLIR_DIALECT_QUANT_FAKEQUANTSUPPORT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_PASSES_H
#define MLIR_DIALECT_QUANTOPS_PASSES_H
#ifndef MLIR_DIALECT_QUANT_PASSES_H
#define MLIR_DIALECT_QUANT_PASSES_H

#include <memory>

Expand All @@ -38,4 +38,4 @@ std::unique_ptr<OpPassBase<FuncOp>> createConvertConstPass();
} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_PASSES_H
#endif // MLIR_DIALECT_QUANT_PASSES_H
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_QUANTOPS_H_
#define MLIR_DIALECT_QUANTOPS_QUANTOPS_H_
#ifndef MLIR_DIALECT_QUANT_QUANTOPS_H_
#define MLIR_DIALECT_QUANT_QUANTOPS_H_

#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
Expand All @@ -21,12 +21,12 @@
namespace mlir {
namespace quant {

#include "mlir/Dialect/QuantOps/QuantOpsDialect.h.inc"
#include "mlir/Dialect/Quant/QuantOpsDialect.h.inc"

#define GET_OP_CLASSES
#include "mlir/Dialect/QuantOps/QuantOps.h.inc"
#include "mlir/Dialect/Quant/QuantOps.h.inc"

} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_QUANTOPS_H_
#endif // MLIR_DIALECT_QUANT_QUANTOPS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
//
//===----------------------------------------------------------------------===//

#ifndef DIALECT_QUANTOPS_QUANT_OPS_
#define DIALECT_QUANTOPS_QUANT_OPS_
#ifndef DIALECT_QUANT_QUANT_OPS_
#define DIALECT_QUANT_QUANT_OPS_

include "mlir/Dialect/QuantOps/QuantOpsBase.td"
include "mlir/Dialect/Quant/QuantOpsBase.td"
include "mlir/Interfaces/SideEffects.td"

//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -281,4 +281,4 @@ def quant_CoupledRefOp : quant_Op<"coupled_ref", [SameOperandsAndResultType]> {
let results = (outs quant_RealValueType);
}

#endif // DIALECT_QUANTOPS_QUANT_OPS_
#endif // DIALECT_QUANT_QUANT_OPS_
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef DIALECT_QUANTOPS_QUANT_OPS_BASE_
#define DIALECT_QUANTOPS_QUANT_OPS_BASE_
#ifndef DIALECT_QUANT_QUANT_OPS_BASE_
#define DIALECT_QUANT_QUANT_OPS_BASE_

include "mlir/IR/OpBase.td"

Expand Down Expand Up @@ -68,4 +68,4 @@ def quant_UniformQuantizedType :
def quant_UniformQuantizedValueType :
quant_TypedPrimitiveOrContainer<quant_UniformQuantizedType>;

#endif // DIALECT_QUANTOPS_QUANT_OPS_BASE_
#endif // DIALECT_QUANT_QUANT_OPS_BASE_
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_QUANT_TYPES_H_
#define MLIR_DIALECT_QUANTOPS_QUANT_TYPES_H_
#ifndef MLIR_DIALECT_QUANT_QUANT_TYPES_H_
#define MLIR_DIALECT_QUANT_QUANT_TYPES_H_

#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
Expand Down Expand Up @@ -399,4 +399,4 @@ class UniformQuantizedPerAxisType
} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_QUANT_TYPES_H_
#endif // MLIR_DIALECT_QUANT_QUANT_TYPES_H_
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
#define MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
#ifndef MLIR_DIALECT_QUANT_QUANTIZEUTILS_H_
#define MLIR_DIALECT_QUANT_QUANTIZEUTILS_H_

namespace mlir {
class Attribute;
Expand Down Expand Up @@ -58,4 +58,4 @@ Attribute quantizeAttrUniform(Attribute realValue,
} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
#endif // MLIR_DIALECT_QUANT_QUANTIZEUTILS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_DIALECT_QUANTOPS_UNIFORMSUPPORT_H_
#define MLIR_DIALECT_QUANTOPS_UNIFORMSUPPORT_H_
#ifndef MLIR_DIALECT_QUANT_UNIFORMSUPPORT_H_
#define MLIR_DIALECT_QUANT_UNIFORMSUPPORT_H_

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "llvm/ADT/APFloat.h"
Expand Down Expand Up @@ -215,4 +215,4 @@ class UniformQuantizedPerAxisValueConverter {
} // namespace quant
} // namespace mlir

#endif // MLIR_DIALECT_QUANTOPS_UNIFORMSUPPORT_H_
#endif // MLIR_DIALECT_QUANT_UNIFORMSUPPORT_H_
2 changes: 1 addition & 1 deletion mlir/include/mlir/InitAllDialects.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/LoopOps/LoopOps.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/SDBM/SDBMDialect.h"
#include "mlir/Dialect/SPIRV/SPIRVDialect.h"
#include "mlir/Dialect/Shape/IR/Shape.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/InitAllPasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "mlir/Dialect/LLVMIR/Transforms/LegalizeForExport.h"
#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/LoopOps/Passes.h"
#include "mlir/Dialect/QuantOps/Passes.h"
#include "mlir/Dialect/Quant/Passes.h"
#include "mlir/Dialect/SPIRV/Passes.h"
#include "mlir/Quantizer/Transforms/Passes.h"
#include "mlir/Transforms/LocationSnapshot.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Quantizer/Support/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <functional>

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/Identifier.h"
#include "mlir/Quantizer/Support/ConstraintAnalysisGraph.h"
#include "mlir/Quantizer/Support/Metadata.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Quantizer/Support/Metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <limits>

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Quantizer/Support/Rules.h"
#include "llvm/ADT/SmallBitVector.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(LoopOps)
add_subdirectory(OpenMP)
add_subdirectory(QuantOps)
add_subdirectory(Quant)
add_subdirectory(SDBM)
add_subdirectory(Shape)
add_subdirectory(SPIRV)
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/FxpMathOps/IR/FxpMathOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/FxpMathOps/FxpMathOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/StandardTypes.h"
#include "llvm/ADT/StringRef.h"
Expand Down
6 changes: 3 additions & 3 deletions mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#ifndef MLIR_FXPMATH_UNIFORM_KERNEL_UTILS_H_
#define MLIR_FXPMATH_UNIFORM_KERNEL_UTILS_H_

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/QuantOps/UniformSupport.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/Dialect/Quant/UniformSupport.h"
#include "mlir/IR/Operation.h"

#include <cmath>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "TypeDetail.h"

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
Expand All @@ -29,7 +29,7 @@ QuantizationDialect::QuantizationDialect(MLIRContext *context)
UniformQuantizedPerAxisType>();
addOperations<
#define GET_OP_LIST
#include "mlir/Dialect/QuantOps/QuantOps.cpp.inc"
#include "mlir/Dialect/Quant/QuantOps.cpp.inc"
>();
}

Expand Down Expand Up @@ -93,4 +93,4 @@ static LogicalResult verifyRegionOp(QuantizeRegionOp op) {
}

#define GET_OP_CLASSES
#include "mlir/Dialect/QuantOps/QuantOps.cpp.inc"
#include "mlir/Dialect/Quant/QuantOps.cpp.inc"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "TypeDetail.h"

#include "mlir/IR/MLIRContext.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/StandardTypes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/Passes.h"
#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantizeUtils.h"
#include "mlir/Dialect/QuantOps/UniformSupport.h"
#include "mlir/Dialect/Quant/Passes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantizeUtils.h"
#include "mlir/Dialect/Quant/UniformSupport.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Matchers.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/FakeQuantSupport.h"
#include "mlir/Dialect/QuantOps/Passes.h"
#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/UniformSupport.h"
#include "mlir/Dialect/Quant/FakeQuantSupport.h"
#include "mlir/Dialect/Quant/Passes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/UniformSupport.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/StandardTypes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/FakeQuantSupport.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/FakeQuantSupport.h"
#include "mlir/Dialect/Quant/QuantTypes.h"

using namespace mlir;
using namespace mlir::quant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantizeUtils.h"
#include "mlir/Dialect/QuantOps/UniformSupport.h"
#include "mlir/Dialect/Quant/QuantizeUtils.h"
#include "mlir/Dialect/Quant/UniformSupport.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/StandardTypes.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/UniformSupport.h"
#include "mlir/Dialect/Quant/UniformSupport.h"
#include "mlir/IR/StandardTypes.h"
#include <numeric>

Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "mlir/Quantizer/Configurations/FxpMathConfig.h"

#include "mlir/Dialect/FxpMathOps/FxpMathOps.h"
#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/StandardTypes.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Quantizer/Support/UniformConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "mlir/Quantizer/Support/UniformConstraints.h"

#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/MLIRContext.h"
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/Quantizer/Configurations/FxpMathConfig.h"
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/QuantOps/QuantTypes.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/Quantizer/Configurations/FxpMathConfig.h"
#include "mlir/Quantizer/Support/Configuration.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/QuantOps/QuantOps.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 363dd3f

Please sign in to comment.