mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-23 18:20:47 +08:00
Fix loongarch64 emulated tests.
This commit is contained in:
parent
2926b2e0a9
commit
9589cc4e7f
@ -313,12 +313,13 @@ build:linux:cross:loongarch64:gcc-14:default:
|
||||
extends: .build:linux:cross:loongarch64
|
||||
image: ubuntu:24.04
|
||||
variables:
|
||||
EIGEN_CI_C_COMPILER: gcc-14
|
||||
EIGEN_CI_CXX_COMPILER: g++-14
|
||||
EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu gcc-14-loongarch64-linux-gnu
|
||||
EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu
|
||||
EIGEN_CI_CROSS_C_COMPILER: loongarch64-linux-gnu-gcc-14
|
||||
EIGEN_CI_CROSS_CXX_COMPILER: loongarch64-linux-gnu-g++-14
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_LSX=on"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: >-
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_CROSSCOMPILING_EMULATOR=qemu-loongarch64-static;-L;/usr/loongarch64-linux-gnu
|
||||
-DEIGEN_TEST_LSX=on
|
||||
|
||||
######## MR Smoke Tests ########################################################
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
# Call script in current shell - it sets up some environment variables.
|
||||
- . ci/scripts/common.linux.before_script.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- ${EIGEN_CI_BUILDDIR}/
|
||||
@ -32,6 +33,7 @@
|
||||
before_script:
|
||||
- . ci/scripts/common.windows.before_script.ps1
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ${EIGEN_CI_BUILDDIR}/
|
||||
|
@ -424,8 +424,6 @@ test:linux:ppc64le:clang-12:default:unsupported:
|
||||
EIGEN_CI_CROSS_TARGET_TRIPLE: loongarch64-linux-gnu
|
||||
# Install QEMU and set up the execution environment in the image
|
||||
EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu qemu-user-static
|
||||
EIGEN_CI_BEFORE_SCRIPT: "ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64/ld-linux-loongarch-lp64d.so.1 && \
|
||||
export LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib:$LD_LIBRARY_PATH"
|
||||
tags:
|
||||
- eigen-runner
|
||||
- linux
|
||||
|
@ -33,7 +33,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
set_property(TARGET ${targetname} PROPERTY HIP_ARCHITECTURES gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030)
|
||||
elseif(EIGEN_TEST_CUDA_CLANG)
|
||||
set_source_files_properties(${filename} PROPERTIES LANGUAGE CXX)
|
||||
|
||||
|
||||
if(CUDA_64_BIT_DEVICE_CODE AND (EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64"))
|
||||
link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64")
|
||||
else()
|
||||
@ -54,7 +54,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
endif()
|
||||
|
||||
add_dependencies(buildtests ${targetname})
|
||||
|
||||
|
||||
if (is_gpu_test)
|
||||
add_dependencies(buildtests_gpu ${targetname})
|
||||
endif()
|
||||
@ -107,7 +107,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_test(${testname_with_suffix} "${targetname}")
|
||||
add_test(NAME ${testname_with_suffix} COMMAND "${targetname}")
|
||||
|
||||
# Specify target and test labels according to EIGEN_CURRENT_SUBPROJECT
|
||||
get_property(current_subproject GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT)
|
||||
@ -120,7 +120,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
# Add gpu tag for testing only GPU tests.
|
||||
set_property(TEST ${testname_with_suffix} APPEND PROPERTY LABELS "gpu")
|
||||
endif()
|
||||
|
||||
|
||||
if(EIGEN_SYCL)
|
||||
# Force include of the SYCL file at the end to avoid errors.
|
||||
set_property(TARGET ${targetname} PROPERTY COMPUTECPP_INCLUDE_AFTER 1)
|
||||
@ -237,6 +237,11 @@ macro(ei_add_failtest testname)
|
||||
add_test(NAME ${test_target_ko}
|
||||
COMMAND ${CMAKE_COMMAND} --build . --target ${test_target_ko} --config $<CONFIG>
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
# Disable emulator if cross-compiling.
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
set_property(TEST ${test_target_ok} PROPERTY CROSSCOMPILING_EMULATOR "")
|
||||
set_property(TEST ${test_target_ko} PROPERTY CROSSCOMPILING_EMULATOR "")
|
||||
endif()
|
||||
|
||||
# Expect the second test to fail
|
||||
set_tests_properties(${test_target_ko} PROPERTIES WILL_FAIL TRUE)
|
||||
@ -518,12 +523,12 @@ macro(ei_get_compilerver_from_cxx_version_string VERSTRING CNAME CVER)
|
||||
string(REGEX MATCH "[^0-9][0-9]+\\.[0-9]+" eicver ${VERSTRING})
|
||||
if (NOT eicver AND ei_has_mingw)
|
||||
# try to extract 1 number plus suffix:
|
||||
string(REGEX MATCH "[^0-9][0-9]+-win32" eicver ${VERSTRING})
|
||||
string(REGEX MATCH "[^0-9][0-9]+-win32" eicver ${VERSTRING})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (NOT eicver)
|
||||
set(eicver " _")
|
||||
endif()
|
||||
@ -653,7 +658,7 @@ endmacro()
|
||||
# The intention behind the existence of this macro is the size of Eigen's
|
||||
# testsuite. Together with the relatively big compile-times building all tests
|
||||
# can take a substantial amount of time depending on the available hardware.
|
||||
#
|
||||
#
|
||||
# The last buildtestspartN target will build possible remaining tests.
|
||||
#
|
||||
# An example:
|
||||
@ -697,7 +702,7 @@ macro(ei_split_testsuite num_splits)
|
||||
endforeach()
|
||||
math(EXPR test_idx "${test_idx} + ${num_tests_per_target}")
|
||||
endforeach()
|
||||
|
||||
|
||||
# Handle the possibly remaining tests
|
||||
math(EXPR test_idx "${num_splits} * ${num_tests_per_target}")
|
||||
math(EXPR target_bound "${eigen_test_count} - 1")
|
||||
@ -709,10 +714,10 @@ endmacro(ei_split_testsuite num_splits)
|
||||
|
||||
# Defines the custom command buildsmoketests to build a number of tests
|
||||
# specified in smoke_test_list.
|
||||
#
|
||||
#
|
||||
# Test in smoke_test_list can be either test targets (e.g. packetmath) or
|
||||
# subtests targets (e.g. packetmath_2). If any of the test are not available
|
||||
# in the current configuration they are just skipped.
|
||||
# in the current configuration they are just skipped.
|
||||
#
|
||||
# All tests added via this macro are labeled with the smoketest label. This
|
||||
# allows running smoketests only using ctest.
|
||||
|
Loading…
Reference in New Issue
Block a user