Added 20 missing tuning headers (was 6, now 26):
P1: radix_sort, reduce_by_key, scan_by_key, select_if, histogram,
merge, merge_sort, unique_by_key, batched_topk, transform_tile
P2: segmented_reduce, segmented_scan, segmented_sort,
segmented_radix_sort, three_way_partition, rle_encode,
rle_non_trivial_runs
P3: adjacent_difference, find, find_bound_sorted_values
Updated muh.cuh to include all 26 headers (v0.2.0).
All headers compile clean (g++ -std=c++17), compile_test passes 17/17.
gen_patch.py reads bi100_* structs from all 26 files.
Coverage: muh now has a tuning header for every CCCL tuning_*.cuh file.
37 lines
941 B
Plaintext
37 lines
941 B
Plaintext
// muh/include/muh/tuning/tuning_segmented_scan.cuh — BI-V100 segmented_scan tuning
|
||
//
|
||
// Mirrors: cccl_upstream/cub/cub/device/dispatch/tuning/tuning_segmented_scan.cuh
|
||
// vllm impact: per-segment prefix scan
|
||
// Competition weight: Input TPS × 2.799
|
||
|
||
#pragma once
|
||
|
||
#include "muh/hardware.cuh"
|
||
#include "muh/tuning/common.cuh"
|
||
|
||
namespace muh::tuning::segmented_scan {
|
||
|
||
struct SegmentedScanPolicy {
|
||
int threads_per_block;
|
||
int items_per_thread;
|
||
};
|
||
|
||
struct bi100_default {
|
||
static constexpr int threads = 128;
|
||
static constexpr int items = 9;
|
||
};
|
||
|
||
struct policy_selector {
|
||
int accum_size;
|
||
|
||
constexpr SegmentedScanPolicy operator()(const hardware_capability& hw) const {
|
||
if (hw.at_least(hardware_capability::vendor_t::iluvatar, 100)) {
|
||
return {bi100_default::threads, bi100_default::items};
|
||
}
|
||
// Fallback
|
||
return {bi100_default::threads, bi100_default::items};
|
||
}
|
||
};
|
||
|
||
} // namespace muh::tuning::segmented_scan
|