MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ make_grid_stage()

template<typename PC>
DependencyStage MayaFlux::Yantra::TensorKernels::detail::make_grid_stage ( const char * shader,
const PC & pc,
size_t invocations )
nodiscard

Definition at line 38 of file Stages.hpp.

39 {
40 return DependencyStage {
41 .config = GpuComputeConfig { .shader_path = shader, .workgroup_size = { element_workgroup, 1, 1 }, .push_constant_size = sizeof(PC) },
42 .stage_fn = [pc](GpuDispatchCore& core) { core.set_push_constants(pc); },
43 .explicit_groups = group_grid(invocations, element_workgroup),
44 };
45 }
Non-template base that owns all type-independent GPU dispatch logic.
std::array< uint32_t, 3 > group_grid(size_t invocations, uint32_t local)
Workgroup counts covering the invocations, along x up to max_groups_per_axis and then along y.
Definition Stages.hpp:30
constexpr uint32_t element_workgroup
Invocations per workgroup of the element-wise kernels.
Definition Layouts.hpp:15
Plain-data description of the compute shader to dispatch.
One stage in a record_stages call.

References MayaFlux::Yantra::TensorKernels::element_workgroup, and group_grid().

Referenced by MayaFlux::Yantra::TensorKernels::add_stage(), MayaFlux::Yantra::TensorKernels::attention_mix_stage(), MayaFlux::Yantra::TensorKernels::attention_scores_stage(), MayaFlux::Yantra::TensorKernels::conv1d_stage(), MayaFlux::Yantra::TensorKernels::grouped_conv1d_stage(), MayaFlux::Yantra::TensorKernels::normalize_apply_stage(), MayaFlux::Yantra::TensorKernels::normalize_stats_stage(), and MayaFlux::Yantra::TensorKernels::softmax_stage().

Here is the call graph for this function:
Here is the caller graph for this function: