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

Merge 1.0.0 release branch changes into develop #2190

Merged
merged 23 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ac20ee5
Switch to 1.0.0-rc1
j-stephan Sep 13, 2023
f5cf5cf
Silence more nvcc warnings
j-stephan Sep 13, 2023
1b4b1c4
Disable activemask for SYCL
bernhardmgruber Sep 13, 2023
fe30254
refactor template order `allocMappedBufIfSupported`
psychocoderHPC Sep 14, 2023
1bc3029
Remove unused aliases
bernhardmgruber Sep 15, 2023
3d216bf
Only add clang warning flag when supported
bernhardmgruber Sep 14, 2023
885c27c
Fix a warning with nvcc
bernhardmgruber Sep 14, 2023
0247855
Workaround gcc warning on uninitialized PlatformCpu
bernhardmgruber Sep 14, 2023
1f938e0
Fix warnings by clang
bernhardmgruber Sep 14, 2023
b74f5c4
Suppress clang warnings in nvcc generated code
bernhardmgruber Sep 14, 2023
728dc27
Pass alpaka_ENABLE_WERROR from environment to CMake
j-stephan Aug 30, 2023
a612873
Disable GCC warning in nvcc generated code
bernhardmgruber Sep 18, 2023
1ee0426
Workaround gcc warning on uninitialized PlatformUniformCudaHipRt
bernhardmgruber Sep 18, 2023
1846aa1
Fix OpenMP 5.1 atomics
bernhardmgruber Sep 19, 2023
8fc9f6f
Add clang-17 to CI
bernhardmgruber Sep 20, 2023
4a5bec8
Rename lambda captures to workaround warnings
bernhardmgruber Sep 20, 2023
6b051db
Exclude clang CUDA Debug builds from the CI
bernhardmgruber Sep 20, 2023
921927f
Add clang-17 to README.md
bernhardmgruber Sep 20, 2023
680724b
Fix clang-format version in docs (#2176)
bernhardmgruber Sep 26, 2023
f79717b
Remove unnecessary -fintelfpga flag
j-stephan Sep 27, 2023
fc753dc
Add changelog for alpaka v1.0.0
j-stephan Aug 30, 2023
9a51f4f
Update author lists
j-stephan Oct 12, 2023
0c3e8ea
Set release date in changelog
bernhardmgruber Nov 13, 2023
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
56 changes: 44 additions & 12 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0003-3396-6154"
},
{
"name": "Bastrakova, Kseniia",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-8970-5098"
},
{
"name": "Bocci, Andrea",
"affiliation": "CERN",
Expand All @@ -22,44 +27,48 @@
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0002-8218-3116"
},
{
"name": "Ferragina, Luca",
"affiliation": "CERN"
},
{
"name": "Gruber, Bernhard Manfred",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf, CERN",
"orcid": "0000-0001-7848-1690"
},
{
"name": "Huebl, Axel",
"affiliation": "Lawrence Berkeley National Laboratory",
"orcid": "0000-0003-1943-7141"
"name": "Kaever, Christian",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf"
},
{
"name": "Kelling, Jeffrey",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0003-1761-2591"
},
{
"name": "Pantaleo, Felice",
"name": "Martin-Haugh, Stewart",
"affiliation": "STFC Rutherford Appleton Laboratory",
"orcid": "0000-0001-9457-1928"
},
{
"name": "Perego, Aurora",
"affiliation": "CERN",
"orcid": "0000-0003-3266-4357"
"orcid": "0000-0003-1576-6757"
},
{
"name": "Stephan, Jan",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-7839-4386"
},
{
"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": "Worpitz, Benjamin",
"affiliation": "LogMeIn Inc."
"name": "Young, Jeffrey",
"affiliation": "Georgia Institute of Technology",
"orcid": "0000-0001-9841-4057"
}
],
"contributors": [
Expand All @@ -73,6 +82,12 @@
"affiliation": "TU Dresden",
"type": "Other"
},
{
"name": "Hübl, Axel",
"affiliation": "Lawrence Berkeley National Laboratory",
"orcid": "0000-0003-1943-7141",
"type": "Other"
},
{
"name": "Knespel, Maximilian",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
Expand All @@ -99,6 +114,12 @@
"affiliation": "JetBrains",
"type": "Other"
},
{
"name": "Pantaleo, Felice",
"affiliation": "CERN",
"orcid": "0000-0003-3266-4357",
"type": "Other"
},
{
"name": "Rogers, David M.",
"affiliation": "Oak Ridge National Laboratory",
Expand All @@ -120,6 +141,12 @@
"affiliation": "Deutsches Zentrum für Luft- und Raumfahrt e.V.",
"type": "Other"
},
{
"name": "Vyskočil, Jiří",
"affiliation": "CASUS, Helmholtz-Zentrum Dresden-Rossendorf",
"orcid": "0000-0001-8822-0929",
"type": "Other"
},
{
"name": "Werner, Matthias",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
Expand All @@ -130,6 +157,11 @@
"affiliation":"TU Dresden",
"type": "Other"
},
{
"name": "Worpitz, Benjamin",
"affiliation": "LogMeIn Inc.",
"type": "Other"
},
{
"name": "Zacharias, Malte",
"affiliation": "Helmholtz-Zentrum Dresden-Rossendorf",
Expand Down
279 changes: 278 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## Formatting

Please format your code before before opening pull requests using clang-format 14 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.

### Visual Studio and CLion
Suport 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
First install clang-format-14. Instructions therefore can be found on the web.
First install clang-format-16. Instructions therefore can be found on the web.
To format your changes since branching off develop, you can run this command in bash:
```
git clang-format-14 develop
git clang-format-16 develop
```
To format all code in your working copy, you can run this command in bash:
```
find -iname '*.cpp' -o -iname '*.hpp' | xargs clang-format-14 -i
find -iname '*.cpp' -o -iname '*.hpp' | xargs clang-format-16 -i
```
36 changes: 21 additions & 15 deletions README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ if(alpaka_ACC_SYCL_ENABLE)

if(alpaka_SYCL_ONEAPI_FPGA)
target_compile_definitions(alpaka INTERFACE "ALPAKA_SYCL_ONEAPI_FPGA")
alpaka_set_compiler_options(DEVICE target alpaka "-fintelfpga")

if(alpaka_SYCL_ONEAPI_FPGA_MODE STREQUAL "emulation")
target_compile_definitions(alpaka INTERFACE "ALPAKA_FPGA_EMULATION")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# The short X.Y version.
version = u'1.0.0'
# The full version, including alpha/beta/rc tags.
release = u'1.0.0-develop'
release = u'1.0.0-rc1'

# The master toctree document.
master_doc = 'index'
Expand Down
4 changes: 2 additions & 2 deletions docs/source/dev/style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ whitespace and braces automatically. Usage:

.. code-block:: bash

clang-format-14 -i <sourcefile>
clang-format-16 -i <sourcefile>

* If you want to format the entire code base execute the following command from alpaka's top-level directory:

.. code-block:: bash

find example include test -name '*.hpp' -o -name '*.cpp' | xargs clang-format-14 -i
find example include test -name '*.hpp' -o -name '*.cpp' | xargs clang-format-16 -i

Windows users should use `Visual Studio's native clang-format integration
<https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/>`.
Expand Down
44 changes: 14 additions & 30 deletions include/alpaka/atomic/AtomicOmpBuiltIn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ namespace alpaka
# pragma omp atomic capture compare
{
old = ref;
ref = (ref <= value) ? ref : value;
if(value < ref)
ref = value;
}
return old;
}
Expand All @@ -205,7 +206,8 @@ namespace alpaka
# pragma omp atomic capture compare
{
old = ref;
ref = (ref >= value) ? ref : value;
if(value > ref)
ref = value;
}
return old;
}
Expand All @@ -217,21 +219,12 @@ namespace alpaka
{
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T const& value) -> T
{
// TODO(bgruber): atomic increment with wrap around is not implementable in OpenMP 5.1
T old;
auto& ref(*addr);
// atomically update ref, but capture the original value in old
# if BOOST_COMP_GNUC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wconversion"
# endif
# pragma omp atomic capture compare
# pragma omp critical(AlpakaOmpAtomicOp)
{
old = ref;
ref = ((ref >= value) ? 0 : (ref + 1));
old = AtomicInc{}(addr, value);
}
# if BOOST_COMP_GNUC
# pragma GCC diagnostic pop
# endif
return old;
}
};
Expand All @@ -242,21 +235,12 @@ namespace alpaka
{
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T const& value) -> T
{
// TODO(bgruber): atomic decrement with wrap around is not implementable in OpenMP 5.1
T old;
auto& ref(*addr);
// atomically update ref, but capture the original value in old
# if BOOST_COMP_GNUC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wconversion"
# endif
# pragma omp atomic capture compare
# pragma omp critical(AlpakaOmpAtomicOp)
{
old = ref;
ref = ((ref == 0) || (ref > value)) ? value : (ref - 1);
old = AtomicDec{}(addr, value);
}
# if BOOST_COMP_GNUC
# pragma GCC diagnostic pop
# endif
return old;
}
};
Expand Down Expand Up @@ -293,8 +277,8 @@ namespace alpaka
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T const& value) -> T
{
T old;
// \TODO: Currently not only the access to the same memory location is protected by a mutex but all atomic ops on all
// threads.
// \TODO: Currently not only the access to the same memory location is protected by a mutex but all
// atomic ops on all threads.
# pragma omp critical(AlpakaOmpAtomicOp)
{
old = TOp()(addr, value);
Expand All @@ -309,8 +293,8 @@ namespace alpaka
T const& value) -> T
{
T old;
// \TODO: Currently not only the access to the same memory location is protected by a mutex but all atomic ops on all
// threads.
// \TODO: Currently not only the access to the same memory location is protected by a mutex but all
// atomic ops on all threads.
# pragma omp critical(AlpakaOmpAtomicOp2)
{
old = TOp()(addr, compare, value);
Expand Down
5 changes: 5 additions & 0 deletions include/alpaka/idx/MapIdx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include "alpaka/core/Common.hpp"
#include "alpaka/core/Unreachable.hpp"
#include "alpaka/vec/Traits.hpp"
#include "alpaka/vec/Vec.hpp"

Expand Down Expand Up @@ -50,6 +51,8 @@ namespace alpaka
}
else
static_assert(!sizeof(TElem), "Not implemented");

ALPAKA_UNREACHABLE({});
}

//! Maps an N dimensional index to a N dimensional position based on the pitches of a view without padding or a
Expand Down Expand Up @@ -89,5 +92,7 @@ namespace alpaka
}
else
static_assert(!sizeof(TElem), "Not implemented");

ALPAKA_UNREACHABLE({});
}
} // namespace alpaka
3 changes: 3 additions & 0 deletions include/alpaka/intrinsic/IntrinsicCpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include "alpaka/core/BoostPredef.hpp"
#include "alpaka/core/Unreachable.hpp"
#include "alpaka/intrinsic/IntrinsicFallback.hpp"
#include "alpaka/intrinsic/Traits.hpp"

Expand Down Expand Up @@ -52,6 +53,7 @@ namespace alpaka
// Fallback to standard library
return static_cast<std::int32_t>(std::bitset<sizeof(UnsignedIntegral) * CHAR_BIT>(value).count());
#endif
ALPAKA_UNREACHABLE(0);
}
};

Expand Down Expand Up @@ -79,6 +81,7 @@ namespace alpaka
#else
return alpaka::detail::ffsFallback(value);
#endif
ALPAKA_UNREACHABLE(0);
}
};
} // namespace trait
Expand Down
7 changes: 7 additions & 0 deletions include/alpaka/kernel/TaskKernelGpuUniformCudaHipRt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ namespace alpaka
{
namespace detail
{
# if BOOST_COMP_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-template"
# endif
//! The GPU CUDA/HIP kernel entry point.
// \NOTE: 'A __global__ function or function template cannot have a trailing return type.'
// We have put the function into a shallow namespace and gave it a short name, so the mangled name in the
Expand All @@ -74,6 +78,9 @@ namespace alpaka
# endif
kernelFnObj(const_cast<TAcc const&>(acc), args...);
}
# if BOOST_COMP_CLANG
# pragma clang diagnostic pop
# endif
} // namespace detail

namespace uniform_cuda_hip
Expand Down
4 changes: 2 additions & 2 deletions include/alpaka/mem/buf/BufUniformCudaHipRt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ namespace alpaka
return {
dev,
reinterpret_cast<TElem*>(memPtr),
[queue = std::move(queue)](TElem* ptr)
{ ALPAKA_UNIFORM_CUDA_HIP_RT_CHECK_NOEXCEPT(TApi::freeAsync(ptr, queue.getNativeHandle())); },
[q = std::move(queue)](TElem* ptr)
{ ALPAKA_UNIFORM_CUDA_HIP_RT_CHECK_NOEXCEPT(TApi::freeAsync(ptr, q.getNativeHandle())); },
extent,
static_cast<std::size_t>(width) * sizeof(TElem)};
}
Expand Down
4 changes: 2 additions & 2 deletions include/alpaka/mem/buf/Traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ namespace alpaka
//! this function is provided for convenience in the cases where the difference is not relevant,
//! and the pinned/mapped memory is only used as a performance optimisation.
//!
//! \tparam TPlatform The platform from which the buffer is accessible.
//! \tparam TElem The element type of the returned buffer.
//! \tparam TIdx The linear index type of the buffer.
//! \tparam TExtent The extent type of the buffer.
//! \tparam TPlatform The platform from which the buffer is accessible.
//! \param host The host device to allocate the buffer on.
//! \param extent The extent of the buffer.
//! \return The newly allocated buffer.
template<typename TPlatform, typename TElem, typename TIdx, typename TExtent>
template<typename TElem, typename TIdx, typename TExtent, typename TPlatform>
ALPAKA_FN_HOST auto allocMappedBufIfSupported(
DevCpu const& host,
TPlatform const& platform,
Expand Down
6 changes: 6 additions & 0 deletions include/alpaka/platform/PlatformCpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ namespace alpaka
//! The CPU device platform.
struct PlatformCpu : concepts::Implements<ConceptPlatform, PlatformCpu>
{
#if defined(BOOST_COMP_GNUC) && BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(11, 0, 0) \
&& BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(12, 0, 0)
// This is a workaround for g++-11 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295
// g++-11 complains in *all* places where a PlatformCpu is used, that it "may be used uninitialized"
char c = {};
#endif
};

namespace trait
Expand Down
6 changes: 6 additions & 0 deletions include/alpaka/platform/PlatformUniformCudaHipRt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ namespace alpaka
template<typename TApi>
struct PlatformUniformCudaHipRt : concepts::Implements<ConceptPlatform, PlatformUniformCudaHipRt<TApi>>
{
# if defined(BOOST_COMP_GNUC) && BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(11, 0, 0) \
&& BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(12, 0, 0)
// This is a workaround for g++-11 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295
// g++-11 complains in *all* places where a PlatformCpu is used, that it "may be used uninitialized"
char c = {};
# endif
};

namespace trait
Expand Down
Loading
Loading