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
4 changes: 2 additions & 2 deletions cpp/bench/ann/src/common/cuda_huge_page_resource.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -79,7 +79,7 @@ class cuda_huge_page_resource final : public rmm::mr::device_memory_resource {
*
* @param p Pointer to be deallocated
*/
void do_deallocate(void* ptr, std::size_t size, rmm::cuda_stream_view) override
void do_deallocate(void* ptr, std::size_t size, rmm::cuda_stream_view) noexcept override
{
if (munmap(ptr, size) == -1) { RAFT_FAIL("huge_page_resource::munmap"); }
Copy link
Copy Markdown
Contributor Author

@bdice bdice Oct 9, 2025

Choose a reason for hiding this comment

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

This function must be made noexcept. Throwing in noexcept code forces std::terminate, so this RAFT_FAIL will trigger that. I don't know if this error message will be displayed, but my suspicion is that it won't show up. The right solution is probably to adopt a macro that outputs to std::cerr before throwing/terminating rather than relying on the C++ exception message to show? We have had to do similar tricks with RMM_ASSERT_CUDA_SUCCESS because it can't throw in noexcept functions.

Since this fix is probably necessary to unblock builds (and I need to file similar fixes for other repos), I am leaving this as a follow-up task for the cuVS team to handle whichever way they prefer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you capture this in an issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

}
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/ann/src/common/cuda_pinned_resource.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -73,7 +73,7 @@ class cuda_pinned_resource final : public rmm::mr::device_memory_resource {
*
* @param p Pointer to be deallocated
*/
void do_deallocate(void* ptr, std::size_t, rmm::cuda_stream_view) override
void do_deallocate(void* ptr, std::size_t, rmm::cuda_stream_view) noexcept override
{
RMM_ASSERT_CUDA_SUCCESS(cudaFreeHost(ptr));
}
Expand Down