Repository navigation
Env passthrough 4/4 - #9065
Env passthrough 4/4#9065
Conversation
…nt is actually regarded
|
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 (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR refines CUB device APIs across histogram, merge sort, scan, and segmented scan: tightening SFINAE constraints on exclusive/inclusive scan env overloads to improve overload resolution, shifting all environment tests from wrapped env to direct ChangesEnvironment API Pattern and Constraint Refinements
Non-Environment and Updated Environment Test Coverage
Assessment against linked issues
Out-of-scope changes
suggestion: The PR successfully implements environment parameter pattern unification (stream_ref direct passing) across histogram, scan, and scan-by-key env tests, but review should verify that important: The SFINAE constraints on important: Segmented scan env tests switched from Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
cub/test/catch2_test_device_histogram_api.cu (1)
17-123: ⚡ Quick winsuggestion: Capture the return value of each
cub::DeviceHistogram::*query call and assertcudaSuccess(orREQUIRE(status == cudaSuccess)). Right now Lines 17-123 ignore status, so these tests can pass even if the API dispatch/query path fails.As per coding guidelines:
cub/**/*: Focus on algorithm correctness, temporary-storage protocol, dispatch/policy selection, stream behavior, CUDA error handling, synchronization, memory access safety, performance regressions, and test coverage.cub/test/catch2_test_device_merge_sort_api.cu (1)
15-75: ⚡ Quick winsuggestion: Store and assert the
cudaError_tfrom eachcub::DeviceMergeSort::*invocation. Lines 15-75 currently drop status codes, which weakens these tests to compile-only coverage instead of validating runtime API query success.As per coding guidelines:
cub/**/*: Focus on algorithm correctness, temporary-storage protocol, dispatch/policy selection, stream behavior, CUDA error handling, synchronization, memory access safety, performance regressions, and test coverage.cub/test/catch2_test_device_scan_api.cu (1)
42-168: ⚡ Quick winsuggestion: Add
cudaError_t status = ...; REQUIRE(status == cudaSuccess);for each newly added non-envcub::DeviceScan::*call in Lines 42-168. Ignoring statuses here makes failures on overload resolution/dispatch path invisible to the test suite.As per coding guidelines:
cub/**/*: Focus on algorithm correctness, temporary-storage protocol, dispatch/policy selection, stream behavior, CUDA error handling, synchronization, memory access safety, performance regressions, and test coverage.cub/test/catch2_test_device_segmented_scan_api.cu (1)
417-576: ⚡ Quick winsuggestion: Capture and assert the return status for each non-env
cub::DeviceSegmentedScan::*call. Lines 417-576 currently ignorecudaError_t, so runtime query-path regressions won’t fail these tests.As per coding guidelines:
cub/**/*: Focus on algorithm correctness, temporary-storage protocol, dispatch/policy selection, stream behavior, CUDA error handling, synchronization, memory access safety, performance regressions, and test coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a533ea8a-ba38-483e-96aa-e0f6bda0f087
📒 Files selected for processing (13)
cub/cub/device/device_histogram.cuhcub/cub/device/device_merge_sort.cuhcub/cub/device/device_scan.cuhcub/cub/device/device_segmented_scan.cuhcub/test/catch2_test_device_histogram_api.cucub/test/catch2_test_device_histogram_env_api.cucub/test/catch2_test_device_merge_sort_api.cucub/test/catch2_test_device_merge_sort_env_api.cucub/test/catch2_test_device_scan_api.cucub/test/catch2_test_device_scan_by_key_env_api.cucub/test/catch2_test_device_scan_env_api.cucub/test/catch2_test_device_segmented_scan_api.cucub/test/catch2_test_device_segmented_scan_env_api.cu
💤 Files with no reviewable changes (1)
- cub/cub/device/device_merge_sort.cuh
This comment has been minimized.
This comment has been minimized.
🥳 CI Workflow Results🟩 Finished in 2h 25m: Pass: 100%/283 | Total: 11d 02h | Max: 2h 25m | Hits: 21%/904039See results here. |
| C2H_TEST("cub::DeviceHistogram::HistogramEven non-env overload is not ambiguous", "[histogram][device]") | ||
| { | ||
| thrust::device_vector<int> samples(1); | ||
| thrust::device_vector<int> histogram(1); | ||
| size_t temp_storage_bytes = 0; | ||
| cub::DeviceHistogram::HistogramEven( | ||
| nullptr, temp_storage_bytes, samples.begin(), thrust::raw_pointer_cast(histogram.data()), 2, 0, 10, 1); | ||
| } |
There was a problem hiding this comment.
May need to be revisited depending on the outcome of #9078
|
Successfully created backport PR for |
closes #8175
examines
DeviceMergeSortDeviceHistogramDeviceScanDeviceSegmentedScanambiguities found. important to backport.
DeviceTopKis still open so we cannot examine it here in order not to create conflicts.