Add mlir_cpu_runner tests infra for CHLO->LHLO->LLVM lowering.
PiperOrigin-RevId: 320218897
This commit is contained in:
parent
a575636862
commit
f4303855c4
|
@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
#include "third_party/llvm/llvm-project/mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h"
|
||||
#include "third_party/llvm/llvm-project/mlir/include/mlir/Conversion/SCFToStandard/SCFToStandard.h"
|
||||
#include "third_party/llvm/llvm-project/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
|
||||
#include "third_party/llvm/llvm-project/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
|
||||
#include "third_party/llvm/llvm-project/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h"
|
||||
|
@ -38,6 +40,9 @@ class TestLhloToLLVMPass
|
|||
populateStdToLLVMConversionPatterns(converter, patterns);
|
||||
PopulateLhloToLLVMConversionPatterns(
|
||||
LowerToLLVMOptions::getDefaultOptions(), &converter, &patterns);
|
||||
mlir::populateLoopToStdConversionPatterns(patterns, &getContext());
|
||||
|
||||
mlir::populateAffineToStdConversionPatterns(patterns, m.getContext());
|
||||
|
||||
ConversionTarget target(getContext());
|
||||
target.addLegalDialect<LLVM::LLVMDialect>();
|
||||
|
|
Loading…
Reference in New Issue