There is currently no path to lower scf.forall to scf.parallel with the goal of targeting the OpenMP dialect. In the SCF->ControlFlow conversion, scf.forall is briefly converted to scf.parallel, but the scf.parallel is lowered directly to a sequential loop. This makes experimenting with scf.forall for CPU execution difficult. This change factors out the rewrite in the SCF->ControlFlow pass into a utility function that can then be used in the SCF->ControlFlow lowering and via a separate -scf-forall-to-parallel pass. --------- Co-authored-by: Spenser Bauman <sabauma@fastmail>
20 lines
344 B
CMake
20 lines
344 B
CMake
add_mlir_conversion_library(MLIRSCFToControlFlow
|
|
SCFToControlFlow.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/SCFToControlFlow
|
|
|
|
DEPENDS
|
|
MLIRConversionPassIncGen
|
|
|
|
LINK_COMPONENTS
|
|
Core
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRArithDialect
|
|
MLIRControlFlowDialect
|
|
MLIRSCFDialect
|
|
MLIRSCFTransforms
|
|
MLIRTransforms
|
|
)
|