Skip to main content

Preproc Class

Fused CVU preprocessing Node — resize + color-convert + normalize (+ optional tess). More...

Declaration

class simaai::neat::Preproc { ... }

Included Headers

#include <Preproc.h>

Base classes

classNode
classOutputSpecProvider
classInputContractConfigurable
classNodeContractProvider
classNodeContractConfigurable

Public Constructors Index

Preproc (PreprocOptions opt={})

Construct with optional PreprocOptions. More...

Public Member Functions Index

std::stringkind () const override

Type label for this Node kind. More...

NodeCapsBehaviorcaps_behavior () const override

Whether the Node negotiates static or dynamic caps. More...

std::stringbackend_fragment (int node_index) const override

GStreamer fragment this Node emits. More...

std::vector< std::string >element_names (int node_index) const override

Deterministic element names this Node will create. More...

OutputSpecoutput_spec (const OutputSpec &input) const override

Negotiated downstream caps produced by this Node. More...

voidapply_input_contract (const InputContract &contract, std::string *err) override

Apply an input contract from upstream. More...

NodeContractDefinitioncontract_definition () const override

Structural contract definition for this Node. More...

boolcompile_node_contract (const ContractCompileInput &input, CompiledNodeContract *out, std::string *err) const override

Compile this Node's contract from the given input. More...

voidapply_compiled_contract (const CompiledNodeContract &contract, std::string *err) override

Apply a compiled contract back into this Node. More...

const PreprocOptions &options () const

Inspect the Node's options. More...

const std::string &config_path () const

Path to the kernel config JSON, if one was loaded from disk. More...

const std::string &config_snapshot_path () const

Path to the snapshotted config JSON written during compilation. More...

const nlohmann::json *config_json () const

Resolved kernel config JSON, or null if no config was supplied/loaded. More...

Private Member Functions Index

voidmaterialize_config_from_input_contract (const InputContract &contract)

Private Member Attributes Index

PreprocOptionsopt_
std::shared_ptr< PreprocConfigHolder >config_holder_
std::stringconfig_path_

Description

Fused CVU preprocessing Node — resize + color-convert + normalize (+ optional tess).

Implements the "Preproc" PreprocessGraphFamily. Place upstream of the MLA on the BF16 input path; pair with Quant/QuantTess instead when the model expects INT8 input.

Definition at line 193 of file Preproc.h.

Public Constructors

Preproc()

simaai::neat::Preproc::Preproc (PreprocOptions opt={})
explicit

Construct with optional PreprocOptions.

Definition at line 200 of file Preproc.h.

Public Member Functions

apply_compiled_contract()

void simaai::neat::Preproc::apply_compiled_contract (const CompiledNodeContract & contract, std::string * err)

Apply a compiled contract back into this Node.

Definition at line 224 of file Preproc.h.

apply_input_contract()

void simaai::neat::Preproc::apply_input_contract (const InputContract & contract, std::string * err)

Apply an input contract from upstream.

Definition at line 217 of file Preproc.h.

backend_fragment()

std::string simaai::neat::Preproc::backend_fragment (int node_index)

GStreamer fragment this Node emits.

Definition at line 211 of file Preproc.h.

caps_behavior()

NodeCapsBehavior simaai::neat::Preproc::caps_behavior ()
inline

Whether the Node negotiates static or dynamic caps.

Definition at line 207 of file Preproc.h.

207 NodeCapsBehavior caps_behavior() const override {
208 return NodeCapsBehavior::Static;
209 }

compile_node_contract()

bool simaai::neat::Preproc::compile_node_contract (const ContractCompileInput & input, CompiledNodeContract * out, std::string * err)

Compile this Node's contract from the given input.

Definition at line 221 of file Preproc.h.

config_json()

const nlohmann::json * simaai::neat::Preproc::config_json ()

Resolved kernel config JSON, or null if no config was supplied/loaded.

Definition at line 239 of file Preproc.h.

config_path()

const std::string & simaai::neat::Preproc::config_path ()
inline

Path to the kernel config JSON, if one was loaded from disk.

Definition at line 231 of file Preproc.h.

231 const std::string& config_path() const {
232 return config_path_;
233 }

config_snapshot_path()

const std::string & simaai::neat::Preproc::config_snapshot_path ()
inline

Path to the snapshotted config JSON written during compilation.

Definition at line 235 of file Preproc.h.

235 const std::string& config_snapshot_path() const {
236 return config_path_;
237 }

contract_definition()

NodeContractDefinition simaai::neat::Preproc::contract_definition ()

Structural contract definition for this Node.

Definition at line 219 of file Preproc.h.

element_names()

std::vector< std::string > simaai::neat::Preproc::element_names (int node_index)

Deterministic element names this Node will create.

Definition at line 213 of file Preproc.h.

kind()

std::string simaai::neat::Preproc::kind ()
inline

Type label for this Node kind.

Definition at line 203 of file Preproc.h.

203 std::string kind() const override {
204 return "Preproc";
205 }

options()

const PreprocOptions & simaai::neat::Preproc::options ()
inline

Inspect the Node's options.

Definition at line 227 of file Preproc.h.

227 const PreprocOptions& options() const {
228 return opt_;
229 }

output_spec()

OutputSpec simaai::neat::Preproc::output_spec (const OutputSpec & input)

Negotiated downstream caps produced by this Node.

Definition at line 215 of file Preproc.h.

Private Member Functions

materialize_config_from_input_contract()

void simaai::neat::Preproc::materialize_config_from_input_contract (const InputContract & contract)

Definition at line 244 of file Preproc.h.

Private Member Attributes

config_holder_

std::shared_ptr<PreprocConfigHolder> simaai::neat::Preproc::config_holder_

Definition at line 246 of file Preproc.h.

246 std::shared_ptr<PreprocConfigHolder> config_holder_;

config_path_

std::string simaai::neat::Preproc::config_path_

Definition at line 247 of file Preproc.h.

247 std::string config_path_;

opt_

PreprocOptions simaai::neat::Preproc::opt_

Definition at line 245 of file Preproc.h.

245 PreprocOptions opt_;

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.