From: Stephen Neuendorffer Date: Wed, 13 May 2020 15:57:25 +0000 (-0700) Subject: [MLIR] Discourage people from copying the toy examples X-Git-Tag: llvmorg-12-init~6163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d02fce2d149eaad90fd5bcc0579de868fa86526d;p=platform%2Fupstream%2Fllvm.git [MLIR] Discourage people from copying the toy examples The CMake structure of the toy example is non-standard. encourage people to copy the standalone example instead. Differential Revision: https://reviews.llvm.org/D79889 --- diff --git a/mlir/examples/toy/Ch1/CMakeLists.txt b/mlir/examples/toy/Ch1/CMakeLists.txt index f4e8555..fd71e1f 100644 --- a/mlir/examples/toy/Ch1/CMakeLists.txt +++ b/mlir/examples/toy/Ch1/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone set(LLVM_LINK_COMPONENTS Support ) diff --git a/mlir/examples/toy/Ch2/CMakeLists.txt b/mlir/examples/toy/Ch2/CMakeLists.txt index 8184917..6553e18 100644 --- a/mlir/examples/toy/Ch2/CMakeLists.txt +++ b/mlir/examples/toy/Ch2/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone add_subdirectory(include) set(LLVM_LINK_COMPONENTS diff --git a/mlir/examples/toy/Ch3/CMakeLists.txt b/mlir/examples/toy/Ch3/CMakeLists.txt index ef70dcb..603d468 100644 --- a/mlir/examples/toy/Ch3/CMakeLists.txt +++ b/mlir/examples/toy/Ch3/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone include_directories(include) add_subdirectory(include) diff --git a/mlir/examples/toy/Ch4/CMakeLists.txt b/mlir/examples/toy/Ch4/CMakeLists.txt index ae30a69..24a9502 100644 --- a/mlir/examples/toy/Ch4/CMakeLists.txt +++ b/mlir/examples/toy/Ch4/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone include_directories(include) add_subdirectory(include) diff --git a/mlir/examples/toy/Ch4/include/toy/CMakeLists.txt b/mlir/examples/toy/Ch4/include/toy/CMakeLists.txt index 7f60477..f293ff6 100644 --- a/mlir/examples/toy/Ch4/include/toy/CMakeLists.txt +++ b/mlir/examples/toy/Ch4/include/toy/CMakeLists.txt @@ -1,8 +1,10 @@ +# Most dialects should use add_mlir_dialect(). See examples/standalone. set(LLVM_TARGET_DEFINITIONS Ops.td) mlir_tablegen(Ops.h.inc -gen-op-decls) mlir_tablegen(Ops.cpp.inc -gen-op-defs) add_public_tablegen_target(ToyCh4OpsIncGen) +# Most dialects should use add_mlir_interfaces(). set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td) mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls) mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs) diff --git a/mlir/examples/toy/Ch5/CMakeLists.txt b/mlir/examples/toy/Ch5/CMakeLists.txt index ba3a88e..dd032bf 100644 --- a/mlir/examples/toy/Ch5/CMakeLists.txt +++ b/mlir/examples/toy/Ch5/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone include_directories(include) add_subdirectory(include) diff --git a/mlir/examples/toy/Ch5/include/toy/CMakeLists.txt b/mlir/examples/toy/Ch5/include/toy/CMakeLists.txt index e8bd1fc..66ceb13 100644 --- a/mlir/examples/toy/Ch5/include/toy/CMakeLists.txt +++ b/mlir/examples/toy/Ch5/include/toy/CMakeLists.txt @@ -1,8 +1,10 @@ +# Most dialects should use add_mlir_dialect(). See examples/standalone. set(LLVM_TARGET_DEFINITIONS Ops.td) mlir_tablegen(Ops.h.inc -gen-op-decls) mlir_tablegen(Ops.cpp.inc -gen-op-defs) add_public_tablegen_target(ToyCh5OpsIncGen) +# Most dialects should use add_mlir_interfaces(). set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td) mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls) mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs) diff --git a/mlir/examples/toy/Ch6/CMakeLists.txt b/mlir/examples/toy/Ch6/CMakeLists.txt index c821c77..9e3d7383 100644 --- a/mlir/examples/toy/Ch6/CMakeLists.txt +++ b/mlir/examples/toy/Ch6/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone include_directories(include) add_subdirectory(include) diff --git a/mlir/examples/toy/Ch6/include/toy/CMakeLists.txt b/mlir/examples/toy/Ch6/include/toy/CMakeLists.txt index c6adf5a..cc5b746 100644 --- a/mlir/examples/toy/Ch6/include/toy/CMakeLists.txt +++ b/mlir/examples/toy/Ch6/include/toy/CMakeLists.txt @@ -1,8 +1,10 @@ +# Most dialects should use add_mlir_dialect(). See examples/standalone. set(LLVM_TARGET_DEFINITIONS Ops.td) mlir_tablegen(Ops.h.inc -gen-op-decls) mlir_tablegen(Ops.cpp.inc -gen-op-defs) add_public_tablegen_target(ToyCh6OpsIncGen) +# Most dialects should use add_mlir_interfaces(). set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td) mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls) mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs) diff --git a/mlir/examples/toy/Ch7/CMakeLists.txt b/mlir/examples/toy/Ch7/CMakeLists.txt index f622bf5..66bfab6 100644 --- a/mlir/examples/toy/Ch7/CMakeLists.txt +++ b/mlir/examples/toy/Ch7/CMakeLists.txt @@ -1,3 +1,4 @@ +# For a better template to copy, see examples/standalone include_directories(include) add_subdirectory(include) diff --git a/mlir/examples/toy/Ch7/include/toy/CMakeLists.txt b/mlir/examples/toy/Ch7/include/toy/CMakeLists.txt index 43eb23b..977ebb6 100644 --- a/mlir/examples/toy/Ch7/include/toy/CMakeLists.txt +++ b/mlir/examples/toy/Ch7/include/toy/CMakeLists.txt @@ -1,8 +1,10 @@ +# Most dialects should use add_mlir_dialect(). See examples/standalone. set(LLVM_TARGET_DEFINITIONS Ops.td) mlir_tablegen(Ops.h.inc -gen-op-decls) mlir_tablegen(Ops.cpp.inc -gen-op-defs) add_public_tablegen_target(ToyCh7OpsIncGen) +# Most dialects should use add_mlir_interfaces(). set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td) mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls) mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs)