forked from OSchip/llvm-project
[MLIR] Move from add_dependencies() to DEPENDS
add_llvm_library and add_llvm_executable may need to create new targets with appropriate dependencies. As a result, it is not sufficient in some configurations (namely LLVM_BUILD_LLVM_DYLIB=on) to only call add_dependencies(). Instead, the explicit TableGen dependencies must be passed to add_llvm_library() or add_llvm_executable() using the DEPENDS keyword. Differential Revision: https://reviews.llvm.org/D74930
This commit is contained in:
parent
c4c8fbde64
commit
31e07d716a
|
@ -9,10 +9,13 @@ add_toy_chapter(toyc-ch2
|
||||||
parser/AST.cpp
|
parser/AST.cpp
|
||||||
mlir/MLIRGen.cpp
|
mlir/MLIRGen.cpp
|
||||||
mlir/Dialect.cpp
|
mlir/Dialect.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh2OpsIncGen
|
||||||
|
|
||||||
)
|
)
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
add_dependencies(toyc-ch2 ToyCh2OpsIncGen)
|
|
||||||
target_link_libraries(toyc-ch2
|
target_link_libraries(toyc-ch2
|
||||||
PRIVATE
|
PRIVATE
|
||||||
MLIRAnalysis
|
MLIRAnalysis
|
||||||
|
|
|
@ -14,10 +14,12 @@ add_toy_chapter(toyc-ch3
|
||||||
mlir/MLIRGen.cpp
|
mlir/MLIRGen.cpp
|
||||||
mlir/Dialect.cpp
|
mlir/Dialect.cpp
|
||||||
mlir/ToyCombine.cpp
|
mlir/ToyCombine.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh3OpsIncGen
|
||||||
|
ToyCh3CombineIncGen
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(toyc-ch3 ToyCh3OpsIncGen)
|
|
||||||
add_dependencies(toyc-ch3 ToyCh3CombineIncGen)
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
|
@ -15,12 +15,14 @@ add_toy_chapter(toyc-ch4
|
||||||
mlir/Dialect.cpp
|
mlir/Dialect.cpp
|
||||||
mlir/ShapeInferencePass.cpp
|
mlir/ShapeInferencePass.cpp
|
||||||
mlir/ToyCombine.cpp
|
mlir/ToyCombine.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh4OpsIncGen
|
||||||
|
ToyCh4ShapeInferenceInterfaceIncGen
|
||||||
|
ToyCh4CombineIncGen
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(toyc-ch4 ToyCh4OpsIncGen)
|
|
||||||
add_dependencies(toyc-ch4 ToyCh4ShapeInferenceInterfaceIncGen)
|
|
||||||
add_dependencies(toyc-ch4 ToyCh4CombineIncGen)
|
|
||||||
add_dependencies(toyc-ch4 MLIRCallOpInterfacesIncGen)
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
|
@ -16,12 +16,14 @@ add_toy_chapter(toyc-ch5
|
||||||
mlir/LowerToAffineLoops.cpp
|
mlir/LowerToAffineLoops.cpp
|
||||||
mlir/ShapeInferencePass.cpp
|
mlir/ShapeInferencePass.cpp
|
||||||
mlir/ToyCombine.cpp
|
mlir/ToyCombine.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh5ShapeInferenceInterfaceIncGen
|
||||||
|
ToyCh5OpsIncGen
|
||||||
|
ToyCh5CombineIncGen
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(toyc-ch5 ToyCh5ShapeInferenceInterfaceIncGen)
|
|
||||||
add_dependencies(toyc-ch5 ToyCh5OpsIncGen)
|
|
||||||
add_dependencies(toyc-ch5 ToyCh5CombineIncGen)
|
|
||||||
add_dependencies(toyc-ch5 MLIRCallOpInterfacesIncGen)
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
|
@ -18,12 +18,14 @@ add_toy_chapter(toyc-ch6
|
||||||
mlir/LowerToLLVM.cpp
|
mlir/LowerToLLVM.cpp
|
||||||
mlir/ShapeInferencePass.cpp
|
mlir/ShapeInferencePass.cpp
|
||||||
mlir/ToyCombine.cpp
|
mlir/ToyCombine.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh6ShapeInferenceInterfaceIncGen
|
||||||
|
ToyCh6OpsIncGen
|
||||||
|
ToyCh6CombineIncGen
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(toyc-ch6 ToyCh6ShapeInferenceInterfaceIncGen)
|
|
||||||
add_dependencies(toyc-ch6 ToyCh6OpsIncGen)
|
|
||||||
add_dependencies(toyc-ch6 ToyCh6CombineIncGen)
|
|
||||||
add_dependencies(toyc-ch6 MLIRCallOpInterfacesIncGen)
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
|
@ -18,12 +18,14 @@ add_toy_chapter(toyc-ch7
|
||||||
mlir/LowerToLLVM.cpp
|
mlir/LowerToLLVM.cpp
|
||||||
mlir/ShapeInferencePass.cpp
|
mlir/ShapeInferencePass.cpp
|
||||||
mlir/ToyCombine.cpp
|
mlir/ToyCombine.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
ToyCh7ShapeInferenceInterfaceIncGen
|
||||||
|
ToyCh7OpsIncGen
|
||||||
|
ToyCh7CombineIncGen
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(toyc-ch7 ToyCh7ShapeInferenceInterfaceIncGen)
|
|
||||||
add_dependencies(toyc-ch7 ToyCh7OpsIncGen)
|
|
||||||
add_dependencies(toyc-ch7 ToyCh7CombineIncGen)
|
|
||||||
add_dependencies(toyc-ch7 MLIRCallOpInterfacesIncGen)
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
|
@ -23,6 +23,10 @@ add_llvm_library(MLIRAnalysis
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
|
MLIRTypeInferOpInterfaceIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -30,10 +34,6 @@ add_llvm_library(MLIRAnalysis
|
||||||
MLIRSupport
|
MLIRSupport
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRAnalysis
|
|
||||||
MLIRCallOpInterfacesIncGen
|
|
||||||
MLIRTypeInferOpInterfaceIncGen
|
|
||||||
)
|
|
||||||
|
|
||||||
add_llvm_library(MLIRLoopAnalysis
|
add_llvm_library(MLIRLoopAnalysis
|
||||||
AffineAnalysis.cpp
|
AffineAnalysis.cpp
|
||||||
|
@ -45,6 +45,10 @@ add_llvm_library(MLIRLoopAnalysis
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
|
MLIRTypeInferOpInterfaceIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -53,7 +57,3 @@ add_llvm_library(MLIRLoopAnalysis
|
||||||
MLIRSupport
|
MLIRSupport
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRLoopAnalysis
|
|
||||||
MLIRCallOpInterfacesIncGen
|
|
||||||
MLIRTypeInferOpInterfaceIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ add_public_tablegen_target(MLIRGPUToNVVMIncGen)
|
||||||
add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
|
add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
|
||||||
LowerGpuOpsToNVVMOps.cpp
|
LowerGpuOpsToNVVMOps.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRGPUToNVVMIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
LLVMCore
|
LLVMCore
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
|
@ -19,6 +22,3 @@ add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
|
||||||
MLIRTransforms
|
MLIRTransforms
|
||||||
MLIRTransformUtils
|
MLIRTransformUtils
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRGPUtoNVVMTransforms
|
|
||||||
MLIRGPUToNVVMIncGen)
|
|
||||||
|
|
|
@ -6,6 +6,9 @@ add_mlir_conversion_library(MLIRGPUtoSPIRVTransforms
|
||||||
ConvertGPUToSPIRV.cpp
|
ConvertGPUToSPIRV.cpp
|
||||||
ConvertGPUToSPIRVPass.cpp
|
ConvertGPUToSPIRVPass.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRGPUToSPIRVIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRGPU
|
MLIRGPU
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -18,6 +21,3 @@ add_mlir_conversion_library(MLIRGPUtoSPIRVTransforms
|
||||||
MLIRTransforms
|
MLIRTransforms
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRGPUtoSPIRVTransforms
|
|
||||||
MLIRGPUToSPIRVIncGen)
|
|
||||||
|
|
|
@ -11,6 +11,9 @@ add_mlir_conversion_library(MLIRStandardToSPIRVTransforms
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRStandardToSPIRVIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRPass
|
MLIRPass
|
||||||
|
@ -22,6 +25,3 @@ add_mlir_conversion_library(MLIRStandardToSPIRVTransforms
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRStandardToSPIRVTransforms
|
|
||||||
MLIRStandardToSPIRVIncGen)
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ add_mlir_dialect_library(MLIRAffineOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRAffineOpsIncGen
|
||||||
|
MLIRLoopLikeInterfaceIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIREDSC
|
MLIREDSC
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRAffineOps
|
|
||||||
MLIRAffineOpsIncGen
|
|
||||||
MLIRLoopLikeInterfaceIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ add_mlir_dialect_library(MLIRFxpMathOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/FxpMathOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/FxpMathOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRFxpMathOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRQuantOps
|
MLIRQuantOps
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -15,6 +18,3 @@ add_mlir_dialect_library(MLIRFxpMathOps
|
||||||
MLIRTransformUtils
|
MLIRTransformUtils
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRFxpMathOps
|
|
||||||
MLIRFxpMathOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -8,6 +8,9 @@ add_mlir_dialect_library(MLIRGPU
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/GPU
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/GPU
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRGPUOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIREDSC
|
MLIREDSC
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -19,6 +22,3 @@ add_mlir_dialect_library(MLIRGPU
|
||||||
MLIRTransformUtils
|
MLIRTransformUtils
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRGPU
|
|
||||||
MLIRGPUOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -4,6 +4,10 @@ add_mlir_dialect_library(MLIRLLVMIR
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRLLVMOpsIncGen
|
||||||
|
MLIRLLVMConversionsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
LLVMAsmParser
|
LLVMAsmParser
|
||||||
LLVMCore
|
LLVMCore
|
||||||
|
@ -11,10 +15,6 @@ add_mlir_dialect_library(MLIRLLVMIR
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRSupport
|
MLIRSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRLLVMIR
|
|
||||||
MLIRLLVMOpsIncGen
|
|
||||||
MLIRLLVMConversionsIncGen
|
|
||||||
)
|
|
||||||
|
|
||||||
add_mlir_dialect_library(MLIRNVVMIR
|
add_mlir_dialect_library(MLIRNVVMIR
|
||||||
IR/NVVMDialect.cpp
|
IR/NVVMDialect.cpp
|
||||||
|
@ -22,6 +22,10 @@ add_mlir_dialect_library(MLIRNVVMIR
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRNVVMOpsIncGen
|
||||||
|
MLIRNVVMConversionsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
LLVMAsmParser
|
LLVMAsmParser
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -29,12 +33,6 @@ add_mlir_dialect_library(MLIRNVVMIR
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
LLVMCore
|
LLVMCore
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRNVVMIR
|
|
||||||
MLIRNVVMOpsIncGen
|
|
||||||
MLIRNVVMConversionsIncGen
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_mlir_dialect_library(MLIRROCDLIR
|
add_mlir_dialect_library(MLIRROCDLIR
|
||||||
IR/ROCDLDialect.cpp
|
IR/ROCDLDialect.cpp
|
||||||
|
@ -42,13 +40,13 @@ add_mlir_dialect_library(MLIRROCDLIR
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRROCDLOpsIncGen
|
||||||
|
MLIRROCDLConversionsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
LLVMAsmParser
|
LLVMAsmParser
|
||||||
LLVMCore
|
LLVMCore
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
MLIRIR
|
MLIRIR
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRROCDLIR
|
|
||||||
MLIRROCDLOpsIncGen
|
|
||||||
MLIRROCDLConversionsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -7,8 +7,10 @@ add_mlir_dialect_library(MLIRLinalgTransforms
|
||||||
|
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
intrinsics_gen
|
intrinsics_gen
|
||||||
|
MLIRLinalgTransformPatternsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
|
@ -27,6 +29,3 @@ add_mlir_dialect_library(MLIRLinalgTransforms
|
||||||
MLIRVectorOps
|
MLIRVectorOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRLinalgTransforms
|
|
||||||
MLIRLinalgTransformPatternsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -6,15 +6,15 @@ add_mlir_dialect_library(MLIRLoopOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRLoopLikeInterfaceIncGen
|
||||||
|
MLIRLoopOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIREDSC
|
MLIREDSC
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRLoopOps
|
|
||||||
MLIRLoopLikeInterfaceIncGen
|
|
||||||
MLIRLoopOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(Transforms)
|
add_subdirectory(Transforms)
|
||||||
|
|
|
@ -4,10 +4,11 @@ add_mlir_dialect_library(MLIROpenMP
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/OpenMP
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/OpenMP
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIROpenMPOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
LLVMCore
|
LLVMCore
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIROpenMP MLIROpenMPOpsIncGen)
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ add_mlir_dialect_library(MLIRQuantOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/QuantOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/QuantOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRQuantOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRPass
|
MLIRPass
|
||||||
|
@ -20,6 +23,3 @@ add_mlir_dialect_library(MLIRQuantOps
|
||||||
MLIRTransformUtils
|
MLIRTransformUtils
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRQuantOps
|
|
||||||
MLIRQuantOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -14,6 +14,15 @@ add_mlir_dialect_library(MLIRSPIRV
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRSPIRVAvailabilityIncGen
|
||||||
|
MLIRSPIRVCanonicalizationIncGen
|
||||||
|
MLIRSPIRVEnumAvailabilityIncGen
|
||||||
|
MLIRSPIRVEnumsIncGen
|
||||||
|
MLIRSPIRVOpsIncGen
|
||||||
|
MLIRSPIRVOpUtilsGen
|
||||||
|
MLIRSPIRVTargetAndABIIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRParser
|
MLIRParser
|
||||||
|
@ -23,15 +32,5 @@ add_mlir_dialect_library(MLIRSPIRV
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRSPIRV
|
|
||||||
MLIRSPIRVAvailabilityIncGen
|
|
||||||
MLIRSPIRVCanonicalizationIncGen
|
|
||||||
MLIRSPIRVEnumAvailabilityIncGen
|
|
||||||
MLIRSPIRVEnumsIncGen
|
|
||||||
MLIRSPIRVOpsIncGen
|
|
||||||
MLIRSPIRVOpUtilsGen
|
|
||||||
MLIRSPIRVTargetAndABIIncGen)
|
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(Serialization)
|
add_subdirectory(Serialization)
|
||||||
add_subdirectory(Transforms)
|
add_subdirectory(Transforms)
|
||||||
|
|
|
@ -7,6 +7,9 @@ add_mlir_dialect_library(MLIRSPIRVSerialization
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRSPIRVSerializationGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRParser
|
MLIRParser
|
||||||
|
@ -15,6 +18,3 @@ add_mlir_dialect_library(MLIRSPIRVSerialization
|
||||||
MLIRTranslation
|
MLIRTranslation
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRSPIRVSerialization
|
|
||||||
MLIRSPIRVSerializationGen)
|
|
||||||
|
|
|
@ -6,6 +6,10 @@ add_mlir_dialect_library(MLIRStandardOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
|
MLIRStandardOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIREDSC
|
MLIREDSC
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -13,7 +17,3 @@ add_mlir_dialect_library(MLIRStandardOps
|
||||||
LLVMCore
|
LLVMCore
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRStandardOps
|
|
||||||
MLIRCallOpInterfacesIncGen
|
|
||||||
MLIRStandardOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -7,6 +7,10 @@ add_mlir_dialect_library(MLIRVectorOps
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/VectorOps
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/VectorOps
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRVectorOpsIncGen
|
||||||
|
MLIRVectorTransformPatternsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
|
@ -15,6 +19,3 @@ add_mlir_dialect_library(MLIRVectorOps
|
||||||
MLIRLoopAnalysis
|
MLIRLoopAnalysis
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRVectorOps MLIRVectorOpsIncGen)
|
|
||||||
add_dependencies(MLIRVectorOps MLIRVectorTransformPatternsIncGen)
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ add_llvm_library(MLIRIR
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRCallOpInterfacesIncGen
|
||||||
|
MLIROpAsmInterfacesIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRSupport
|
MLIRSupport
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
${LLVM_PTHREAD_LIB}
|
${LLVM_PTHREAD_LIB}
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRIR
|
|
||||||
MLIRCallOpInterfacesIncGen
|
|
||||||
MLIROpAsmInterfacesIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
|
||||||
|
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRFxpMathOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRFxpMathOps
|
MLIRFxpMathOps
|
||||||
|
@ -34,10 +37,6 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRQuantizerFxpMathConfig
|
|
||||||
MLIRFxpMathOpsIncGen
|
|
||||||
)
|
|
||||||
|
|
||||||
# Transforms.
|
# Transforms.
|
||||||
add_llvm_library(MLIRQuantizerTransforms
|
add_llvm_library(MLIRQuantizerTransforms
|
||||||
Transforms/AddDefaultStatsTestPass.cpp
|
Transforms/AddDefaultStatsTestPass.cpp
|
||||||
|
|
|
@ -27,6 +27,10 @@ add_llvm_library(MLIRTransforms
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRLoopLikeInterfaceIncGen
|
||||||
|
MLIRStandardOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
MLIRAnalysis
|
MLIRAnalysis
|
||||||
|
@ -40,7 +44,3 @@ add_llvm_library(MLIRTransforms
|
||||||
MLIRVectorOps
|
MLIRVectorOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(MLIRTransforms
|
|
||||||
MLIRLoopLikeInterfaceIncGen
|
|
||||||
MLIRStandardOpsIncGen)
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ add_llvm_library(MLIRTransformUtils
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRStandardOpsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
MLIRAnalysis
|
MLIRAnalysis
|
||||||
|
@ -20,4 +23,3 @@ add_llvm_library(MLIRTransformUtils
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRTransformUtils MLIRStandardOpsIncGen)
|
|
||||||
|
|
|
@ -15,6 +15,10 @@ add_llvm_library(MLIRTestDialect
|
||||||
TestDialect.cpp
|
TestDialect.cpp
|
||||||
TestPatterns.cpp
|
TestPatterns.cpp
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRTestOpsIncGen
|
||||||
|
MLIRTypeInferOpInterfaceIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAnalysis
|
MLIRAnalysis
|
||||||
MLIRDialect
|
MLIRDialect
|
||||||
|
@ -25,7 +29,3 @@ add_llvm_library(MLIRTestDialect
|
||||||
MLIRTransformUtils
|
MLIRTransformUtils
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
)
|
)
|
||||||
add_dependencies(MLIRTestDialect
|
|
||||||
MLIRTestOpsIncGen
|
|
||||||
MLIRTypeInferOpInterfaceIncGen
|
|
||||||
)
|
|
||||||
|
|
|
@ -23,6 +23,11 @@ add_llvm_library(MLIRTestTransforms
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
MLIRStandardOpsIncGen
|
||||||
|
MLIRTestLinalgTransformPatternsIncGen
|
||||||
|
MLIRTestVectorTransformPatternsIncGen
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
MLIRAffineOps
|
MLIRAffineOps
|
||||||
MLIRAnalysis
|
MLIRAnalysis
|
||||||
|
@ -47,6 +52,3 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../DeclarativeTransforms)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../DeclarativeTransforms)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms)
|
||||||
add_dependencies(MLIRTestTransforms MLIRStandardOpsIncGen)
|
|
||||||
add_dependencies(MLIRTestTransforms MLIRTestLinalgTransformPatternsIncGen)
|
|
||||||
add_dependencies(MLIRTestTransforms MLIRTestVectorTransformPatternsIncGen)
|
|
||||||
|
|
|
@ -68,8 +68,10 @@ if(MLIR_CUDA_RUNNER_ENABLED)
|
||||||
|
|
||||||
add_llvm_tool(mlir-cuda-runner
|
add_llvm_tool(mlir-cuda-runner
|
||||||
mlir-cuda-runner.cpp
|
mlir-cuda-runner.cpp
|
||||||
)
|
|
||||||
add_dependencies(mlir-cuda-runner cuda-runtime-wrappers)
|
DEPENDS
|
||||||
|
cuda-runtime-wrappers
|
||||||
|
)
|
||||||
target_include_directories(mlir-cuda-runner
|
target_include_directories(mlir-cuda-runner
|
||||||
PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue