Repository navigation
Deprecate DispatchScan and AgentScanPolicy - #9234
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 (10)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (8)
OverviewThis follow-up PR deprecates the DispatchScan dispatcher and reorganizes the scan launch path to use new internal detail::scan helpers and a new internal agent_scan_policy. It is intended to be merged after PR Key Changes
Public/API impact
Review notes and effort estimate
WalkthroughThis PR adds cub::detail::agent_scan_policy, deprecates AgentScanPolicy and DispatchScan, refactors DispatchScan launch logic into detail::scan helpers (warpspeed/lookback paths and SMEM checks), updates kernels and tuning wiring to use agent_scan_policy, and suppresses DispatchScan deprecation in tests. Changesagent_scan_policy migration and DispatchScan refactoring
Possibly related PRs
Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cub/cub/detail/delay_constructor.cuh (1)
22-34:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftimportant:
LookbackDelayAlgorithm::__reduce_by_keyis now a public enumerator, so downstream code can spell an implementation-only mode directly and you effectively commit it as part of the public API. The internal reduce-by-key path is already representable throughdetail::lookback_delay_policy_from_typeanddefault_reduce_by_key_delay_constructor_policy, so this mode should stay internal instead of being publicly constructible viaLookbackDelayPolicy.Also applies to: 132-195, 206-217
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0ea531cc-5946-4649-94c5-4da9e6d96d21
📒 Files selected for processing (32)
c/parallel/src/radix_sort.cuc/parallel/src/scan.cuc/parallel/src/unique_by_key.cucub/benchmarks/bench/copy/memcpy.cucub/benchmarks/bench/scan/policy_selector.hcub/cub/detail/delay_constructor.cuhcub/cub/device/device_scan.cuhcub/cub/device/dispatch/dispatch_radix_sort.cuhcub/cub/device/dispatch/dispatch_rle.cuhcub/cub/device/dispatch/dispatch_scan.cuhcub/cub/device/dispatch/dispatch_scan_by_key.cuhcub/cub/device/dispatch/dispatch_select_if.cuhcub/cub/device/dispatch/dispatch_three_way_partition.cuhcub/cub/device/dispatch/kernels/kernel_radix_sort.cuhcub/cub/device/dispatch/kernels/kernel_scan.cuhcub/cub/device/dispatch/kernels/kernel_scan_warpspeed.cuhcub/cub/device/dispatch/tuning/tuning_batch_memcpy.cuhcub/cub/device/dispatch/tuning/tuning_radix_sort.cuhcub/cub/device/dispatch/tuning/tuning_reduce_by_key.cuhcub/cub/device/dispatch/tuning/tuning_rle_encode.cuhcub/cub/device/dispatch/tuning/tuning_rle_non_trivial_runs.cuhcub/cub/device/dispatch/tuning/tuning_scan.cuhcub/cub/device/dispatch/tuning/tuning_scan_by_key.cuhcub/cub/device/dispatch/tuning/tuning_select_if.cuhcub/cub/device/dispatch/tuning/tuning_three_way_partition.cuhcub/cub/device/dispatch/tuning/tuning_unique_by_key.cuhcub/test/catch2_test_device_partition_env.cucub/test/catch2_test_device_scan_custom_policy_hub.cucub/test/catch2_test_device_scan_env.cucub/test/catch2_test_device_scan_env_api.cunvbench_helper/nvbench_helper/look_back_helper.cuhthrust/testing/scan.cu
This comment has been minimized.
This comment has been minimized.
66baecd to
aa56305
Compare
DispatchScanDispatchScan and AgentScanPolicy
This comment has been minimized.
This comment has been minimized.
aa56305 to
9227ed4
Compare
This comment has been minimized.
This comment has been minimized.
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: 1d3e04aa-bc29-4c53-ab3d-e7cbdad66a06
📒 Files selected for processing (10)
cub/cub/agent/agent_scan.cuhcub/cub/device/dispatch/dispatch_scan.cuhcub/cub/device/dispatch/dispatch_scan_by_key.cuhcub/cub/device/dispatch/kernels/kernel_radix_sort.cuhcub/cub/device/dispatch/kernels/kernel_scan.cuhcub/cub/device/dispatch/tuning/tuning_radix_sort.cuhcub/cub/device/dispatch/tuning/tuning_scan.cuhcub/test/catch2_test_device_radix_sort_custom_policy_hub.cucub/test/catch2_test_device_scan_custom_policy_hub.cucub/test/catch2_test_device_segmented_radix_sort_custom_policy_hub.cu
✅ Files skipped from review due to trivial changes (2)
- cub/cub/device/dispatch/dispatch_scan_by_key.cuh
- cub/test/catch2_test_device_scan_custom_policy_hub.cu
🚧 Files skipped from review as they are similar to previous changes (5)
- cub/cub/device/dispatch/kernels/kernel_radix_sort.cuh
- cub/test/catch2_test_device_segmented_radix_sort_custom_policy_hub.cu
- cub/cub/device/dispatch/tuning/tuning_scan.cuh
- cub/cub/device/dispatch/tuning/tuning_radix_sort.cuh
- cub/test/catch2_test_device_radix_sort_custom_policy_hub.cu
This comment has been minimized.
This comment has been minimized.
38a8ee1 to
2551f31
Compare
🥳 CI Workflow Results🟩 Finished in 2h 26m: Pass: 100%/287 | Total: 11d 18h | Max: 2h 23m | Hits: 18%/996799See results here. |
| KernelSource kernel_source, | ||
| KernelLauncherFactory launcher_factory) | ||
| { | ||
| const bool dependent_launch = cc >= ::cuda::compute_capability{9, 0}; |
There was a problem hiding this comment.
Question: the old dispatch scan path set ptx_version to -1 so that PDL was disabled. Is this change intentional?
There was a problem hiding this comment.
Oh, I didn't notice. That was definitely a performance bug then, which is addresses by this PR as a drive-by.
This is a follow-up to #8853 to keep that PR a bit shorter.
cub::DeviceScan#8853