annotate mlir/test/lit.site.cfg.py.in @ 227:21e6aa2e49ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 19 Jul 2021 06:57:16 +0900
parents 2e18cbf3894f
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 @LIT_SITE_CFG_IN_HEADER@
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 import sys
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 config.host_triple = "@LLVM_HOST_TRIPLE@"
anatofuz
parents:
diff changeset
6 config.target_triple = "@TARGET_TRIPLE@"
anatofuz
parents:
diff changeset
7 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
anatofuz
parents:
diff changeset
8 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
anatofuz
parents:
diff changeset
9 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
10 config.llvm_lib_dir = "@LLVM_LIBS_DIR@"
150
anatofuz
parents:
diff changeset
11 config.llvm_shlib_dir = "@SHLIBDIR@"
anatofuz
parents:
diff changeset
12 config.llvm_shlib_ext = "@SHLIBEXT@"
anatofuz
parents:
diff changeset
13 config.llvm_exe_ext = "@EXEEXT@"
anatofuz
parents:
diff changeset
14 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
15 config.python_executable = "@Python3_EXECUTABLE@"
150
anatofuz
parents:
diff changeset
16 config.gold_executable = "@GOLD_EXECUTABLE@"
anatofuz
parents:
diff changeset
17 config.ld64_executable = "@LD64_EXECUTABLE@"
anatofuz
parents:
diff changeset
18 config.enable_shared = @ENABLE_SHARED@
anatofuz
parents:
diff changeset
19 config.enable_assertions = @ENABLE_ASSERTIONS@
anatofuz
parents:
diff changeset
20 config.targets_to_build = "@TARGETS_TO_BUILD@"
anatofuz
parents:
diff changeset
21 config.native_target = "@LLVM_NATIVE_ARCH@"
anatofuz
parents:
diff changeset
22 config.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
anatofuz
parents:
diff changeset
23 config.host_os = "@HOST_OS@"
anatofuz
parents:
diff changeset
24 config.host_cc = "@HOST_CC@"
anatofuz
parents:
diff changeset
25 config.host_cxx = "@HOST_CXX@"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
26 config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
27 config.host_cmake = "@CMAKE_COMMAND@"
150
anatofuz
parents:
diff changeset
28 # Note: ldflags can contain double-quoted paths, so must use single quotes here.
anatofuz
parents:
diff changeset
29 config.host_ldflags = '@HOST_LDFLAGS@'
anatofuz
parents:
diff changeset
30 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
anatofuz
parents:
diff changeset
31 config.llvm_host_triple = '@LLVM_HOST_TRIPLE@'
anatofuz
parents:
diff changeset
32 config.host_arch = "@HOST_ARCH@"
anatofuz
parents:
diff changeset
33 config.mlir_src_root = "@MLIR_SOURCE_DIR@"
anatofuz
parents:
diff changeset
34 config.mlir_obj_root = "@MLIR_BINARY_DIR@"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
35 config.mlir_runner_utils_dir = "@MLIR_RUNNER_UTILS_DIR@"
150
anatofuz
parents:
diff changeset
36 config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
37 config.mlir_cmake_dir = "@MLIR_CMAKE_DIR@"
150
anatofuz
parents:
diff changeset
38 config.linalg_test_lib_dir = "@MLIR_DIALECT_LINALG_INTEGRATION_TEST_LIB_DIR@"
anatofuz
parents:
diff changeset
39 config.build_examples = @LLVM_BUILD_EXAMPLES@
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
40 config.run_cuda_tests = @MLIR_ENABLE_CUDA_CONVERSIONS@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
41 config.enable_cuda_runner = @MLIR_ENABLE_CUDA_RUNNER@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
42 config.run_rocm_tests = @MLIR_ENABLE_ROCM_CONVERSIONS@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
43 config.enable_rocm_runner = @MLIR_ENABLE_ROCM_RUNNER@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
44 config.spirv_wrapper_library_dir = "@MLIR_SPIRV_WRAPPER_LIBRARY_DIR@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
45 config.enable_spirv_cpu_runner = @MLIR_ENABLE_SPIRV_CPU_RUNNER@
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
46 config.vulkan_wrapper_library_dir = "@MLIR_VULKAN_WRAPPER_LIBRARY_DIR@"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
47 config.enable_vulkan_runner = @MLIR_ENABLE_VULKAN_RUNNER@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
48 config.enable_bindings_python = @MLIR_ENABLE_BINDINGS_PYTHON@
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
49 config.mlir_integration_test_dir = "@MLIR_INTEGRATION_TEST_DIR@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
50 config.intel_sde_executable = "@INTEL_SDE_EXECUTABLE@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
51 config.mlir_run_amx_tests = "@MLIR_RUN_AMX_TESTS@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
52 config.mlir_run_x86vector_tests = "@MLIR_RUN_X86VECTOR_TESTS@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
53 config.mlir_run_cuda_tensor_core_tests = "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
54 config.mlir_include_integration_tests = "@MLIR_INCLUDE_INTEGRATION_TESTS@"
150
anatofuz
parents:
diff changeset
55
anatofuz
parents:
diff changeset
56 # Support substitution of the tools_dir with user parameters. This is
anatofuz
parents:
diff changeset
57 # used when we can't determine the tool dir at configuration time.
anatofuz
parents:
diff changeset
58 try:
anatofuz
parents:
diff changeset
59 config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
60 config.llvm_lib_dir = config.llvm_lib_dir % lit_config.params
150
anatofuz
parents:
diff changeset
61 config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
anatofuz
parents:
diff changeset
62 except KeyError:
anatofuz
parents:
diff changeset
63 e = sys.exc_info()[1]
anatofuz
parents:
diff changeset
64 key, = e.args
anatofuz
parents:
diff changeset
65 lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
anatofuz
parents:
diff changeset
66
anatofuz
parents:
diff changeset
67 import lit.llvm
anatofuz
parents:
diff changeset
68 lit.llvm.initialize(lit_config, config)
anatofuz
parents:
diff changeset
69
anatofuz
parents:
diff changeset
70 # Let the main config do the real work.
anatofuz
parents:
diff changeset
71 lit_config.load_config(config, "@MLIR_SOURCE_DIR@/test/lit.cfg.py")