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

◆ normalize_stats_stage()

DependencyStage MayaFlux::Yantra::TensorKernels::normalize_stats_stage ( uint64_t src,
uint64_t stats,
uint32_t outer,
uint32_t extent,
uint32_t inner,
float epsilon )
inlinenodiscard

The nn_normalize dispatch that measures every row of a tensor [outer, extent, inner] along extent.

Writes the mean and 1 / sqrt(variance + epsilon) of each (outer, inner) row to stats, two floats per row. The variance is the mean squared deviation. Follow it with normalize_apply_stage.

Parameters
srcDevice address of the tensor.
statsDevice address of the row measures, 2 * outer * inner floats.
Exceptions
std::invalid_argumentWhen an extent is 0.

Definition at line 152 of file Stages.hpp.

154{
155 if (outer == 0 || extent == 0 || inner == 0) {
156 detail::refuse("Normalize needs an outer, a normalised and an inner extent of at least 1");
157 }
158 const NormalizePC pc { .src = src, .stats = stats, .weight = 0, .bias = 0, .dst = 0,
159 .outer = outer, .extent = extent, .inner = inner, .epsilon = epsilon, .flags = 0, .reserved = 0 };
160 return detail::make_grid_stage(normalize_shader, pc, static_cast<size_t>(outer) * inner);
161}
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 * normalize_shader
Definition Layouts.hpp:28

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

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

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