Repository navigation
[CUB] Refactor DeviceAdjacentDifference::SubtractRight to always take an environment - #9419
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
18e8403 to
8cfab18
Compare
8cfab18 to
c000627
Compare
|
|
||
| c2h::host_vector<type> h_in = in; | ||
| c2h::host_vector<type> reference(num_items); | ||
| std::adjacent_difference(h_in.begin(), h_in.end(), reference.begin(), ref_diff<type>{}); |
There was a problem hiding this comment.
The use of cuda::std:: would be generally encouraged. There was a time, where we didn't have our own STL implementation, so we used the host stdlib to compare with.
There was a problem hiding this comment.
I really do not want to change the tests at all
I basically copy and paste the existing tests and if there are changed to be made those should be made consistently in a follow up
| auto error = cub::DeviceAdjacentDifference::SubtractRight( | ||
| static_cast<void*>(nullptr), expected_allocation_size, in.begin(), num_items, cuda::std::minus<>{}); | ||
| REQUIRE(error == cudaSuccess); |
There was a problem hiding this comment.
Not a fan, this is move expressive
| REQUIRE(cudaSuccess == cudaPeekAtLastError()); | ||
| REQUIRE(cudaSuccess == cudaDeviceSynchronize()); |
c000627 to
9ade375
Compare
9ade375 to
0dcfcac
Compare
This comment has been minimized.
This comment has been minimized.
0dcfcac to
657a73c
Compare
This comment has been minimized.
This comment has been minimized.
657a73c to
187b964
Compare
This comment has been minimized.
This comment has been minimized.
187b964 to
72b06a4
Compare
72b06a4 to
1150ed2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
03e9cb8 to
636dfb3
Compare
636dfb3 to
8a97bee
Compare
This comment has been minimized.
This comment has been minimized.
8a97bee to
4ac6311
Compare
This comment has been minimized.
This comment has been minimized.
4ac6311 to
126a60c
Compare
5485479 to
6b55427
Compare
This comment has been minimized.
This comment has been minimized.
…ke an environment We want to be able to pass tunings to the APIs that take user provided memory.
6b55427 to
613ffed
Compare
Summary
Walkthrough
ChangesDeviceAdjacentDifference right-variant env dispatch migration
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cub/test/catch2_test_device_adjacent_difference_substract_right.cu (1)
172-182: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Add one explicit custom-tuning/policy-selector environment case for these user-provided-memory overloads. The current sections cover stream-shaped environments, but they do not prove that
dispatch_with_env_and_tuningactually forwards a tuning fromEnvT, which is the PR’s stated behavior change. As per path instructions, focus on dispatch/policy selection and test coverage.Also applies to: 283-293
Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8f144539-eb7e-4dd8-9754-5470a542d42e
📒 Files selected for processing (2)
cub/cub/device/device_adjacent_difference.cuhcub/test/catch2_test_device_adjacent_difference_substract_right.cu
|
/ok to test |
@miscco, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
|
/ok to test 613ffed |
🥳 CI Workflow Results🟩 Finished in 1h 25m: Pass: 100%/287 | Total: 3d 16h | Max: 58m 34s | Hits: 64%/332942See results here. |
Description
closes
Checklist