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

◆ Impl()

MayaFlux::Yantra::SileroVadModel::Impl::Impl ( TensorKernels::PackedWeights packed,
std::shared_ptr< GpuDispatchRecorder > shared )
inline

Definition at line 89 of file SileroVadModel.cpp.

90 : recording(shared ? std::move(shared) : std::make_shared<GpuDispatchRecorder>(true))
91 , context(std::make_unique<ShaderExecutionContext<>>(
92 GpuComputeConfig { .shader_path = TensorKernels::frame_audio_shader, .workgroup_size = { TensorKernels::element_workgroup, 1, 1 }, .push_constant_size = sizeof(TensorKernels::FrameAudioPC) }))
93 , tail(context_samples, 0.0F)
94 {
95 context->set_recording(recording);
96 if (!context->ensure_gpu_ready()) {
98 std::source_location::current(), "SileroVadModel needs a graphics device and none is available");
99 }
100 TensorKernels::upload_packed_weights(*context, 0, Weights, packed);
101 packed.values = std::vector<float> {};
102 layout = std::move(packed);
103
105 clear_state();
106 }
static constexpr uint32_t context_samples
@ ComputeMatrix
Compute operations (Yantra - algorithms, matrices, DSP).
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.
@ COMPUTE
Storage buffer for compute shaders (device-local).
constexpr const char * frame_audio_shader
Definition Layouts.hpp:23
constexpr uint32_t element_workgroup
Invocations per workgroup of the element-wise kernels.
Definition Layouts.hpp:15
void upload_packed_weights(GpuDispatchCore &context, uint32_t set, size_t binding, const PackedWeights &packed)
Allocate a shared buffer on a context and fill it with packed weights.
Portal::Graphics::GpuComputeConfig GpuComputeConfig
enum MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType FLOAT32
std::shared_ptr< GpuDispatchRecorder > recording
std::unique_ptr< ShaderExecutionContext<> > context
TensorKernels::PackedWeights layout

References context, MayaFlux::Yantra::TensorKernels::element_workgroup, and recording.