[all-commits] [llvm/llvm-project] 5ed60f: [mlir][test] Extend CMake logic for e2e tests

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Apr 5 01:51:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ed60ffd790a2d1090dca9c685d6ccf09b3f08da
      https://github.com/llvm/llvm-project/commit/5ed60ffd790a2d1090dca9c685d6ccf09b3f08da
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    A mlir/cmake/modules/MLIRCheckHardwareFeatures.cmake
    M mlir/docs/Dialects/ArmSME.md
    M mlir/test/CMakeLists.txt

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list