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

Tpetra: Fix compiling with SYCL #12294

Merged
merged 1 commit into from
Sep 21, 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
12 changes: 6 additions & 6 deletions packages/tpetra/core/src/Tpetra_Details_Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void finalize_hip_pool() {
#endif // KOKKOS_ENABLE_HIP

#ifdef KOKKOS_ENABLE_SYCL
Kokkos::Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space> * sycl_pool_=nullptr;
Kokkos::Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space> * sycl_pool_=nullptr;

void finalize_sycl_pool() {
if(sycl_pool_ != nullptr) {
Expand Down Expand Up @@ -183,9 +183,9 @@ getPool() {
/********************************************************************************/
#ifdef KOKKOS_ENABLE_SYCL
void
Static_Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space>::
Static_Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space>::
resetPool(int mpi_rank) {
using pool_type = Kokkos::Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space>;
using pool_type = Kokkos::Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space>;

if(isSet())
delete sycl_pool_;
Expand All @@ -196,13 +196,13 @@ resetPool(int mpi_rank) {
}

bool
Static_Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space>::
Static_Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space>::
isSet() {
return sycl_pool_!=nullptr;
}

Kokkos::Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space> &
Static_Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space>::
Kokkos::Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space> &
Static_Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space>::
getPool() {
TEUCHOS_TEST_FOR_EXCEPTION(!isSet(),std::runtime_error,"Tpetra::Details::Static_Random_XorShift64_Pool: resetPool() must be called before getPool");
return *sycl_pool_;
Expand Down
4 changes: 2 additions & 2 deletions packages/tpetra/core/src/Tpetra_Details_Random.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ class Static_Random_XorShift64_Pool<typename Kokkos::HIPSpace::execution_space>

#ifdef KOKKOS_ENABLE_SYCL
template<>
class Static_Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space> {
class Static_Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space> {
public:
static void resetPool(int mpi_rank);
static bool isSet();
static Kokkos::Random_XorShift64_Pool<typename Kokkos::SYCLDeviceUSMSpace::execution_space> & getPool();
static Kokkos::Random_XorShift64_Pool<typename Kokkos::Experimental::SYCLDeviceUSMSpace::execution_space> & getPool();
};
#endif // KOKKOS_ENABLE_SYCL

Expand Down
1 change: 0 additions & 1 deletion packages/tpetra/core/src/Tpetra_Import_Util2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,6 @@ lowCommunicationMakeColMapAndReindexKokkos (const Teuchos::ArrayView<const size_
const int PID = owningPIDs_view[j];
auto outcome = RemoteGIDs_view_map.insert(GID, PID);
if(outcome.success() && PID == -1) {
printf("Cannot figure out if ID is owned.\n");
Kokkos::abort("Cannot figure out if ID is owned.\n");
}
}
Expand Down