2019-11-19 08:37:58 +08:00
|
|
|
|
|
|
|
import lit.llvm
|
|
|
|
|
2020-04-14 17:40:05 +08:00
|
|
|
if '@BUILD_SHARED_LIBS@' == 'ON':
|
2020-04-19 22:11:24 +08:00
|
|
|
config.environment['LD_PRELOAD'] = r"@ONNX_MLIR_LD_PRELOAD_onnx-mlir-opt@"
|
2020-04-14 17:40:05 +08:00
|
|
|
|
2020-04-19 22:11:24 +08:00
|
|
|
config.llvm_tools_dir = r"@MLIR_TOOLS_DIR@"
|
|
|
|
config.mlir_obj_root = r"@LLVM_PROJ_BUILD@"
|
|
|
|
config.mlir_tools_dir = r"@MLIR_TOOLS_DIR@"
|
2019-11-19 08:37:58 +08:00
|
|
|
config.suffixes = ['.mlir']
|
2020-04-19 22:11:24 +08:00
|
|
|
config.lit_tools_dir = config.llvm_tools_dir
|
2019-11-19 08:37:58 +08:00
|
|
|
|
2020-04-19 22:11:24 +08:00
|
|
|
config.onnx_mlir_tools_dir = r"@ONNX_MLIR_TOOLS_DIR@"
|
|
|
|
config.onnx_mlir_test_src_dir = r"@ONNX_MLIR_LIT_TEST_SRC_DIR@"
|
|
|
|
config.onnx_mlir_test_build_dir = r"@ONNX_MLIR_LIT_TEST_BUILD_DIR@"
|
2019-11-19 08:37:58 +08:00
|
|
|
|
|
|
|
lit.llvm.initialize(lit_config, config)
|
|
|
|
|
|
|
|
# Let the main config do the real work.
|
2020-04-19 22:11:24 +08:00
|
|
|
lit_config.load_config(config, r"@ONNX_MLIR_LIT_TEST_SRC_DIR@/lit.cfg.py")
|