Skip to content
Open
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
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,60 @@
# CHANGELOG
## 5.1.0

[Full Changelog](https://github.com/kokkos/kokkos/compare/5.0.2...5.1.0)

### Features:
* Export Kokkos type traits as C++20 concepts [\#8494](https://github.com/kokkos/kokkos/pull/8494)

### Backend and Architecture Enhancements:

#### CUDA:
* Added `Kokkos_ARCH_BLACKWELL103` configure option for NVIDIA B300 GPUs [\#8791](https://github.com/kokkos/kokkos/pull/8791)
* Fix compiling with Clang+Cuda+OpenMP with Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE=ON [\#8810](https://github.com/kokkos/kokkos/pull/8810)
* `nvcc_wrapper`: Add support for `-Ofc` and `--fdevice-time-trace` flags [\#8865](https://github.com/kokkos/kokkos/pull/8865)

#### HIP:
* Search the CMake variable `ROCM_PATH` for dependencies [\#8669](https://github.com/kokkos/kokkos/pull/8669)
* Added support for brain floating-point (`bhalf_t`) [\#8705](https://github.com/kokkos/kokkos/pull/8705)
* Implemented true reduced-precision mathematical functions (instead of falling back to `float`) [\#8705](https://github.com/kokkos/kokkos/pull/8705)
* Add support for AMD MI355 and MI350 (`AMD_GFX950`) [\#8839](https://github.com/kokkos/kokkos/pull/8839)
* Fix race conditions in HIP `parallel_scan` when running on MI300A [\#8648](https://github.com/kokkos/kokkos/pull/8648)

### General Enhancements
* Enable ScatterView to contribute into a View that is an rvalue [\#8594](https://github.com/kokkos/kokkos/pull/8594)
* Add bitwise operators to simd vectors and simd masks [\#8565](https://github.com/kokkos/kokkos/pull/8565)
* Use Array::size_type for subscript operators [\#8692](https://github.com/kokkos/kokkos/pull/8692)
* Add missing numeric trait `denorm_min` for `Kokkos::Experimental::half_t` and `Kokkos::Experimental::bhalf_t` [\#8769](https://github.com/kokkos/kokkos/pull/8769)
* Use StaticBatchSize in ViewFill [\#8795](https://github.com/kokkos/kokkos/pull/8795)
* Enforce failure when exceeding team_size_max and scratch_size_max checks [\#7445](https://github.com/kokkos/kokkos/pull/7445)
* Enable MPI detection with PALS [\#8895](https://github.com/kokkos/kokkos/pull/8895)
* Add simd memory permute functions [\#8775](https://github.com/kokkos/kokkos/pull/8775)
* Performance improvements using `MDRangePolicy` with `CUDA`, `HIP` and `SYCL` [\#8638](https://github.com/kokkos/kokkos/pull/8638), [\#8731](https://github.com/kokkos/kokkos/pull/8731)
* Add `Kokkos::norm`for `Kokkos::complex`- similar to `std::norm` [\#8627](https://github.com/kokkos/kokkos/pull/8927)
* Use neon and sve SIMD instructions if `nvcc` supports them [\#8667](https://github.com/kokkos/kokkos/pull/8667)
* Expand math support: complete the implementation of all remaining math functions and increase half-type support [\#8595](https://github.com/kokkos/kokkos/pull/8789) [\#8858](https://github.com/kokkos/kokkos/pull/8858) [\#8873](https://github.com/kokkos/kokkos/pull/8873) [\#8712](https://github.com/kokkos/kokkos/pull/8712) [\#8827](https://github.com/kokkos/kokkos/pull/8827) [\#8819](https://github.com/kokkos/kokkos/pull/8819) [\#8719](https://github.com/kokkos/kokkos/pull/8719) [\#8863](https://github.com/kokkos/kokkos/pull/8863) [\#8862](https://github.com/kokkos/kokkos/pull/8862) [\#8778](https://github.com/kokkos/kokkos/pull/8778) [\#8891](https://github.com/kokkos/kokkos/pull/8891)
* Improve performance of `deep_copy` from scalar in view fill using StaticBatchSize [\#8795](https://github.com/kokkos/kokkos/pull/8795) [\#8829](https://github.com/kokkos/kokkos/pull/8829)

### Build System Changes
* Warn about multiple device architectures enabled by `find_package(HIP)` [\#8938](https://github.com/kokkos/kokkos/pull/8938)

### Incompatibilities (i.e. breaking changes)
* Execution spaces can only be constructed after `Kokkos::initialize()` has been called and must be destructed before `Kokkos::finalize()` [\#8546](https://github.com/kokkos/kokkos/pull/8546) [\#8677](https://github.com/kokkos/kokkos/pull/8677)
* ScatterValue isn't move constructible/assignable anymore [\#8761](https://github.com/kokkos/kokkos/pull/8761)
* Enforce TeamPolicy constructor preconditions (includes vector length must be a power of two) [\#8904](https://github.com/kokkos/kokkos/pull/8904) [\#8907](https://github.com/kokkos/kokkos/pull/8907)
* OpenMP: Warn on exec space instance created within omp region [\#8919](https://github.com/kokkos/kokkos/pull/8919)
* Remove the deprecated OpenMPTarget backend [\#8701](https://github.com/kokkos/kokkos/pull/8701) [\#8717](https://github.com/kokkos/kokkos/pull/8717) [\#8749](https://github.com/kokkos/kokkos/pull/8749) [\#8767](https://github.com/kokkos/kokkos/pull/8767)

### Bug Fixes
* Fix reduction_identity for BAnd [\#8715](https://github.com/kokkos/kokkos/pull/8715)
* Restrict lock free host atomics to the actual sizes that are lock free [\#8809](https://github.com/kokkos/kokkos/pull/8809)
* Use intrinsics when calling min and max on simd vectors of integral types [\#8899](https://github.com/kokkos/kokkos/pull/8899)
* Adds missing `constexpr` specifiers on `conj()`, and for the `real()` and `imag()` non-member functions taking complex numbers [\#8928](https://github.com/kokkos/kokkos/pull/8928)
* Ensure that execution space instances fence on finalize [\#8626](https://github.com/kokkos/kokkos/pull/8626)
* Update `team_fan_{in|out}` member functions of `ThreadsExecTeamMember` not to call host-only fuctions on the device [\#8730](https://github.com/kokkos/kokkos/pull/8730)
* Make overloads of `isnormal` compliant with std [\#8857](https://github.com/kokkos/kokkos/pull/8857)
* Fix compiler macros identify GCC and LLVM Clang on OSX [\#8592](https://github.com/kokkos/kokkos/pull/8592) [\#8952](https://github.com/kokkos/kokkos/pull/8952)

## 5.0.2

[Full Changelog](https://github.com/kokkos/kokkos/compare/5.0.1...5.0.2)
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ elseif(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
endif()

set(Kokkos_VERSION_MAJOR 5)
set(Kokkos_VERSION_MINOR 0)
set(Kokkos_VERSION_PATCH 99)
set(Kokkos_VERSION_MINOR 1)
set(Kokkos_VERSION_PATCH 1)
set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}")
message(STATUS "Kokkos version: ${Kokkos_VERSION}")
math(EXPR KOKKOS_VERSION "${Kokkos_VERSION_MAJOR} * 10000 + ${Kokkos_VERSION_MINOR} * 100 + ${Kokkos_VERSION_PATCH}")
Expand Down
15 changes: 8 additions & 7 deletions core/src/Kokkos_Macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
* KOKKOS_ENABLE_CUDA_UVM Use CUDA UVM for Cuda memory space.
*/

#ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
#include <KokkosCore_config.h>
#include <impl/Kokkos_DesulAtomicsConfig.hpp>
#include <impl/Kokkos_NvidiaGpuArchitectures.hpp>
#endif

#define KOKKOS_VERSION_LESS(MAJOR, MINOR, PATCH) \
(KOKKOS_VERSION < ((MAJOR)*10000 + (MINOR)*100 + (PATCH)))

Expand All @@ -38,12 +44,6 @@
#error implementation bug
#endif

#ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
#include <KokkosCore_config.h>
#include <impl/Kokkos_DesulAtomicsConfig.hpp>
#include <impl/Kokkos_NvidiaGpuArchitectures.hpp>
#endif

#if __has_include(<version>)
#include <version>
#else
Expand Down Expand Up @@ -126,7 +126,8 @@
// CRAY compiler for host code
#define KOKKOS_COMPILER_CRAYC _CRAYC

#elif defined(__APPLE_CC__) && defined(__clang__)
#elif defined(__APPLE_CC__) && defined(__clang__) && \
defined(__apple_build_version__)
#define KOKKOS_COMPILER_APPLECC __APPLE_CC__

#elif defined(__NVCOMPILER)
Expand Down
3 changes: 2 additions & 1 deletion core/src/View/Kokkos_BasicView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,8 @@ class BasicView {
// Explicit cast is needed because submdspan_mapping may return a different
// layout type.
using sub_accessor_t = typename OtherAccessorPolicy::offset_policy;
m_ptr = src_view.m_acc.offset(src_view.m_ptr, sub_mapping_result.offset);
m_ptr = static_cast<data_handle_type>(
src_view.m_acc.offset(src_view.m_ptr, sub_mapping_result.offset));
m_map = mapping_type(sub_mapping_result.mapping);
m_acc = sub_accessor_t(src_view.m_acc);

Expand Down
11 changes: 10 additions & 1 deletion core/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,16 @@ foreach(Tag Threads;Serial;OpenMP;Cuda;HPX;OpenACC;HIP;SYCL)
endforeach()

set(${Tag}_SOURCES2D)
foreach(Name SubView_c10 SubView_c11 SubView_c12 SubView_c13 SubView_c14 SubView_c15)
foreach(
Name
SubView_c10
SubView_c11
SubView_c12
SubView_c13
SubView_c14
SubView_c15
SubView_c16
)
set(file ${dir}/Test${Tag}_${Name}.cpp)
# Write to a temporary intermediate file and call configure_file to avoid
# updating timestamps triggering unnecessary rebuilds on subsequent cmake runs.
Expand Down
2 changes: 1 addition & 1 deletion core/unit_test/TestSubView_c15.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TEST(TEST_CATEGORY_DEATH, view_subview_constructor_layout_compatibility) {
(void)Kokkos::View<int*, LS>(a1, Kokkos::ALL, 1);

// FIXME: This doesn't compile for BasicView, but should
//(void)Kokkos::View<int*, LR>(a, Kokkos::ALL, 1);
// (void)Kokkos::View<int*, LR>(a1, Kokkos::ALL, 1);
}
{
// Using subview dims (1, ALL). For a LayoutLeft,
Expand Down
55 changes: 55 additions & 0 deletions core/unit_test/TestSubView_c16.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright Contributors to the Kokkos project

#include <gtest/gtest.h>
#include <Kokkos_Macros.hpp>
#ifdef KOKKOS_ENABLE_EXPERIMENTAL_CXX20_MODULES
import kokkos.core;
#else
#include <Kokkos_Core.hpp>
#endif

namespace {
// Test that the subview constructor works for constructing subviews from
// Views where one of them has the Kokkos::Unmanaged memory trait
TEST(TEST_CATEGORY, view_create_unmanaged_subview_from_managed) {
int N = 10;
using LR = Kokkos::LayoutRight;
using LL = Kokkos::LayoutLeft;
using LS = Kokkos::LayoutStride;

Kokkos::View<int**, LL> a1("A1", N, N);
Kokkos::View<int**, LL, Kokkos::MemoryTraits<Kokkos::Unmanaged>> a1_unmanaged(
a1.data(), N, N);
{
// Using subview dims (ALL, 1). For a LayoutLeft,
// any subview layout should be appropriate.
(void)Kokkos::View<int*, LL, Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
a1, Kokkos::ALL, 1);
(void)Kokkos::View<int*, LS, Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
a1, Kokkos::ALL, 1);

(void)Kokkos::View<int*, LL>(a1_unmanaged, Kokkos::ALL, 1);
(void)Kokkos::View<int*, LS>(a1_unmanaged, Kokkos::ALL, 1);
// FIXME: This doesn't compile for BasicView, but should
// (void)Kokkos::View<int*, LR>(a1_unmanaged, Kokkos::ALL, 1);
}

Kokkos::View<int**, LL> a2("A2", 1, N);
Kokkos::View<int**, LL, Kokkos::MemoryTraits<Kokkos::Unmanaged>> a2_unmanaged(
a2.data(), 1, N);
{
// Using subview dims (0, ALL). Any subview layout should be appropriate.
(void)Kokkos::View<int*, LL, Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
a2, 0, Kokkos::ALL);
(void)Kokkos::View<int*, LS, Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
a2, 0, Kokkos::ALL);
(void)Kokkos::View<int*, LR, Kokkos::MemoryTraits<Kokkos::Unmanaged>>(
a2, 0, Kokkos::ALL);

(void)Kokkos::View<int*, LL>(a2_unmanaged, 0, Kokkos::ALL);
(void)Kokkos::View<int*, LS>(a2_unmanaged, 0, Kokkos::ALL);
(void)Kokkos::View<int*, LR>(a2_unmanaged, 0, Kokkos::ALL);
}
}
} // namespace
48 changes: 24 additions & 24 deletions simd/src/Kokkos_SIMD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,29 +236,29 @@ simd_unchecked_load(const T* ptr,
return simd_unchecked_load<basic_simd<T, simd_abi::scalar>>(ptr, flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::NonScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto unchecked_gather_from(
R&& in, const I& indices, simd_flags<Flags...> flag = simd_flag_default) {
return unchecked_gather_from<
basic_simd<T, simd_abi::Impl::host_fixed_native<T>>>(in, indices, flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::ScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_FORCEINLINE_FUNCTION auto unchecked_gather_from(
R&& in, const I& indices, simd_flags<Flags...> flag = simd_flag_default) {
return unchecked_gather_from<basic_simd<T, simd_abi::scalar>>(in, indices,
flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::NonScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto unchecked_gather_from(
R&& in, const typename I::mask_type& mask, const I& indices,
Expand All @@ -268,9 +268,9 @@ KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto unchecked_gather_from(
flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::ScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_FORCEINLINE_FUNCTION auto unchecked_gather_from(
R&& in, const typename I::mask_type& mask, const I& indices,
Expand All @@ -279,29 +279,29 @@ KOKKOS_FORCEINLINE_FUNCTION auto unchecked_gather_from(
indices, flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::NonScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto partial_gather_from(
R&& in, const I& indices, simd_flags<Flags...> flag = simd_flag_default) {
return partial_gather_from<
basic_simd<T, simd_abi::Impl::host_fixed_native<T>>>(in, indices, flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::ScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_FORCEINLINE_FUNCTION auto partial_gather_from(
R&& in, const I& indices, simd_flags<Flags...> flag = simd_flag_default) {
return partial_gather_from<basic_simd<T, simd_abi::scalar>>(in, indices,
flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::NonScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto partial_gather_from(
R&& in, const typename I::mask_type& mask, const I& indices,
Expand All @@ -311,9 +311,9 @@ KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION auto partial_gather_from(
flag);
}

template <std::ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = std::ranges::range_value_t<R>>
requires std::ranges::sized_range<R> &&
template <Impl::Ranges::contiguous_range R, Impl::SimdIntegral I,
typename... Flags, typename T = Impl::Ranges::range_value_t<R>>
requires Impl::Ranges::sized_range<R> &&
Impl::ScalarAbi<simd_abi::Impl::host_fixed_native<T>>
KOKKOS_FORCEINLINE_FUNCTION auto partial_gather_from(
R&& in, const typename I::mask_type& mask, const I& indices,
Expand Down
Loading