Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpaka 1.2.0 #263

Merged
merged 4 commits into from
Oct 28, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Install
- C++14 compiler (clang, gcc, hipcc, icc, nvcc)
- *Debian/Ubuntu:* `sudo apt-get install gcc build-essential`
- *Arch Linux:* `sudo pacman -S base-devel`
- `alpaka` 1.1.0
- `alpaka` 1.2.0
- included as git submodule
- `boost` >= 1.65.1
- dependency of alpaka
Expand Down
67 changes: 39 additions & 28 deletions alpaka/.github/workflows/ci.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions alpaka/.github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
push:
branches:
- develop
env:
ALPAKA_CI_OS_NAME: "Linux"

jobs:
gh-pages:
Expand Down
1 change: 1 addition & 0 deletions alpaka/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# tmp files
*~
.*.swp

# netbeans project files
/nbproject/
Expand Down
6 changes: 4 additions & 2 deletions alpaka/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
# container version of the generated jobs
# should be merged with ALPAKA_GITLAB_CI_CONTAINER_VERSION
# see: script/job_generator/generate_job_yaml.py
ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION: "3.1"
ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION: "3.2"

generate:
stage: generator
Expand All @@ -27,7 +27,9 @@ generate:
- apk update && apk add python3~=3.11 py3-pip
- pip3 install -r script/job_generator/requirements.txt
# it is sufficient to verify once, as the same job matrix is generated, verified and then filtered each time
- python3 script/job_generator/job_generator.py ${ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION} --verify --wave compile_only_job -o compile_only.yml
# disable verify because we know that the generator is broken: https://github.com/thombashi/allpairspy/pull/10
#- python3 script/job_generator/job_generator.py ${ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION} --verify --wave compile_only_job -o compile_only.yml
- python3 script/job_generator/job_generator.py ${ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION} --wave compile_only_job -o compile_only.yml
- python3 script/job_generator/job_generator.py ${ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION} --wave runtime_job_cpu -o runtime_cpu.yml
- python3 script/job_generator/job_generator.py ${ALPAKA_GITLAB_CI_GENERATOR_CONTAINER_VERSION} --wave runtime_job_gpu -o runtime_gpu.yml
- cat compile_only.yml
Expand Down
45 changes: 45 additions & 0 deletions alpaka/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
minimum_pre_commit_version: 3.2.0 # necessitated by Lucas-C's hooks
default_install_hook_types: [pre-commit, pre-push]
exclude: 'thirdParty'
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
files: \.(cpp|hpp)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: no-commit-to-branch
args: [-b, develop]
- id: check-merge-conflict
- id: trailing-whitespace
exclude_types: [markdown, rst]
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
- id: mixed-line-ending
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: forbid-tabs
types_or: [file]
exclude_types: [rst]
- id: remove-tabs
types_or: [file]
exclude_types: [rst]
- id: forbid-crlf
- id: remove-crlf
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
# The ignores in here are chosen to conform with the currently
# existing code and not motivated any other way.
args: [ --fix, --ignore, "F403,F405,E731"]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
args: ["--line-length", "120"]
44 changes: 33 additions & 11 deletions alpaka/.zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,46 @@
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0002-8218-3116"
},
{
"name": "Erdem, Sven",
"affiliation": "Helmholtz-Zentrum Berlin"
},
{
"name": "Fila, Mateusz Jakub",
"affiliation": "CERN"
},
{
"name": "Gruber, Bernhard Manfred",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf, CERN",
"orcid": "0000-0001-7848-1690"
},
{
"name": "Martin-Haugh, Stewart",
"affiliation": "STFC Rutherford Appleton Laboratory",
"orcid": "0000-0001-9457-1928"
"name": "Lenz, Julian",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-5250-0005"
},
{
"name": "Perego, Aurora",
"affiliation": "CERN",
"orcid": "0000-0003-1576-6757"
"orcid": "0009-0002-5210-6213"
},
{
"name": "Tascon, Andres Rios",
"affiliation": "Princeton University"
"name": "Varvarin, Michael",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf"
},
{
"name": "Vyskočil, Jiří",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-8822-0929"
},
{
"name": "Widera, René",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0003-1642-0459"
},
{
"name": "Yusufoglu, Mehmet",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf"
}
],
"contributors": [
Expand Down Expand Up @@ -98,6 +115,12 @@
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"type": "Other"
},
{
"name": "Martin-Haugh, Stewart",
"affiliation": "STFC Rutherford Appleton Laboratory",
"orcid": "0000-0001-9457-1928",
"type": "Other"
},
{
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf, TU Dresden",
"name": "Matthes, Alexander",
Expand Down Expand Up @@ -143,14 +166,13 @@
"type": "Other"
},
{
"name": "Vollmer, Daniel",
"affiliation": "Deutsches Zentrum für Luft- und Raumfahrt e.V.",
"name": "Tascon, Andres Rios",
"affiliation": "Princeton University",
"type": "Other"
},
{
"name": "Vyskočil, Jiří",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-8822-0929",
"name": "Vollmer, Daniel",
"affiliation": "Deutsches Zentrum für Luft- und Raumfahrt e.V.",
"type": "Other"
},
{
Expand Down
59 changes: 59 additions & 0 deletions alpaka/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,65 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [1.2.0] - 2024-10-02

### Added

- device functions to simplify writing kernel code #2337 #2369 #2383
- support Clang 18 and 19 #2387
- support oneAPI 2024.2 #2368
- support for mapped memory allocation for the SYCL backend #2375
- support for pre-commit #2253
- support for device and constant global variables in the SYCL backend #2242
- alpaka::meta::isList, alpaka::meta::ToList and alpaka::meta::toTuple #2269
- accelerator trait to check for single and multi-threads per block #2263
- trait IsKernelTriviallyCopyable #2302
- trait AccIsEnabled #2267
- documentation: cmake flag to build alpaka benchmarks #2272
- benchmark: babelstream support for different Accs #2299
- example: using MdSpan to pass 2D data #2293
- example: 2D heat equation #2365 #2383
- example: Convolution #2228 #2220

### Changed

- update cheatsheet.rst #2398 #2386 #2241
- signature of `[get|is]ValidWorkDiv*` #2349
- use shared CUDA libraries by default #2348 #2342
- add thread count to CPU blocks accelerators #2338
- link libcudart even when libcurand is not used #2329
- ctest: display only output of tests, which failed #2322
- example: Matrix Multiplication use MdSpan #2317
- move the Complex class to internal namespace #2301
- run examples with all enabled accelerators #2280
- template order allocMappedBuf #2270
- slow getWarpSize problem #2246
- simplification of workdiv creation #2240
- benchmarks: move from examples into own directory #2237

### Fixed

- `[get|is]ValidWorkDiv*` #2349 #2335
- cray clang compiler errors #2392
- fix and update SYCL targets #2390 #2361
- single thread acc throw for invalid workdiv fix #2391
- explicitly call alpaka::detail to achieve SYCL compilation #2385
- deduction guide for vector #2376
- issue with device global variables with CUDA 12.4 #2303
- clang9/nvcc11.2 boost bug #2294
- HIP: fix CMake relocatable device code option #2290
- Re-enable AtomicAtomicRef #2288
- alpaka_add_library relocatable device code #2273
- forwarding of msvc compiler flag '/Zo' #2266
- Windows: usage of Idx to alpaka::Idx #2265
- compiler detection for clang 17 and 18 as CUDA compiler with libstdc++ (gcc) #2256
- support for non-integral types in Vec generator constructor #2236
- memcpy warning #2295

### Removed

- support for nvcc11.0 and nvcc11.1 #2310

## [1.1.0] - 2024-01-18

### Added
Expand Down
16 changes: 11 additions & 5 deletions alpaka/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Options and Variants

option(alpaka_BUILD_EXAMPLES "Build the examples" OFF)
option(alpaka_BUILD_BENCHMARKS "Build the benchmarks" OFF)

# Enable the test infrastructure only if alpaka is the top-level project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
Expand All @@ -46,8 +47,9 @@ endif()
option(alpaka_INSTALL_TEST_HEADER "Install headers of the namespace alpaka::test. Attention, headers are not designed for production code, see documentation." OFF)

include(CMakeDependentOption)

cmake_dependent_option(alpaka_CHECK_HEADERS "Check all alpaka headers as part of the tests whether they can be compiled standalone." OFF BUILD_TESTING OFF)
cmake_dependent_option(alpaka_USE_INTERNAL_CATCH2 "Use internally shipped Catch2" ON BUILD_TESTING OFF)
cmake_dependent_option(alpaka_USE_INTERNAL_CATCH2 "Use internally shipped Catch2" ON "BUILD_TESTING OR alpaka_BUILD_BENCHMARKS" OFF)

################################################################################
# Internal variables.
Expand Down Expand Up @@ -80,7 +82,7 @@ set(_alpaka_INCLUDE_DIRECTORY "${_alpaka_ROOT_DIR}/include")
set(_alpaka_SUFFIXED_INCLUDE_DIR "${_alpaka_INCLUDE_DIRECTORY}/alpaka")

# the sequential accelerator is required for the tests and examples
if(alpaka_BUILD_EXAMPLES OR BUILD_TESTING)
if(alpaka_BUILD_EXAMPLES OR alpaka_BUILD_BENCHMARKS OR BUILD_TESTING)
if (NOT (alpaka_ACC_GPU_CUDA_ONLY_MODE OR alpaka_ACC_GPU_HIP_ONLY_MODE))
if (NOT DEFINED alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE)
option(alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE "enable alpaka serial accelerator" ON)
Expand Down Expand Up @@ -148,6 +150,10 @@ if(alpaka_BUILD_EXAMPLES)
add_subdirectory("example/")
endif()

if(alpaka_BUILD_BENCHMARKS)
add_subdirectory("benchmarks/")
endif()

# Only build the tests if alpaka is the top-level project and BUILD_TESTING is ON
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory("test/")
Expand Down Expand Up @@ -184,10 +190,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)

if(alpaka_INSTALL_TEST_HEADER)
install(DIRECTORY "${_alpaka_SUFFIXED_INCLUDE_DIR}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
else()
install(DIRECTORY "${_alpaka_SUFFIXED_INCLUDE_DIR}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
install(DIRECTORY "${_alpaka_SUFFIXED_INCLUDE_DIR}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
PATTERN "test" EXCLUDE)
endif()

Expand Down
27 changes: 25 additions & 2 deletions alpaka/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
# Contributing

Please review our more detailed [Coding Guidelines](https://alpaka.readthedocs.io/en/latest/dev/style.html) as well.

## Pre-commit

This project is set up for use with [pre-commit](https://pre-commit.com). Using it will make your code conform with most
of our (easily automatable) code style guidelines automatically.
In very short (for anything further see [pre-commit](https://pre-commit.com)), after running the following in your
working clone of alpaka
```bash
# if not yet done, install the pre-commit executable following https://pre-commit.com
cd /path/to/alpaka-working-clone
pre-commit install
```
`git` will run a number of checks prior to every commit and push and will refuse to perform the
pertinent action if they fail. Most of them (like e.g. the formatter) will have automatically altered your working tree
with the necessary changes such that
```bash
git add -u
```
will make the next commit pass.

## Formatting

Please format your code before before opening pull requests using clang-format 16 and the .clang-format file placed in the repository root.
Please format your code before before opening pull requests using clang-format 16 and the .clang-format file placed in
the repository root. If you were using `pre-commit` during your changes, this has happened automatically already. If
not, find further instructions below.

### Visual Studio and CLion
Suport for clang-format is built-in since Visual Studio 2017 15.7 and CLion 2019.1.
Support for clang-format is built-in since Visual Studio 2017 15.7 and CLion 2019.1.
The .clang-format file in the repository will be automatically detected and formatting is done as you type, or triggered when pressing the format hotkey.

### Bash
Expand Down
Loading
Loading