[muh] add tuning_find_bound_sorted_values.cuh: BI-V100 tuning header for find_bound_sorted_values
Translated from CCCL cub/device/dispatch/tuning/tuning_find_bound_sorted_values.cuh. Uses hardware_capability dispatch instead of compute_capability.
This commit is contained in:
33
muh/include/muh/tuning/tuning_find_bound_sorted_values.cuh
Normal file
33
muh/include/muh/tuning/tuning_find_bound_sorted_values.cuh
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
// muh/include/muh/tuning/tuning_find_bound_sorted_values.cuh — BI-V100
|
||||||
|
//
|
||||||
|
// Mirrors: cccl_upstream/cub/cub/device/dispatch/tuning/tuning_find_bound_sorted_values.cuh
|
||||||
|
// CCCL: threads=256, items=8, binary search per thread
|
||||||
|
//
|
||||||
|
// vllm relevance: block_table index lookup in paged attention
|
||||||
|
// SMEM risk: minimal (binary search, no tile)
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "muh/hardware.cuh"
|
||||||
|
#include "muh/tuning/common.cuh"
|
||||||
|
|
||||||
|
namespace muh::tuning::find_bound {
|
||||||
|
|
||||||
|
struct FindBoundPolicy {
|
||||||
|
int threads_per_block;
|
||||||
|
int items_per_thread;
|
||||||
|
CacheLoadModifier haystack_load_modifier;
|
||||||
|
CacheLoadModifier needles_load_modifier;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct policy_selector {
|
||||||
|
int haystack_type_size;
|
||||||
|
int needle_type_size;
|
||||||
|
|
||||||
|
constexpr FindBoundPolicy operator()(const hardware_capability& /*hw*/) const {
|
||||||
|
// CCCL: fixed policy for all architectures
|
||||||
|
return {256, 8, LOAD_LDG, LOAD_LDG};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace muh::tuning::find_bound
|
||||||
Reference in New Issue
Block a user