Skip to content
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
11 changes: 7 additions & 4 deletions cmake/Modules/FindNVTX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
# ``NVTX_FOUND``
# If false, do not try to use the NVTX library.

find_path(
NVTX3_INCLUDE_DIR
NAMES nvToolsExt.h
HINTS ${CUDAToolkit_INCLUDE_DIRS}/nvtx3
# In some platforms, CUDAToolkit_INCLUDE_DIRS can contain more than one directory.
# ${list}/suffix will only add suffix to the last one
list(
TRANSFORM CUDAToolkit_INCLUDE_DIRS
APPEND "/nvtx3"
OUTPUT_VARIABLE NVTX3_INCLUDE_HINTS
)
find_path(NVTX3_INCLUDE_DIR NAMES nvToolsExt.h HINTS ${NVTX3_INCLUDE_HINTS})
find_path(NVTX_INCLUDE_DIR NAMES nvToolsExt.h HINTS ${CUDAToolkit_INCLUDE_DIRS})
mark_as_advanced(NVTX3_INCLUDE_DIR)
mark_as_advanced(NVTX_INCLUDE_DIR)
Expand Down
15 changes: 13 additions & 2 deletions common/cuda_hip/factorization/factorization_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,23 @@ void symbolic_validate(
factors_lookup.storage.get_const_data(), found.get_data(),
missing.get_data());
}
auto get_bool_identity = []() {
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000
// CUDA 13 remove thrust::identity<T>.
// Note. ::cuda::std::identity does not contain conversion like
// thrust::identity<T>. If conversion is required, we need to
// provide function for that.
return ::cuda::std::identity{};
#else
return thrust::identity<bool>{};
#endif
};
valid = thrust::all_of(thrust_policy(exec), found.get_const_data(),
found.get_const_data() + found.get_size(),
thrust::identity<bool>{}) &&
get_bool_identity()) &&
!thrust::any_of(thrust_policy(exec), missing.get_const_data(),
missing.get_const_data() + missing.get_size(),
thrust::identity<bool>{});
get_bool_identity());
}

GKO_INSTANTIATE_FOR_EACH_VALUE_AND_INDEX_TYPE(
Expand Down
11 changes: 7 additions & 4 deletions cuda/base/exception.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
//
// SPDX-License-Identifier: BSD-3-Clause

#include "ginkgo/core/base/exception.hpp"

#include <string>

#include <cuda.h>
#include <cuda_runtime.h>
#include <cublas_v2.h>
#include <cufft.h>
Expand Down Expand Up @@ -114,13 +115,15 @@ std::string CufftError::get_error(int64 error_code)
GKO_REGISTER_CUFFT_ERROR(CUFFT_SETUP_FAILED)
GKO_REGISTER_CUFFT_ERROR(CUFFT_INVALID_SIZE)
GKO_REGISTER_CUFFT_ERROR(CUFFT_UNALIGNED_DATA)
GKO_REGISTER_CUFFT_ERROR(CUFFT_INCOMPLETE_PARAMETER_LIST)
GKO_REGISTER_CUFFT_ERROR(CUFFT_INVALID_DEVICE)
GKO_REGISTER_CUFFT_ERROR(CUFFT_PARSE_ERROR)
GKO_REGISTER_CUFFT_ERROR(CUFFT_NO_WORKSPACE)
GKO_REGISTER_CUFFT_ERROR(CUFFT_NOT_IMPLEMENTED)
GKO_REGISTER_CUFFT_ERROR(CUFFT_LICENSE_ERROR)
GKO_REGISTER_CUFFT_ERROR(CUFFT_NOT_SUPPORTED)
#if CUDA_VERSION < 13000
GKO_REGISTER_CUFFT_ERROR(CUFFT_INCOMPLETE_PARAMETER_LIST)
GKO_REGISTER_CUFFT_ERROR(CUFFT_PARSE_ERROR)
GKO_REGISTER_CUFFT_ERROR(CUFFT_LICENSE_ERROR)
#endif
return "Unknown error";

#undef GKO_REGISTER_CUFFT_ERROR
Expand Down
Loading