Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Move Linalg and VectorOps dialects to the Dialect subdir - NFC
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 264277760
  • Loading branch information
Nicolas Vasilache authored and tensorflower-gardener committed Aug 20, 2019
1 parent f9d4405 commit 7794305
Show file tree
Hide file tree
Showing 42 changed files with 93 additions and 93 deletions.
2 changes: 0 additions & 2 deletions include/mlir/CMakeLists.txt
@@ -1,5 +1,3 @@
add_subdirectory(AffineOps)
add_subdirectory(Dialect)
add_subdirectory(EDSC)
add_subdirectory(Linalg)
add_subdirectory(VectorOps)
2 changes: 2 additions & 0 deletions include/mlir/Dialect/CMakeLists.txt
@@ -1,7 +1,9 @@
add_subdirectory(FxpMathOps)
add_subdirectory(GPU)
add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(LoopOps)
add_subdirectory(QuantOps)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)
add_subdirectory(VectorOps)
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_
#define MLIR_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_
#ifndef MLIR_DIALECT_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_
#define MLIR_DIALECT_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_

#include "mlir/IR/Builders.h"
#include "mlir/IR/OpDefinition.h"
Expand Down Expand Up @@ -134,4 +134,4 @@ class LinalgDependenceGraph {
} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_
#endif // MLIR_DIALECT_LINALG_ANALYSIS_DEPENDENCEANALYSIS_H_
Expand Up @@ -25,7 +25,7 @@
#define LINALG_LIBRARY_OPS

include "mlir/AffineOps/AffineOpsBase.td"
include "mlir/Linalg/IR/LinalgBase.td"
include "mlir/Dialect/Linalg/IR/LinalgBase.td"

class LinalgParametricNativeOpTrait<string prop, string parameters> :
NativeOpTrait<"linalg::" # prop # parameters>
Expand Down
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_LINALGOPS_H_
#define MLIR_LINALG_LINALGOPS_H_
#ifndef MLIR_DIALECT_LINALG_LINALGOPS_H_
#define MLIR_DIALECT_LINALG_LINALGOPS_H_

#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Builders.h"
Expand All @@ -26,8 +26,8 @@
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/IR/Types.h"
#include "mlir/Linalg/IR/LinalgTraits.h"
#include "mlir/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/IR/LinalgTraits.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
#include "mlir/Support/LLVM.h"

namespace mlir {
Expand Down Expand Up @@ -216,14 +216,14 @@ class LinalgOp : public OpInterface<LinalgOp, detail::LinalgOpInterfaceTraits> {
};

#define GET_OP_CLASSES
#include "mlir/Linalg/IR/LinalgOps.h.inc"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h.inc"

#define GET_OP_CLASSES
#include "mlir/Linalg/IR/LinalgLibraryOps.h.inc"
#include "mlir/Dialect/Linalg/IR/LinalgLibraryOps.h.inc"

llvm::raw_ostream &operator<<(llvm::raw_ostream &os, SubViewOp::Range &range);

} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_LINALGOPS_H_
#endif // MLIR_DIALECT_LINALG_LINALGOPS_H_
Expand Up @@ -19,7 +19,7 @@
//
//===----------------------------------------------------------------------===//

include "mlir/Linalg/IR/LinalgBase.td"
include "mlir/Dialect/Linalg/IR/LinalgBase.td"

#ifdef LINALG_OPS
#else
Expand Down
Expand Up @@ -15,11 +15,11 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_LINALGTRAITS_H_
#define MLIR_LINALG_LINALGTRAITS_H_
#ifndef MLIR_DIALECT_LINALG_LINALGTRAITS_H_
#define MLIR_DIALECT_LINALG_LINALGTRAITS_H_

#include "mlir/IR/OpDefinition.h"
#include "mlir/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
#include "mlir/Support/LLVM.h"

namespace mlir {
Expand Down Expand Up @@ -190,4 +190,4 @@ template <unsigned... Ranks> class ViewRanks {
} // namespace OpTrait
} // namespace mlir

#endif // MLIR_LINALG_LINALGTRAITS_H_
#endif // MLIR_DIALECT_LINALG_LINALGTRAITS_H_
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_LINALGTYPES_H_
#define MLIR_LINALG_LINALGTYPES_H_
#ifndef MLIR_DIALECT_LINALG_LINALGTYPES_H_
#define MLIR_DIALECT_LINALG_LINALGTYPES_H_

#include "mlir/IR/Dialect.h"
#include "mlir/IR/Types.h"
Expand Down Expand Up @@ -118,4 +118,4 @@ class ViewType : public Type::TypeBase<ViewType, Type, ViewTypeStorage> {
} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_LINALGTYPES_H_
#endif // MLIR_DIALECT_LINALG_LINALGTYPES_H_
Expand Up @@ -19,8 +19,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_LINALG_PASSES_H_
#define MLIR_LINALG_PASSES_H_
#ifndef MLIR_DIALECT_LINALG_PASSES_H_
#define MLIR_DIALECT_LINALG_PASSES_H_

#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
Expand All @@ -43,4 +43,4 @@ std::unique_ptr<ModulePassBase> createLowerLinalgToLLVMPass();
} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_PASSES_H_
#endif // MLIR_DIALECT_LINALG_PASSES_H_
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_INTRINSICS_H_
#define MLIR_LINALG_INTRINSICS_H_
#ifndef MLIR_DIALECT_LINALG_INTRINSICS_H_
#define MLIR_DIALECT_LINALG_INTRINSICS_H_

#include "mlir/EDSC/Intrinsics.h"

Expand Down Expand Up @@ -48,4 +48,4 @@ using view = mlir::edsc::intrinsics::ValueBuilder<ViewOp>;
} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_INTRINSICS_H_
#endif // MLIR_DIALECT_LINALG_INTRINSICS_H_
Expand Up @@ -15,13 +15,13 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_LINALG_UTILS_H_
#define MLIR_LINALG_UTILS_H_
#ifndef MLIR_DIALECT_LINALG_UTILS_H_
#define MLIR_DIALECT_LINALG_UTILS_H_

#include "mlir/Dialect/LoopOps/LoopOps.h"
#include "mlir/EDSC/Helpers.h"
#include "mlir/Linalg/IR/LinalgOps.h"
#include "mlir/Linalg/Utils/Intrinsics.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/Utils/Intrinsics.h"
#include "mlir/Support/LLVM.h"

namespace mlir {
Expand Down Expand Up @@ -153,4 +153,4 @@ llvm::SmallVector<Value *, 4> getAssumedNonViewOperands(LinalgOp linalgOp);
} // namespace linalg
} // namespace mlir

#endif // MLIR_LINALG_UTILS_H_
#endif // MLIR_DIALECT_LINALG_UTILS_H_
Expand Up @@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_VECTOROPS_VECTOROPS_H
#define MLIR_VECTOROPS_VECTOROPS_H
#ifndef MLIR_DIALECT_VECTOROPS_VECTOROPS_H
#define MLIR_DIALECT_VECTOROPS_VECTOROPS_H

#include "mlir/IR/Attributes.h"
#include "mlir/IR/Dialect.h"
Expand Down Expand Up @@ -204,9 +204,9 @@ class VectorTypeCastOp
};

#define GET_OP_CLASSES
#include "mlir/VectorOps/VectorOps.h.inc"
#include "mlir/Dialect/VectorOps/VectorOps.h.inc"

} // end namespace vector
} // end namespace mlir

#endif // MLIR_VECTOROPS_VECTOROPS_H
#endif // MLIR_DIALECT_VECTOROPS_VECTOROPS_H
2 changes: 1 addition & 1 deletion include/mlir/EDSC/Builders.h
Expand Up @@ -25,9 +25,9 @@

#include "mlir/AffineOps/AffineOps.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/Dialect/VectorOps/VectorOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/Transforms/FoldUtils.h"
#include "mlir/VectorOps/VectorOps.h"

namespace mlir {

Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/LoopAnalysis.cpp
Expand Up @@ -27,12 +27,12 @@
#include "mlir/Analysis/NestedMatcher.h"
#include "mlir/Analysis/VectorAnalysis.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/Dialect/VectorOps/VectorOps.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/MathExtras.h"
#include "mlir/VectorOps/VectorOps.h"

#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallString.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/VectorAnalysis.cpp
Expand Up @@ -20,12 +20,12 @@
#include "mlir/Analysis/AffineAnalysis.h"
#include "mlir/Analysis/LoopAnalysis.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/Dialect/VectorOps/VectorOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/STLExtras.h"
#include "mlir/VectorOps/VectorOps.h"

#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
Expand Down
2 changes: 0 additions & 2 deletions lib/CMakeLists.txt
Expand Up @@ -5,7 +5,6 @@ add_subdirectory(Dialect)
add_subdirectory(EDSC)
add_subdirectory(ExecutionEngine)
add_subdirectory(IR)
add_subdirectory(Linalg)
add_subdirectory(Parser)
add_subdirectory(Pass)
add_subdirectory(Quantizer)
Expand All @@ -14,4 +13,3 @@ add_subdirectory(TableGen)
add_subdirectory(Target)
add_subdirectory(Transforms)
add_subdirectory(Translation)
add_subdirectory(VectorOps)
2 changes: 1 addition & 1 deletion lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
Expand Up @@ -19,6 +19,7 @@
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/VectorOps/VectorOps.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/MLIRContext.h"
Expand All @@ -31,7 +32,6 @@
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/VectorOps/VectorOps.h"

#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Module.h"
Expand Down
2 changes: 2 additions & 0 deletions lib/Dialect/CMakeLists.txt
@@ -1,11 +1,13 @@
add_subdirectory(FxpMathOps)
add_subdirectory(GPU)
add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(LoopOps)
add_subdirectory(QuantOps)
add_subdirectory(SDBM)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)
add_subdirectory(VectorOps)

add_llvm_library(MLIRDialect
Traits.cpp
Expand Down
Expand Up @@ -19,8 +19,8 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Linalg/Analysis/DependenceAnalysis.h"
#include "mlir/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"

#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
Expand Down
Expand Up @@ -10,7 +10,7 @@ add_llvm_library(MLIRLinalg
Utils/Utils.cpp

ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Linalg
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
DEPENDS
intrinsics_gen
)
Expand Down
Expand Up @@ -19,7 +19,7 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/LoopOps/LoopOps.h"
#include "mlir/EDSC/Helpers.h"
#include "mlir/IR/AffineExpr.h"
Expand All @@ -30,8 +30,8 @@
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Linalg/IR/LinalgTypes.h"
#include "mlir/Linalg/Utils/Utils.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/STLExtras.h"
#include "mlir/Transforms/FoldUtils.h"
Expand Down Expand Up @@ -830,10 +830,10 @@ namespace mlir {
namespace linalg {

#define GET_OP_CLASSES
#include "mlir/Linalg/IR/LinalgOps.cpp.inc"
#include "mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc"

#define GET_OP_CLASSES
#include "mlir/Linalg/IR/LinalgLibraryOps.cpp.inc"
#include "mlir/Dialect/Linalg/IR/LinalgLibraryOps.cpp.inc"

} // namespace linalg
} // namespace mlir
Expand Down
Expand Up @@ -19,10 +19,10 @@
//
//===----------------------------------------------------------------------===//

#include "mlir/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Parser.h"
#include "mlir/Support/LLVM.h"

Expand All @@ -37,11 +37,11 @@ mlir::linalg::LinalgDialect::LinalgDialect(MLIRContext *context)
addTypes<BufferType, RangeType, ViewType>();
addOperations<
#define GET_OP_LIST
#include "mlir/Linalg/IR/LinalgOps.cpp.inc"
#include "mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc"
>();
addOperations<
#define GET_OP_LIST
#include "mlir/Linalg/IR/LinalgLibraryOps.cpp.inc"
#include "mlir/Dialect/Linalg/IR/LinalgLibraryOps.cpp.inc"
>();
}

Expand Down
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#include "mlir/Linalg/IR/LinalgOps.h"
#include "mlir/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"

using namespace mlir;
using namespace mlir::linalg;
Expand Down

0 comments on commit 7794305

Please sign in to comment.