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

◆ ensure_capacity()

void MayaFlux::Yantra::HubertPhonemeModel::Impl::ensure_capacity ( size_t samples,
const std::array< uint32_t, k_feature_layers > & lengths )
inline

Definition at line 265 of file HubertPhonemeModel.cpp.

266 {
268 constexpr auto type = GpuBufferBinding::ElementType::FLOAT32;
269 const size_t frames = lengths.back();
270 context->ensure_shared_buffer(0, Audio, samples, type, BufferUsageHint::COMPUTE);
271 context->ensure_shared_buffer(0, WideA, static_cast<size_t>(k_features) * lengths[0], type, BufferUsageHint::COMPUTE);
272 context->ensure_shared_buffer(0, WideB, static_cast<size_t>(k_features) * lengths[1], type, BufferUsageHint::COMPUTE);
273 context->ensure_shared_buffer(0, Stats, 2 * std::max<size_t>(k_features, frames), type, BufferUsageHint::COMPUTE);
274 for (const uint32_t buffer : { Hidden, Positional, Query, Key, Value }) {
275 context->ensure_shared_buffer(0, buffer, k_width * frames, type, BufferUsageHint::COMPUTE);
276 }
277 context->ensure_shared_buffer(0, Scores, k_heads * frames * frames, type, BufferUsageHint::COMPUTE);
278 context->ensure_shared_buffer(0, Expanded, k_expanded * frames, type, BufferUsageHint::COMPUTE);
279 context->ensure_shared_buffer(0, Posterior, k_classes * frames, type);
280 }
BufferUsageHint
Semantic usage hint for buffer allocation and memory properties.
static constexpr DomainSpec Audio
Domain constant for Audio domain.
Definition Creator.hpp:497
enum MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType FLOAT32
std::unique_ptr< ShaderExecutionContext<> > context

References MayaFlux::Audio, context, and MayaFlux::Portal::Graphics::GpuBufferBinding::FLOAT32.

Referenced by run().

Here is the caller graph for this function: