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

Require Kokkos 4.1 #973

Merged
merged 8 commits into from
Dec 19, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: 4.0.00
ref: 4.1.00
path: ${GITHUB_WORKSPACE}/../kokkos
- name: Install Kokkos
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BuildKokkos:
extends: .LoadModules
stage: buildDependencies
script:
- git clone --depth=1 --branch 4.0.00 https://github.com/kokkos/kokkos.git &&
- git clone --depth=1 --branch 4.1.00 https://github.com/kokkos/kokkos.git &&
cd kokkos &&
mkdir build &&
cd build &&
Expand Down
6 changes: 3 additions & 3 deletions .jenkins/continuous.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pipeline {
dockerfile {
filename "Dockerfile"
dir "docker"
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.5.2-devel-ubuntu20.04 --build-arg KOKKOS_VERSION=4.1.00 --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_VOLTA70=ON" --build-arg CUDA_AWARE_MPI=1'
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.5.2-devel-ubuntu20.04 --build-arg KOKKOS_VERSION=4.1.00 --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_VOLTA70=ON" --build-arg CUDA_AWARE_MPI=1'
args '-v /tmp/ccache:/tmp/ccache --env NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}'
label 'NVIDIA_Tesla_V100-PCIE-32GB && nvidia-docker'
}
Expand Down Expand Up @@ -102,7 +102,7 @@ pipeline {
dockerfile {
filename "Dockerfile"
dir "docker"
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.0.3-devel-ubuntu20.04 --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_VOLTA70=ON"'
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.0.3-devel-ubuntu20.04 --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_VOLTA70=ON"'
args '-v /tmp/ccache:/tmp/ccache --env NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}'
label 'NVIDIA_Tesla_V100-PCIE-32GB && nvidia-docker'
}
Expand Down Expand Up @@ -161,7 +161,7 @@ pipeline {
dockerfile {
filename "Dockerfile"
dir "docker"
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.0.3-devel-ubuntu18.04 --build-arg KOKKOS_VERSION="4.1.00" --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_COMPILER=clang++ -DKokkos_ENABLE_THREADS=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_VOLTA70=ON -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu"'
additionalBuildArgs '--build-arg BASE=nvidia/cuda:11.0.3-devel-ubuntu18.04 --build-arg KOKKOS_VERSION="4.1.00" --build-arg KOKKOS_OPTIONS="-DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_COMPILER=clang++ -DKokkos_ENABLE_THREADS=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_VOLTA70=ON -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu"'
args '-v /tmp/ccache:/tmp/ccache --env NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}'
label 'NVIDIA_Tesla_V100-PCIE-32GB && nvidia-docker'
}
Expand Down
4 changes: 2 additions & 2 deletions .jenkins/nightly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pipeline {
dir('source-kokkos') {
sh 'git rev-parse --short HEAD'
}
sh 'cmake -S source-kokkos -B build-kokkos -D CMAKE_INSTALL_PREFIX=$PWD/install-kokkos $CMAKE_OPTIONS -D Kokkos_ENABLE_CUDA=ON -D Kokkos_ENABLE_CUDA_LAMBDA=ON'
sh 'cmake -S source-kokkos -B build-kokkos -D CMAKE_INSTALL_PREFIX=$PWD/install-kokkos $CMAKE_OPTIONS -D Kokkos_ENABLE_CUDA=ON'
sh 'cmake --build build-kokkos --parallel 8'
sh 'cmake --install build-kokkos'
// Disable tests as Ubuntu 22.04 comes with Boost 1.74 which causes build issues with CUDA
Expand Down Expand Up @@ -66,7 +66,7 @@ pipeline {
dir('source-kokkos') {
sh 'git rev-parse --short HEAD'
}
sh 'cmake -S source-kokkos -B build-kokkos -D CMAKE_INSTALL_PREFIX=$PWD/install-kokkos $CMAKE_OPTIONS -D Kokkos_ENABLE_CUDA=ON -D Kokkos_ENABLE_CUDA_LAMBDA=ON'
sh 'cmake -S source-kokkos -B build-kokkos -D CMAKE_INSTALL_PREFIX=$PWD/install-kokkos $CMAKE_OPTIONS -D Kokkos_ENABLE_CUDA=ON'
sh 'cmake --build build-kokkos --parallel 8'
sh 'cmake --install build-kokkos'
// Disable tests as Ubuntu 22.04 comes with Boost 1.74 which causes build issues with CUDA
Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(ArborX CXX)

find_package(Kokkos 4.0 REQUIRED CONFIG)
find_package(Kokkos 4.1 REQUIRED CONFIG)
message(STATUS "Found Kokkos: ${Kokkos_DIR} (version \"${Kokkos_VERSION}\")")
if(Kokkos_ENABLE_CUDA AND Kokkos_VERSION VERSION_LESS 4.1)
# CUDA_LAMBDA is deprecated starting 4.1
kokkos_check(OPTIONS CUDA_LAMBDA)
endif()

add_library(ArborX INTERFACE)
target_link_libraries(ArborX INTERFACE Kokkos::kokkos)
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ RUN SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \
ENV LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib:${LD_LIBRARY_PATH}

# Install Kokkos
ARG KOKKOS_VERSION=4.0.00
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON"
ARG KOKKOS_VERSION=4.2.00
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON"
ENV KOKKOS_DIR=/opt/kokkos
RUN KOKKOS_URL=https://github.com/kokkos/kokkos/archive/${KOKKOS_VERSION}.tar.gz && \
KOKKOS_ARCHIVE=kokkos-${KOKKOS_HASH}.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.hipcc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \
rm -rf ${SCRATCH_DIR}

# Install Kokkos
ARG KOKKOS_VERSION=4.0.00
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not bump 4.0.00 to 4.1.00 and 4.1.00 to 4.2.00?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we would leap frog the versions. Change 4.0 to 4.2 now, change 4.1 to 4.3 next time. This way we have a mix of older builds and newer builds.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For SYCL in particular I would prefer using the most recent release. Otherwise, I don't have a strong opinion.

ARG KOKKOS_VERSION=4.2.00
ARG KOKKOS_ARCH=Kokkos_ARCH_VEGA906
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_HIP=ON -DKokkos_ENABLE_OPENMP=ON -D${KOKKOS_ARCH}=ON"
ENV KOKKOS_DIR=/opt/kokkos
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ RUN SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \
rm -rf ${SCRATCH_DIR}

# Install Kokkos
ARG KOKKOS_VERSION=4.1.00
ARG KOKKOS_VERSION=4.2.00
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_SYCL=ON -DCMAKE_CXX_FLAGS=-Wno-unknown-cuda-version -DKokkos_ENABLE_UNSUPPORTED_ARCHS=ON -DKokkos_ENABLE_DEPRECATED_CODE_3=OFF -DKokkos_ARCH_VOLTA70=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=-w"
ENV KOKKOS_DIR=/opt/kokkos
RUN . /opt/intel/oneapi/setvars.sh --include-intel-llvm && \
Expand Down
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ in the environment file. Its value will be prepended along with the service
name to the container on start up.


You may use multiple compose files to customize your container. For instance, you
You may use multiple compose files to customize your container. For instance, you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change? This is likely me using two spaces between sentences.
In any case, not really related to this PR. I am not requesting changes but if there is any further push I would like you to undo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it in a9dba00, before your review, when I needed to force push to fix the incorrect Jenkins links, and was looking for a minor change.

could reproduce the configuration from one of the automated builds by providing
the following a `docker-compose.override.yml` file:
```
Expand All @@ -13,6 +13,6 @@ services:
build:
args:
- BASE=nvidia/cuda:11.5.2-devel-ubuntu20.04
- KOKKOS_VERSION=4.0.00
- KOKKOS_OPTIONS=-DCMAKE_CXX_STANDARD=17 -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_SNB=ON -DKokkos_ARCH_VOLTA70=ON
- KOKKOS_VERSION=4.2.00
- KOKKOS_OPTIONS=-DCMAKE_CXX_STANDARD=17 -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_SNB=ON -DKokkos_ARCH_VOLTA70=ON
```
8 changes: 4 additions & 4 deletions src/ArborX_BruteForce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
#include <ArborX_DetailsBruteForceImpl.hpp>
#include <ArborX_DetailsCrsGraphWrapperImpl.hpp>
#include <ArborX_DetailsKokkosExtAccessibilityTraits.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_DetailsLegacy.hpp>
#include <ArborX_IndexableGetter.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>

namespace ArborX
{
Expand Down Expand Up @@ -69,7 +69,7 @@ class BasicBruteForce
query(ExecutionSpace const &space, Predicates const &predicates,
CallbackOrView &&callback_or_view, View &&view, Args &&...args) const
{
KokkosExt::ScopedProfileRegion guard("ArborX::BruteForce::query_crs");
Kokkos::Profiling::ScopedRegion guard("ArborX::BruteForce::query_crs");

Details::CrsGraphWrapperImpl::
check_valid_callback_if_first_argument_is_not_a_view<value_type>(
Expand Down Expand Up @@ -156,7 +156,7 @@ class BruteForce
}
else
{
KokkosExt::ScopedProfileRegion guard("ArborX::BruteForce::query_crs");
Kokkos::Profiling::ScopedRegion guard("ArborX::BruteForce::query_crs");

Kokkos::View<int *, MemorySpace> indices(
"ArborX::CrsGraphWrapper::query::indices", 0);
Expand Down Expand Up @@ -194,7 +194,7 @@ BasicBruteForce<MemorySpace, Value, IndexableGetter, BoundingVolume>::
ExecutionSpace>::value,
"Values must be accessible from the execution space");

KokkosExt::ScopedProfileRegion guard("ArborX::BruteForce::BruteForce");
Kokkos::Profiling::ScopedRegion guard("ArborX::BruteForce::BruteForce");

if (empty())
{
Expand Down
5 changes: 3 additions & 2 deletions src/ArborX_HDBSCAN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
#define ARBORX_HDBSCAN_HPP

#include <ArborX_Dendrogram.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_MinimumSpanningTree.hpp>

#include <Kokkos_Profiling_ScopedRegion.hpp>

namespace ArborX::Experimental
{

Expand All @@ -24,7 +25,7 @@ auto hdbscan(ExecutionSpace const &exec_space, Primitives const &primitives,
DendrogramImplementation dendrogram_impl =
DendrogramImplementation::BORUVKA)
{
KokkosExt::ScopedProfileRegion guard("ArborX::HDBSCAN");
Kokkos::Profiling::ScopedRegion guard("ArborX::HDBSCAN");

using namespace ArborX::Details;

Expand Down
8 changes: 4 additions & 4 deletions src/ArborX_LinearBVH.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <ArborX_DetailsBatchedQueries.hpp>
#include <ArborX_DetailsCrsGraphWrapperImpl.hpp>
#include <ArborX_DetailsKokkosExtAccessibilityTraits.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_DetailsLegacy.hpp>
#include <ArborX_DetailsNode.hpp>
#include <ArborX_DetailsPermutedData.hpp>
Expand All @@ -32,6 +31,7 @@
#include <ArborX_TraversalPolicy.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized it is not provided by <Kokkos_Core.hpp> :(


namespace ArborX
{
Expand Down Expand Up @@ -93,7 +93,7 @@ class BasicBoundingVolumeHierarchy
query(ExecutionSpace const &space, Predicates const &predicates,
CallbackOrView &&callback_or_view, View &&view, Args &&...args) const
{
KokkosExt::ScopedProfileRegion guard("ArborX::BVH::query_crs");
Kokkos::Profiling::ScopedRegion guard("ArborX::BVH::query_crs");

Details::CrsGraphWrapperImpl::
check_valid_callback_if_first_argument_is_not_a_view<value_type>(
Expand Down Expand Up @@ -206,7 +206,7 @@ class BoundingVolumeHierarchy
}
else
{
KokkosExt::ScopedProfileRegion guard("ArborX::BVH::query_crs");
Kokkos::Profiling::ScopedRegion guard("ArborX::BVH::query_crs");

Kokkos::View<int *, MemorySpace> indices(
"ArborX::CrsGraphWrapper::query::indices", 0);
Expand Down Expand Up @@ -266,7 +266,7 @@ BasicBoundingVolumeHierarchy<MemorySpace, Value, IndexableGetter,

Details::check_valid_space_filling_curve<DIM>(curve);

KokkosExt::ScopedProfileRegion guard("ArborX::BVH::BVH");
Kokkos::Profiling::ScopedRegion guard("ArborX::BVH::BVH");

if (empty())
{
Expand Down
18 changes: 9 additions & 9 deletions src/details/ArborX_DetailsDistributedTreeImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <ArborX_DetailsDistributor.hpp>
#include <ArborX_DetailsHappyTreeFriends.hpp>
#include <ArborX_DetailsKokkosExtMinMaxOperations.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_DetailsPriorityQueue.hpp>
#include <ArborX_DetailsUtils.hpp>
Expand All @@ -28,6 +27,7 @@
#include <ArborX_Sphere.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>

#include <mpi.h>

Expand Down Expand Up @@ -249,7 +249,7 @@ DistributedTreeImpl<DeviceType>::sendAcrossNetwork(
ExecutionSpace const &space, Distributor<DeviceType> const &distributor,
View exports, typename View::non_const_type imports)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::sendAcrossNetwork (" + exports.label() + ")");

ARBORX_ASSERT((exports.extent(0) == distributor.getTotalSendLength()) &&
Expand Down Expand Up @@ -319,7 +319,7 @@ void DistributedTreeImpl<DeviceType>::deviseStrategy(
ExecutionSpace const &space, Predicates const &queries,
DistributedTree const &tree, Indices &indices, Offset &offset, Distances &)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::deviseStrategy");

auto const &top_tree = tree._top_tree;
Expand Down Expand Up @@ -381,7 +381,7 @@ void DistributedTreeImpl<DeviceType>::reassessStrategy(
DistributedTree const &tree, Indices &indices, Offset &offset,
Distances &distances)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::reassessStrategy");

auto const &top_tree = tree._top_tree;
Expand Down Expand Up @@ -487,7 +487,7 @@ DistributedTreeImpl<DeviceType>::queryDispatchImpl(
ExecutionSpace const &space, Predicates const &queries, Indices &indices,
Offset &offset, Ranks &ranks, Distances *distances_ptr)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::query::nearest");

auto const &bottom_tree = tree._bottom_tree;
Expand Down Expand Up @@ -590,7 +590,7 @@ DistributedTreeImpl<DeviceType>::queryDispatch(
ExecutionSpace const &space, Predicates const &queries,
Callback const &callback, OutputView &out, OffsetView &offset)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::query::spatial");

auto const &top_tree = tree._top_tree;
Expand Down Expand Up @@ -701,7 +701,7 @@ void DistributedTreeImpl<DeviceType>::forwardQueries(
Kokkos::View<Query *, DeviceType> &fwd_queries,
Kokkos::View<int *, DeviceType> &fwd_ids, Ranks &fwd_ranks)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::forwardQueries");

int comm_rank;
Expand Down Expand Up @@ -794,7 +794,7 @@ void DistributedTreeImpl<DeviceType>::communicateResultsBack(
Kokkos::View<int *, DeviceType> offset, Ranks &ranks,
Kokkos::View<int *, DeviceType> &ids, Distances *distances_ptr)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::communicateResultsBack");

int comm_rank;
Expand Down Expand Up @@ -882,7 +882,7 @@ void DistributedTreeImpl<DeviceType>::filterResults(
Kokkos::View<float *, DeviceType> distances, Indices &indices,
Offset &offset, Ranks &ranks)
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::filterResults");

using Access = AccessTraits<Predicates, PredicatesTag>;
Expand Down
10 changes: 5 additions & 5 deletions src/details/ArborX_DetailsMinimumSpanningTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#include <ArborX_DetailsAlgorithms.hpp>
#include <ArborX_DetailsHappyTreeFriends.hpp>
#include <ArborX_DetailsKokkosExtArithmeticTraits.hpp>
#include <ArborX_DetailsKokkosExtBitManipulation.hpp>
#include <ArborX_DetailsKokkosExtMinMaxOperations.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_DetailsKokkosExtSwap.hpp>
#include <ArborX_DetailsUtils.hpp>
#include <ArborX_DetailsWeightedEdge.hpp>

#include <Kokkos_BitManipulation.hpp>
#include <Kokkos_Core.hpp>
#include <Kokkos_MathematicalFunctions.hpp> // isfinite, signbit
#include <Kokkos_Profiling_ScopedRegion.hpp>

namespace ArborX::Details
{
Expand Down Expand Up @@ -503,7 +503,7 @@ void updateSidedParents(ExecutionSpace const &space, Labels const &labels,
SidedParents &sided_parents, int edges_start,
int edges_end)
{
KokkosExt::ScopedProfileRegion guard("ArborX::MST::update_sided_parents");
Kokkos::Profiling::ScopedRegion guard("ArborX::MST::update_sided_parents");

// Same as dendrogram alpha's standalone "updateSidedParents"
Kokkos::parallel_for(
Expand Down Expand Up @@ -559,7 +559,7 @@ template <typename ExecutionSpace, typename Edges, typename SidedParents,
void computeParents(ExecutionSpace const &space, Edges const &edges,
SidedParents const &sided_parents, Parents &parents)
{
KokkosExt::ScopedProfileRegion guard("ArborX::MST::compute_edge_parents");
Kokkos::Profiling::ScopedRegion guard("ArborX::MST::compute_edge_parents");

using MemorySpace = typename SidedParents::memory_space;

Expand Down Expand Up @@ -614,7 +614,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges,
static_assert(sizeof(int) == sizeof(float));
KOKKOS_ASSERT(Kokkos::isfinite(edge.weight) &&
Kokkos::signbit(edge.weight) == 0);
keys(e) = (key << shift) + KokkosExt::bit_cast<int>(edge.weight);
keys(e) = (key << shift) + Kokkos::bit_cast<int>(edge.weight);
});

auto permute = sortObjects(space, keys);
Expand Down
6 changes: 4 additions & 2 deletions src/details/ArborX_MinimumSpanningTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define ARBORX_MINIMUM_SPANNING_TREE_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_DetailsKokkosExtScopedProfileRegion.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_DetailsMinimumSpanningTree.hpp>
#include <ArborX_DetailsMutualReachabilityDistance.hpp>
Expand All @@ -22,6 +21,9 @@
#include <ArborX_DetailsWeightedEdge.hpp>
#include <ArborX_LinearBVH.hpp>

#include <Kokkos_Core.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

#include <Kokkos_Profiling_ScopedRegion.hpp>

namespace ArborX::Details
{

Expand Down Expand Up @@ -230,7 +232,7 @@ struct MinimumSpanningTree
edges_start, edges_end);
else
{
KokkosExt::ScopedProfileRegion guard(
Kokkos::Profiling::ScopedRegion guard(
"ArborX::MST::compute_vertex_parents");
assignVertexParents(space, labels, component_out_edges, edges_mapping,
bvh, dendrogram_parents);
Expand Down
Loading