Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

env:
alpaka_cmake_flags: "-Dalpaka_COMPILE_PEDANTIC=ON -Dalpaka_DOCS=ON -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -DBUILD_TESTING=ON -Dalpaka_HEADERCHECKS=ON -Dalpaka_LOG=dynamic -Dalpaka_FAST_MATH=OFF"
alpaka_cmake_flags: "-Dalpaka_COMPILE_PEDANTIC=ON -Dalpaka_DOCS=ON -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -DBUILD_TESTING=ON -Dalpaka_HEADERCHECKS=ON -Dalpaka_LOG=dynamic -Dalpaka_FAST_MATH=OFF"

jobs:
pre-commit:
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
run: |
apt-get update
apt-get install -y cmake build-essential ninja-build git
export "SANITIZERS_DIR=$(pwd)/sanitizers"
export "SANITIZERS_DIR=$(pwd)/sanitizer"
echo "ASAN_OPTIONS=suppressions=${SANITIZERS_DIR}/asan_suppressions.txt" >> $GITHUB_ENV
echo "TSAN_OPTIONS=suppressions=${SANITIZERS_DIR}/tsan_suppressions.txt,ignore_noninstrumented_modules=1" >> $GITHUB_ENV
echo "LSAN_OPTIONS=suppressions=${SANITIZERS_DIR}/lsan_suppressions.txt" >> $GITHUB_ENV
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ project(
set(_alpaka_ROOT_DIR ${alpaka_SOURCE_DIR})

# Compiler feature tests.
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_ROOT_DIR}/cmake/tests")
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_ROOT_DIR}/cmake/test")
set(_alpaka_CMAKE_DIR "${_alpaka_ROOT_DIR}/cmake")
set(_alpaka_TESTING_DIR "${_alpaka_ROOT_DIR}/tests")
set(_alpaka_TESTS_DIR "${_alpaka_ROOT_DIR}/test")
# Set include directories
set(_alpaka_INCLUDE_DIRECTORY "${_alpaka_ROOT_DIR}/include")

# CMake Options
option(alpaka_TESTING "Enable/Disable testing" OFF)
option(alpaka_TESTS "Enable/Disable testing" OFF)
option(alpaka_DOCS "Enable/Disable documentation code snippet testing" OFF)
option(alpaka_BENCHMARKS "Enable/Disable benchmarks" OFF)
option(alpaka_EXAMPLES "Enable/Disable examples" OFF)
Expand All @@ -59,15 +59,15 @@ option(alpaka_HEADERCHECKS "Enable/Disable header check tests" OFF)
# only check for compiler support if this cmake is called with add_subdirectory or examples, benchmarks, ... should be compiled too
if(
NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME
OR (alpaka_TESTING OR alpaka_DOCS OR alpaka_BENCHMARKS OR alpaka_EXAMPLES OR alpaka_HEADERCHECKS)
OR (alpaka_TESTS OR alpaka_DOCS OR alpaka_BENCHMARKS OR alpaka_EXAMPLES OR alpaka_HEADERCHECKS)
)
include(${_alpaka_CMAKE_DIR}/alpakaCommon.cmake)
endif()

if(alpaka_TESTING)
if(alpaka_TESTS)
include(CTest)
enable_testing()
add_subdirectory("${_alpaka_TESTING_DIR}")
add_subdirectory("${_alpaka_TESTS_DIR}")
endif()

if(alpaka_DOCS)
Expand Down Expand Up @@ -122,7 +122,7 @@ configure_package_config_file(
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/alpakaConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/alpaka)

# copy tests to the installation
install(DIRECTORY ${_alpaka_TESTING_DIR} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${_alpaka_TESTS_DIR} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} USE_SOURCE_PERMISSIONS)

# Files required to validate optional features std::atomic_ref and std::simd
install(FILES "${_alpaka_FEATURE_TESTS_DIR}/StdAtomicRef.cpp" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/alpaka/tests)
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"alpaka_TESTING": "ON",
"alpaka_TESTS": "ON",
"alpaka_EXAMPLES": "ON",
"alpaka_BENCHMARKS": "ON"
}
Expand Down
10 changes: 5 additions & 5 deletions cmake/alpakaConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ set(_alpaka_ROOT_DIR "@CMAKE_INSTALL_PREFIX@")
set(_alpaka_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}")

# Tests, this is required because the used compiler can differ compared to the compiler used for installation.
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_CMAKE_DIR}/tests")
set(_alpaka_TESTING_DIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/tests")
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_CMAKE_DIR}/test")
set(_alpaka_TESTS_DIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/test")

set(_alpaka_INCLUDE_DIRECTORY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@")

Expand All @@ -24,10 +24,10 @@ include("${_alpaka_CMAKE_DIR}/alpakaCommon.cmake")
check_required_components(alpaka)

# CMake Options to activate testing with the currently selected environment
option(alpaka_TESTING "Enable/Disable testing" OFF)
option(alpaka_TESTS "Enable/Disable testing" OFF)

if(alpaka_TESTING)
if(alpaka_TESTS)
include(CTest)
enable_testing()
add_subdirectory("${_alpaka_TESTING_DIR}" "${CMAKE_BINARY_DIR}/alpaka/tests")
add_subdirectory("${_alpaka_TESTS_DIR}" "${CMAKE_BINARY_DIR}/alpaka/test")
endif()
4 changes: 2 additions & 2 deletions cmake/alpakaPrepareForAddSubdirectoryUsage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
set(_alpaka_ROOT_DIR "${alpaka_SOURCE_DIR}")

# Compiler feature tests.
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_ROOT_DIR}/cmake/tests")
set(_alpaka_FEATURE_TESTS_DIR "${_alpaka_ROOT_DIR}/cmake/test")
set(_alpaka_CMAKE_DIR "${_alpaka_ROOT_DIR}/cmake")
set(_alpaka_TESTING_DIR "${_alpaka_ROOT_DIR}/tests")
set(_alpaka_TESTS_DIR "${_alpaka_ROOT_DIR}/test")
# Set include directories
set(_alpaka_INCLUDE_DIRECTORY "${_alpaka_ROOT_DIR}/include")

Expand Down
2 changes: 1 addition & 1 deletion cmake/finalize.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function(alpaka_internal_finalize target)
target_compile_definitions(${target} PRIVATE ALPAKA_CMAKE_TARGET_ALPAKA_FINALIZE_CALLED)
endif()

# conditionally add sanitizers if not compiling with cuda/hip/oneapi
# conditionally add sanitizer if not compiling with cuda/hip/oneapi
if(index_cuda EQUAL -1 AND index_hip EQUAL -1 AND index_oneapi EQUAL -1)
if(alpaka_ASAN)
message(STATUS "Linking ASAN to ${target}")
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/source/advanced/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Arguments
Set the C++ standard version.


``alpaka_TESTING``
``alpaka_TESTS``
.. code-block:: markdown

Build the testing tree with the current environment.
Expand All @@ -121,7 +121,7 @@ Arguments
.. code-block:: markdown

If `ON` use Catch2 to pre-installed on system else fetch Catch2 via CMake's fetch content.
This option is only available of `alpaka_TESTING` or `alpaka_BENCHMARKS` is `ON`.
This option is only available of `alpaka_TESTS` or `alpaka_BENCHMARKS` is `ON`.

``alpaka_FAST_MATH``
.. code-block:: markdown
Expand Down Expand Up @@ -372,7 +372,7 @@ alpaka is providing CMake targets based on the optional activated dependencies `
^^^^^^^^^^^^^^^^^^^

- Set include dependencies.
- Activate header code based on the CMake option ``alpaka_EXEC_*`` (required for examples/tests/benchmarks).
- Activate header code based on the CMake option ``alpaka_EXEC_*`` (required for examples/test/benchmarks).
- Set the ``CXX`` standard.

.. _alpaka-host:
Expand Down
14 changes: 7 additions & 7 deletions docs/source/basic/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ The recipies shown here assume you have installed spack packages for specific co
.. code-block::

# ..
cmake ../alpaka3 -Dalpaka_TESTING=ON
cmake ../alpaka3 -Dalpaka_TESTS=ON
cmake --build . --parallel
ctest

Expand All @@ -238,7 +238,7 @@ If OpenMP is available on the system, additionally the executor `cpuOmpBlocks` c
If oneAPI TBB is available on the system, additionally the executor `cpuTbbBlocks` can be used to run on all cores of the CPU.
CMake option `alpaka_DEP_*` controls whether a parallelization framework is used and introduces a dependency on third-party libraries.
This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `oneApi`
`alpaka_EXEC_*` activates or deactivates which execution schemas will be used for examples/tests and benchmarks.
`alpaka_EXEC_*` activates or deactivates which execution schemas will be used for examples/test and benchmarks.

**compile for CPU only (serial and OpenMP):**

Expand All @@ -250,7 +250,7 @@ This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `
# -Dalpaka_DEP_OMP=ON is implicitly set, if the compiler not support OpenMP only serial code will be generated
# Assuming alpaka source is in ../alpaka3 with respect to the current directory
#
cmake ../alpaka3 -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -DBUILD_TESTING=ON
cmake ../alpaka3 -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -DBUILD_TESTING=ON
cmake --build . --parallel
ctest --output-on-failure

Expand All @@ -261,7 +261,7 @@ This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `
spack load cmake@3.29.1
spack load intel-oneapi-tbb@2021.10.0

cmake ../alpaka3 -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_TBB=ON -Dalpaka_DEP_OMP=OFF
cmake ../alpaka3 -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_TBB=ON -Dalpaka_DEP_OMP=OFF
cmake --build . --parallel
ctest --output-on-failure

Expand All @@ -273,7 +273,7 @@ This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `
spack load cuda@12.4.0

# use -DCMAKE_CUDA_ARCHITECTURES=80 to set the GPU architecture
cmake ../alpaka3 -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_DEP_CUDA=ON -Dalpaka_EXEC_CpuSerial=OFF
cmake ../alpaka3 -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_DEP_CUDA=ON -Dalpaka_EXEC_CpuSerial=OFF
cmake --build . --parallel
ctest --output-on-failure

Expand All @@ -287,7 +287,7 @@ This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `

# use -DCMAKE_HIP_ARCHITECTURES=gfx906 to set the GPU architecture
# for older CMake version sometimes the architecture must be set with -DAMDGPU_TARGETS=gfx906
cmake ../alpaka3 -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_DEP_HIP=ON -Dalpaka_EXEC_CpuSerial=OFF
cmake ../alpaka3 -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_DEP_HIP=ON -Dalpaka_EXEC_CpuSerial=OFF
cmake --build . --parallel
ctest --output-on-failure

Expand All @@ -311,7 +311,7 @@ This allows the usage of the coresponding executor e.g. `gpuCuda`, `gpuHip` or `
# Cpu ISA e.g. avx,avx2, avx512
# Nvidia only the sm number is needed e.g. 80
# Amd full qualifier is required e.g. gfx906
cmake ../alpaka3 -DCMAKE_CXX_COMPILER=icpx -Dalpaka_TESTING=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_ONEAPI=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_EXEC_CpuSerial=OFF
cmake ../alpaka3 -DCMAKE_CXX_COMPILER=icpx -Dalpaka_TESTS=ON -Dalpaka_BENCHMARKS=ON -Dalpaka_EXAMPLES=ON -Dalpaka_DEP_ONEAPI=ON -Dalpaka_DEP_OMP=OFF -Dalpaka_EXEC_CpuSerial=OFF
cmake --build . --parallel
ctest --output-on-failure

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def generate_single_header(app, exception):
os.makedirs(single_header_path, exist_ok=True)

# Path to your script
script_path = os.path.abspath(os.path.join(app.srcdir, '..', '..', 'scripts', 'create-single-header.sh'))
script_path = os.path.abspath(os.path.join(app.srcdir, '..', '..', 'script', 'create-single-header.sh'))

# Call the script with the destination folder as argument
subprocess.run([script_path, single_header_path], check=True)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.