[cub] Replace assert with CHECK or REQUIRE in tests#8999
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughSummary by CodeRabbit
important: Walkthrough Eight CUDA test files convert C important: Changes Catch2 assertion framework migration
important: Possibly related PRs
important: Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0274cd35-7d0c-401a-865f-079699d7dda5
📒 Files selected for processing (8)
cub/test/catch2_test_block_load_to_shared.cucub/test/catch2_test_block_radix_sort_custom.cucub/test/catch2_test_device_decoupled_look_back.cucub/test/catch2_test_device_segmented_scan.cucub/test/catch2_test_warp_scan.cucub/test/catch2_test_warp_scan_api.cucub/test/catch2_test_warp_scan_partial_helper.cuhcub/test/internal/catch2_test_integer_utils.cu
f6b8406 to
329af26
Compare
| @@ -1,142 +0,0 @@ | |||
| // SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
| // SPDX-License-Identifier: BSD-3-Clause | |||
| #include <cub/detail/integer_utils.cuh> | |||
There was a problem hiding this comment.
I've removed the source file & test. The functionality is not used anywhere in cub, plus it was never actually tested, because the assert expanded to noop instead of the test due to missing #undef NDEBUG
😬 CI Workflow Results🟥 Finished in 1h 27m: Pass: 14%/283 | Total: 1d 12h | Max: 1h 26m | Hits: 65%/117550See results here. |
Using
assertoutside of libcu++ for testing is not safe, because we compile with optimizations enabled and that meanstNDEBUGis defined, thusassertexpands to noop. This PR replaces them with catch2 test macros.