CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
83 lines
2.2 KiB
Python
83 lines
2.2 KiB
Python
"""
|
|
Lit configuration file for libclc tests.
|
|
"""
|
|
|
|
import os
|
|
|
|
import lit.formats
|
|
|
|
from lit.llvm import llvm_config
|
|
|
|
# Configuration file for the 'lit' test runner.
|
|
|
|
# name: The name of this test suite.
|
|
config.name = "libclc"
|
|
|
|
# testFormat: The test format to use to interpret tests.
|
|
config.test_format = lit.formats.ShTest()
|
|
|
|
# suffixes: A list of file extensions to treat as test files.
|
|
config.suffixes = [".cl", ".test"]
|
|
|
|
# Exclude certain directories and files from test discovery
|
|
config.excludes = [
|
|
"CMakeLists.txt",
|
|
"update_libclc_tests.py",
|
|
]
|
|
|
|
# test_source_root: The root path where tests are located.
|
|
# For per-target tests, this is the target's test directory.
|
|
config.test_source_root = os.path.dirname(__file__)
|
|
|
|
# test_exec_root: The root path where tests should be run.
|
|
config.test_exec_root = config.libclc_obj_root
|
|
|
|
config.target_triple = config.libclc_target
|
|
|
|
supported_test_architectures = ["amdgcn", "amdgpu"]
|
|
|
|
config.targets = set()
|
|
|
|
|
|
def calculate_arch_features(arch_string):
|
|
features = []
|
|
for arch in arch_string.split():
|
|
if (
|
|
arch.lower() in supported_test_architectures
|
|
and config.libclc_target_arch.lower() in supported_test_architectures
|
|
):
|
|
features.append(arch.lower() + "-registered-target")
|
|
config.targets.add(arch.upper())
|
|
return features
|
|
|
|
|
|
llvm_config.feature_config([("--targets-built", calculate_arch_features)])
|
|
|
|
llvm_config.use_default_substitutions()
|
|
|
|
llvm_config.use_clang()
|
|
|
|
llvm_config.add_tool_substitutions(["llvm-nm"], config.llvm_tools_dir)
|
|
|
|
is_standalone = config.libclc_standalone_build.lower() == "true"
|
|
path = os.path.join(config.libclc_library_dir, config.libclc_target, "libclc.bc")
|
|
libclc_lib = f"--libclc-lib=:{path}" if is_standalone else ""
|
|
|
|
config.substitutions.extend(
|
|
[
|
|
("%library_dir", config.libclc_library_dir),
|
|
("%target", config.libclc_target),
|
|
("%cpu", config.libclc_target_cpu),
|
|
("%libclc_lib", libclc_lib),
|
|
("%check_prefix", config.libclc_target_arch.upper()),
|
|
]
|
|
)
|
|
|
|
# Propagate PATH from environment
|
|
if "PATH" in os.environ:
|
|
config.environment["PATH"] = os.path.pathsep.join(
|
|
[config.llvm_tools_dir, os.environ["PATH"]]
|
|
)
|
|
else:
|
|
config.environment["PATH"] = config.llvm_tools_dir
|