Skip to content

Commit d02fce2

Browse files
[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
1 parent ce3bbeb commit d02fce2

File tree

11 files changed

+15
-0
lines changed

11 files changed

+15
-0
lines changed

mlir/examples/toy/Ch1/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
set(LLVM_LINK_COMPONENTS
23
Support
34
)

mlir/examples/toy/Ch2/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
add_subdirectory(include)
23

34
set(LLVM_LINK_COMPONENTS

mlir/examples/toy/Ch3/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
include_directories(include)
23
add_subdirectory(include)
34

mlir/examples/toy/Ch4/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
include_directories(include)
23
add_subdirectory(include)
34

mlir/examples/toy/Ch4/include/toy/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# Most dialects should use add_mlir_dialect(). See examples/standalone.
12
set(LLVM_TARGET_DEFINITIONS Ops.td)
23
mlir_tablegen(Ops.h.inc -gen-op-decls)
34
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
45
add_public_tablegen_target(ToyCh4OpsIncGen)
56

7+
# Most dialects should use add_mlir_interfaces().
68
set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td)
79
mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls)
810
mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs)

mlir/examples/toy/Ch5/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
include_directories(include)
23
add_subdirectory(include)
34

mlir/examples/toy/Ch5/include/toy/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# Most dialects should use add_mlir_dialect(). See examples/standalone.
12
set(LLVM_TARGET_DEFINITIONS Ops.td)
23
mlir_tablegen(Ops.h.inc -gen-op-decls)
34
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
45
add_public_tablegen_target(ToyCh5OpsIncGen)
56

7+
# Most dialects should use add_mlir_interfaces().
68
set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td)
79
mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls)
810
mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs)

mlir/examples/toy/Ch6/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
include_directories(include)
23
add_subdirectory(include)
34

mlir/examples/toy/Ch6/include/toy/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# Most dialects should use add_mlir_dialect(). See examples/standalone.
12
set(LLVM_TARGET_DEFINITIONS Ops.td)
23
mlir_tablegen(Ops.h.inc -gen-op-decls)
34
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
45
add_public_tablegen_target(ToyCh6OpsIncGen)
56

7+
# Most dialects should use add_mlir_interfaces().
68
set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td)
79
mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls)
810
mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs)

mlir/examples/toy/Ch7/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# For a better template to copy, see examples/standalone
12
include_directories(include)
23
add_subdirectory(include)
34

mlir/examples/toy/Ch7/include/toy/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# Most dialects should use add_mlir_dialect(). See examples/standalone.
12
set(LLVM_TARGET_DEFINITIONS Ops.td)
23
mlir_tablegen(Ops.h.inc -gen-op-decls)
34
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
45
add_public_tablegen_target(ToyCh7OpsIncGen)
56

7+
# Most dialects should use add_mlir_interfaces().
68
set(LLVM_TARGET_DEFINITIONS ShapeInferenceInterface.td)
79
mlir_tablegen(ShapeInferenceOpInterfaces.h.inc -gen-op-interface-decls)
810
mlir_tablegen(ShapeInferenceOpInterfaces.cpp.inc -gen-op-interface-defs)

0 commit comments

Comments
 (0)