Skip to content

processors/processing_processor_mnn_tensor.hpp

Namespaces

Name
sgns
sgns::sgprocessing
Artifact and manifest binary serialization.

Classes

Name
class sgns::sgprocessing::MNN_Tensor

Source code

#pragma once

#include <memory>
#include <vector>

#include <MNN/Interpreter.hpp>
#include "processing_processor.hpp"

namespace sgns::sgprocessing
{
    class MNN_Tensor : public ProcessingProcessor
    {
    public:
        MNN_Tensor() = default;
        ~MNN_Tensor() override = default;

        ProcessingResult StartProcessing( std::vector<std::vector<uint8_t>> &chunkhashes,
                                           const sgns::IoDeclaration         &proc,
                                           std::vector<char>                 &tensorData,
                                           std::vector<char>                 &modelFile,
                                           const std::vector<sgns::Parameter> *parameters,
                                           const ExecutionContext            &execCtx ) override;

    private:
        // Phase 13 (D-04/D-05): backend is resolved once per StartProcessing()
        // call via sgprocmanagerquant::ResolveMnnBackend() and threaded
        // through here; MNN_FORWARD_VULKAN remains the resolver's fallback.
        std::unique_ptr<MNN::Tensor> Process( const std::vector<float> &signalData,
                                               std::vector<uint8_t>    &modelFile,
                                               int                      length,
                                               MNNForwardType           backend );
    };
}

Updated on 2026-10-06 at 13:34:21 +0000