Deallocation should be noexcept#1416
Conversation
| 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"); } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Can you capture this in an issue?
|
/merge |
A follow-up fix for #1416 Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Divye Gala (https://github.com/divyegala) URL: #1417
Update for compatibility with rapidsai/rmm#2077. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1416
A follow-up fix for rapidsai#1416 Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1417
Update for compatibility with rapidsai/rmm#2077. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1416
A follow-up fix for rapidsai#1416 Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1417
Update for compatibility with rapidsai/rmm#2077. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1416
A follow-up fix for rapidsai#1416 Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Divye Gala (https://github.com/divyegala) URL: rapidsai#1417
Update for compatibility with rapidsai/rmm#2077.