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

◆ softmax_stage()

DependencyStage MayaFlux::Yantra::TensorKernels::softmax_stage ( uint64_t data,
uint32_t outer,
uint32_t extent,
uint32_t inner )
inlinenodiscard

One nn_softmax dispatch: softmax of a tensor [outer, extent, inner] along extent, in place.

Exceptions
std::invalid_argumentWhen an extent is 0.

Definition at line 228 of file Stages.hpp.

229{
230 if (outer == 0 || extent == 0 || inner == 0) {
231 detail::refuse("Softmax needs an outer, a normalised and an inner extent of at least 1");
232 }
233 const SoftmaxPC pc { .data = data, .outer = outer, .extent = extent, .inner = inner, .reserved = 0 };
234 return detail::make_grid_stage(softmax_shader, pc, static_cast<size_t>(outer) * inner);
235}
void refuse(std::string_view message)
Definition Layers.hpp:74
DependencyStage make_grid_stage(const char *shader, const PC &pc, size_t invocations)
Definition Stages.hpp:38
constexpr const char * softmax_shader
Definition Layouts.hpp:31

References MayaFlux::Yantra::TensorKernels::detail::make_grid_stage(), MayaFlux::Yantra::TensorKernels::detail::refuse(), and softmax_shader.

Referenced by MayaFlux::Yantra::HubertPhonemeModel::Impl::run().

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