diff options
author | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2024-03-31 17:11:35 +0000 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2024-04-05 08:43:37 +0000 |
commit | 5ed60ffd790a2d1090dca9c685d6ccf09b3f08da (patch) | |
tree | b71d06338b505332167a895c92d6236c4c4b9d74 /llvm/docs/CommandGuide | |
parent | aff197ff2163a4b7732d08b833906cc21f4a5c89 (diff) | |
download | llvm-5ed60ffd790a2d1090dca9c685d6ccf09b3f08da.zip llvm-5ed60ffd790a2d1090dca9c685d6ccf09b3f08da.tar.gz llvm-5ed60ffd790a2d1090dca9c685d6ccf09b3f08da.tar.bz2 |
[mlir][test] Extend CMake logic for e2e tests
Adds two new CMake functions to query the host system:
* `check_hwcap`,
* `check_emulator`.
Together, these functions are used to check whether a given set of MLIR
integration tests require an emulator. If yes, then the corresponding
CMake var that defies the required emulator executable is also checked.
`check_hwcap` relies on ELF_HWCAP for discovering CPU features from
userspace on Linux systems. This is the recommended approach for Arm
CPUs running on Linux as outlined in this blog post:
* https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu
Other operating systems (e.g. Android) and CPU architectures will
most likely require some other approach. Right now these new hooks are
only used for SVE and SME integration tests.
This relands #86489 with the following changes:
* Replaced:
`set(hwcap_test_file ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/hwcap_check.c)`
with:
`set(hwcap_test_file ${CMAKE_BINARY_DIR}/temp/hwcap_check.c)`
The former would trigger an infinite loop when running `ninja`
(after the initial CMake configuration).
* Fixed commit msg. Previous one was taken from the initial GH PR
commit rather than the final re-worked solution (missed this when
merging via GH UI).
* A couple more NFCs/tweaks.
Diffstat (limited to 'llvm/docs/CommandGuide')
0 files changed, 0 insertions, 0 deletions