Skip to main content

Cast Class

CVU kernel Node that casts a tensor between FP32 and BF16 (no scale/zero-point). More...

Declaration

class simaai::neat::Cast { ... }

Included Headers

#include <Cast.h>

Base classes

classNode
classOutputSpecProvider
classNodeContractProvider
classNodeContractConfigurable

Public Constructors Index

Cast (CastOptions opt={})

Construct with optional CastOptions. 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...

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 CastOptions &options () const

Inspect the Node's options. More...

Private Member Attributes Index

CastOptionsopt_

Description

CVU kernel Node that casts a tensor between FP32 and BF16 (no scale/zero-point).

Typically inserted by the route planner at the MLA boundary on the BF16 path. Application code rarely adds Cast directly — it appears via DetessCast/CastTess fusions or via planner-generated routing — but the standalone form exists for graphs that need a bare dtype conversion stage.

See Also

"The dtype contract" page in /concepts/dtype_contract

Definition at line 64 of file Cast.h.

Public Constructors

Cast()

simaai::neat::Cast::Cast (CastOptions opt={})
explicit

Construct with optional CastOptions.

Definition at line 70 of file Cast.h.

Public Member Functions

apply_compiled_contract()

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

Apply a compiled contract back into this Node.

Definition at line 92 of file Cast.h.

backend_fragment()

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

GStreamer fragment this Node emits.

Definition at line 81 of file Cast.h.

caps_behavior()

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

Whether the Node negotiates static or dynamic caps.

Definition at line 77 of file Cast.h.

77 NodeCapsBehavior caps_behavior() const override {
78 return NodeCapsBehavior::Static;
79 }

compile_node_contract()

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

Compile this Node's contract from the given input.

Definition at line 89 of file Cast.h.

contract_definition()

NodeContractDefinition simaai::neat::Cast::contract_definition ()

Structural contract definition for this Node.

Definition at line 87 of file Cast.h.

element_names()

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

Deterministic element names this Node will create.

Definition at line 83 of file Cast.h.

kind()

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

Type label for this Node kind.

Definition at line 73 of file Cast.h.

73 std::string kind() const override {
74 return "Cast";
75 }

options()

const CastOptions & simaai::neat::Cast::options ()
inline

Inspect the Node's options.

Definition at line 95 of file Cast.h.

95 const CastOptions& options() const {
96 return opt_;
97 }

output_spec()

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

Negotiated downstream caps produced by this Node.

Definition at line 85 of file Cast.h.

Private Member Attributes

opt_

CastOptions simaai::neat::Cast::opt_

Definition at line 100 of file Cast.h.

100 CastOptions opt_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.