rustnn C and C++ API
WebNN graph construction and execution
Loading...
Searching...
No Matches
rustnn::MLGraphBuilder Class Reference

Records and validates graph operations. More...

#include <rustnn.hpp>

Public Member Functions

 MLGraphBuilder ()
 MLGraphBuilder (MLContext &context)
 ~MLGraphBuilder ()
 MLGraphBuilder (const MLGraphBuilder &)=delete
MLGraphBuilder & operator= (const MLGraphBuilder &)=delete
 MLGraphBuilder (MLGraphBuilder &&other) noexcept
MLGraphBuilder & operator= (MLGraphBuilder &&other) noexcept
MLOperand input (const std::string &name, const MLOperandDescriptor &descriptor)
 Declare a named graph input with the supplied type and shape.
template<typename T>
MLOperand constant (const MLOperandDescriptor &descriptor, const std::vector< T > &data)
 Copy constant data into the graph; T must match the descriptor's storage.
MLOperand unary (RustnnUnaryOperation operation, const MLOperand &input)
MLOperand unary (RustnnUnaryOperation operation, const MLOperand &input, const MLOperatorOptions &options)
MLOperand binary (RustnnBinaryOperation operation, const MLOperand &lhs, const MLOperand &rhs)
MLOperand binary (RustnnBinaryOperation operation, const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand add (const MLOperand &lhs, const MLOperand &rhs)
MLOperand add (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand subtract (const MLOperand &lhs, const MLOperand &rhs)
MLOperand subtract (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand multiply (const MLOperand &lhs, const MLOperand &rhs)
MLOperand multiply (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand divide (const MLOperand &lhs, const MLOperand &rhs)
MLOperand divide (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand power (const MLOperand &lhs, const MLOperand &rhs)
MLOperand power (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand maximum (const MLOperand &lhs, const MLOperand &rhs)
MLOperand maximum (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand minimum (const MLOperand &lhs, const MLOperand &rhs)
MLOperand minimum (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand equal (const MLOperand &lhs, const MLOperand &rhs)
MLOperand equal (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand greater (const MLOperand &lhs, const MLOperand &rhs)
MLOperand greater (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand greaterOrEqual (const MLOperand &lhs, const MLOperand &rhs)
MLOperand greaterOrEqual (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand lesser (const MLOperand &lhs, const MLOperand &rhs)
MLOperand lesser (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand lesserOrEqual (const MLOperand &lhs, const MLOperand &rhs)
MLOperand lesserOrEqual (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand notEqual (const MLOperand &lhs, const MLOperand &rhs)
MLOperand notEqual (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand logicalAnd (const MLOperand &lhs, const MLOperand &rhs)
MLOperand logicalAnd (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand logicalOr (const MLOperand &lhs, const MLOperand &rhs)
MLOperand logicalOr (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand logicalXor (const MLOperand &lhs, const MLOperand &rhs)
MLOperand logicalXor (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand matmul (const MLOperand &lhs, const MLOperand &rhs)
MLOperand matmul (const MLOperand &lhs, const MLOperand &rhs, const MLOperatorOptions &options)
MLOperand abs (const MLOperand &input)
MLOperand abs (const MLOperand &input, const MLOperatorOptions &options)
MLOperand roundEven (const MLOperand &input)
MLOperand roundEven (const MLOperand &input, const MLOperatorOptions &options)
MLOperand ceil (const MLOperand &input)
MLOperand ceil (const MLOperand &input, const MLOperatorOptions &options)
MLOperand cos (const MLOperand &input)
MLOperand cos (const MLOperand &input, const MLOperatorOptions &options)
MLOperand exp (const MLOperand &input)
MLOperand exp (const MLOperand &input, const MLOperatorOptions &options)
MLOperand floor (const MLOperand &input)
MLOperand floor (const MLOperand &input, const MLOperatorOptions &options)
MLOperand gelu (const MLOperand &input)
MLOperand gelu (const MLOperand &input, const MLOperatorOptions &options)
MLOperand log (const MLOperand &input)
MLOperand log (const MLOperand &input, const MLOperatorOptions &options)
MLOperand negate (const MLOperand &input)
MLOperand negate (const MLOperand &input, const MLOperatorOptions &options)
MLOperand relu (const MLOperand &input)
MLOperand relu (const MLOperand &input, const MLOperatorOptions &options)
MLOperand sigmoid (const MLOperand &input)
MLOperand sigmoid (const MLOperand &input, const MLOperatorOptions &options)
MLOperand sin (const MLOperand &input)
MLOperand sin (const MLOperand &input, const MLOperatorOptions &options)
MLOperand sqrt (const MLOperand &input)
MLOperand sqrt (const MLOperand &input, const MLOperatorOptions &options)
MLOperand tan (const MLOperand &input)
MLOperand tan (const MLOperand &input, const MLOperatorOptions &options)
MLOperand tanh (const MLOperand &input)
MLOperand tanh (const MLOperand &input, const MLOperatorOptions &options)
MLOperand erf (const MLOperand &input)
MLOperand erf (const MLOperand &input, const MLOperatorOptions &options)
MLOperand reciprocal (const MLOperand &input)
MLOperand reciprocal (const MLOperand &input, const MLOperatorOptions &options)
MLOperand sign (const MLOperand &input)
MLOperand sign (const MLOperand &input, const MLOperatorOptions &options)
MLOperand logicalNot (const MLOperand &input)
MLOperand logicalNot (const MLOperand &input, const MLOperatorOptions &options)
MLOperand identity (const MLOperand &input)
MLOperand identity (const MLOperand &input, const MLOperatorOptions &options)
MLOperand softplus (const MLOperand &input)
MLOperand softplus (const MLOperand &input, const MLOperatorOptions &options)
MLOperand softsign (const MLOperand &input)
MLOperand softsign (const MLOperand &input, const MLOperatorOptions &options)
MLOperand isNaN (const MLOperand &input)
MLOperand isNaN (const MLOperand &input, const MLOperatorOptions &options)
MLOperand isInfinite (const MLOperand &input)
MLOperand isInfinite (const MLOperand &input, const MLOperatorOptions &options)
MLOperand shape (const MLOperand &input)
MLOperand shape (const MLOperand &input, const MLOperatorOptions &options)
MLOperand elu (const MLOperand &input)
MLOperand hardSigmoid (const MLOperand &input)
MLOperand hardSwish (const MLOperand &input)
MLOperand leakyRelu (const MLOperand &input)
MLOperand linear (const MLOperand &input)
MLOperand clamp (const MLOperand &input)
MLOperand instanceNormalization (const MLOperand &input)
MLOperand layerNormalization (const MLOperand &input)
MLOperand resample2d (const MLOperand &input)
MLOperand reverse (const MLOperand &input)
MLOperand triangular (const MLOperand &input)
MLOperand averagePool2d (const MLOperand &input)
MLOperand maxPool2d (const MLOperand &input)
MLOperand l2Pool2d (const MLOperand &input)
MLOperand reduceSum (const MLOperand &input)
MLOperand reduceMean (const MLOperand &input)
MLOperand reduceMax (const MLOperand &input)
MLOperand reduceMin (const MLOperand &input)
MLOperand reduceProduct (const MLOperand &input)
MLOperand reduceL1 (const MLOperand &input)
MLOperand reduceL2 (const MLOperand &input)
MLOperand reduceLogSum (const MLOperand &input)
MLOperand reduceLogSumExp (const MLOperand &input)
MLOperand reduceSumSquare (const MLOperand &input)
MLOperand transpose (const MLOperand &input)
MLOperand squeeze (const MLOperand &input)
MLOperand unsqueeze (const MLOperand &input)
MLOperand gemm (const MLOperand &lhs, const MLOperand &rhs)
MLOperand conv2d (const MLOperand &lhs, const MLOperand &rhs)
MLOperand convTranspose2d (const MLOperand &lhs, const MLOperand &rhs)
MLOperand gather (const MLOperand &lhs, const MLOperand &rhs)
MLOperand gatherElements (const MLOperand &lhs, const MLOperand &rhs)
MLOperand gatherND (const MLOperand &lhs, const MLOperand &rhs)
MLOperand prelu (const MLOperand &lhs, const MLOperand &rhs)
MLOperand batchNormalization (const MLOperand &first, const MLOperand &second, const MLOperand &third)
MLOperand where (const MLOperand &first, const MLOperand &second, const MLOperand &third)
MLOperand scatterElements (const MLOperand &first, const MLOperand &second, const MLOperand &third)
MLOperand scatterND (const MLOperand &first, const MLOperand &second, const MLOperand &third)
MLOperand argMin (const MLOperand &input, std::uint32_t axis)
MLOperand argMax (const MLOperand &input, std::uint32_t axis)
MLOperand cast (const MLOperand &input, MLOperandDataType data_type)
MLOperand cumulativeSum (const MLOperand &input, std::uint32_t axis)
MLOperand softmax (const MLOperand &input, std::uint32_t axis)
MLOperand expand (const MLOperand &input, const std::vector< std::uint32_t > &new_shape)
MLOperand reshape (const MLOperand &input, const std::vector< std::uint32_t > &new_shape)
MLOperand tile (const MLOperand &input, const std::vector< std::uint32_t > &repetitions)
MLOperand pad (const MLOperand &input, const std::vector< std::uint32_t > &beginning_padding, const std::vector< std::uint32_t > &ending_padding)
MLOperand slice (const MLOperand &input, const std::vector< std::uint32_t > &starts, const std::vector< std::uint32_t > &sizes)
MLOperand concat (const std::vector< const MLOperand * > &inputs, std::uint32_t axis)
MLOperand quantizeLinear (const MLOperand &input, const MLOperand &scale, const MLOperand *zero_point=nullptr)
MLOperand dequantizeLinear (const MLOperand &input, const MLOperand &scale, const MLOperand *zero_point=nullptr)
std::vector< MLOperand > split (const MLOperand &input, const std::vector< std::uint32_t > &splits)
std::vector< MLOperand > split (const MLOperand &input, std::uint32_t num_splits)
std::vector< MLOperand > gru (const MLOperand &input, const MLOperand &weight, const MLOperand &recurrent_weight, std::uint32_t steps, std::uint32_t hidden_size)
MLOperand gruCell (const MLOperand &input, const MLOperand &weight, const MLOperand &recurrent_weight, const MLOperand &hidden_state, std::uint32_t hidden_size)
std::vector< MLOperand > lstm (const MLOperand &input, const MLOperand &weight, const MLOperand &recurrent_weight, std::uint32_t steps, std::uint32_t hidden_size)
std::vector< MLOperand > lstmCell (const MLOperand &input, const MLOperand &weight, const MLOperand &recurrent_weight, const MLOperand &hidden_state, const MLOperand &cell_state, std::uint32_t hidden_size)
std::vector< std::uint64_t > operandShape (const MLOperand &operand)
 Return an operand's inferred dimensions.
MLOperandDataType dataType (const MLOperand &operand)
std::string webnnText (const std::vector< std::pair< std::string, const MLOperand * > > &outputs) const
 Serialize the named outputs as rustnn WebNN graph text.
MLGraph build (const std::vector< std::pair< std::string, const MLOperand * > > &outputs)
 Compile named outputs and consume this builder; the context must outlive the graph.

Detailed Description

Records and validates graph operations.

The default constructor supports graph construction and text export. Construct with MLContext to compile a graph; build() consumes the builder.

Definition at line 387 of file rustnn.hpp.

Constructor & Destructor Documentation

◆ MLGraphBuilder() [1/4]

rustnn::MLGraphBuilder::MLGraphBuilder ( )
inline

Definition at line 389 of file rustnn.hpp.

◆ MLGraphBuilder() [2/4]

rustnn::MLGraphBuilder::MLGraphBuilder ( MLContext & context)
inlineexplicit

Definition at line 390 of file rustnn.hpp.

◆ ~MLGraphBuilder()

rustnn::MLGraphBuilder::~MLGraphBuilder ( )
inline

Definition at line 393 of file rustnn.hpp.

◆ MLGraphBuilder() [3/4]

rustnn::MLGraphBuilder::MLGraphBuilder ( const MLGraphBuilder & )
delete

◆ MLGraphBuilder() [4/4]

rustnn::MLGraphBuilder::MLGraphBuilder ( MLGraphBuilder && other)
inlinenoexcept

Definition at line 397 of file rustnn.hpp.

Member Function Documentation

◆ abs() [1/2]

MLOperand rustnn::MLGraphBuilder::abs ( const MLOperand & input)
inline

Definition at line 479 of file rustnn.hpp.

◆ abs() [2/2]

MLOperand rustnn::MLGraphBuilder::abs ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 479 of file rustnn.hpp.

◆ add() [1/2]

MLOperand rustnn::MLGraphBuilder::add ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 456 of file rustnn.hpp.

◆ add() [2/2]

MLOperand rustnn::MLGraphBuilder::add ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 456 of file rustnn.hpp.

◆ argMax()

MLOperand rustnn::MLGraphBuilder::argMax ( const MLOperand & input,
std::uint32_t axis )
inline

Definition at line 563 of file rustnn.hpp.

◆ argMin()

MLOperand rustnn::MLGraphBuilder::argMin ( const MLOperand & input,
std::uint32_t axis )
inline

Definition at line 557 of file rustnn.hpp.

◆ averagePool2d()

MLOperand rustnn::MLGraphBuilder::averagePool2d ( const MLOperand & input)
inline

Definition at line 521 of file rustnn.hpp.

◆ batchNormalization()

MLOperand rustnn::MLGraphBuilder::batchNormalization ( const MLOperand & first,
const MLOperand & second,
const MLOperand & third )
inline

Definition at line 551 of file rustnn.hpp.

◆ binary() [1/2]

MLOperand rustnn::MLGraphBuilder::binary ( RustnnBinaryOperation operation,
const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 440 of file rustnn.hpp.

◆ binary() [2/2]

MLOperand rustnn::MLGraphBuilder::binary ( RustnnBinaryOperation operation,
const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 447 of file rustnn.hpp.

◆ build()

MLGraph rustnn::MLGraphBuilder::build ( const std::vector< std::pair< std::string, const MLOperand * > > & outputs)
inline

Compile named outputs and consume this builder; the context must outlive the graph.

Definition at line 760 of file rustnn.hpp.

◆ cast()

MLOperand rustnn::MLGraphBuilder::cast ( const MLOperand & input,
MLOperandDataType data_type )
inline

Definition at line 569 of file rustnn.hpp.

◆ ceil() [1/2]

MLOperand rustnn::MLGraphBuilder::ceil ( const MLOperand & input)
inline

Definition at line 481 of file rustnn.hpp.

◆ ceil() [2/2]

MLOperand rustnn::MLGraphBuilder::ceil ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 481 of file rustnn.hpp.

◆ clamp()

MLOperand rustnn::MLGraphBuilder::clamp ( const MLOperand & input)
inline

Definition at line 513 of file rustnn.hpp.

◆ concat()

MLOperand rustnn::MLGraphBuilder::concat ( const std::vector< const MLOperand * > & inputs,
std::uint32_t axis )
inline

Definition at line 632 of file rustnn.hpp.

◆ constant()

template<typename T>
MLOperand rustnn::MLGraphBuilder::constant ( const MLOperandDescriptor & descriptor,
const std::vector< T > & data )
inline

Copy constant data into the graph; T must match the descriptor's storage.

Definition at line 417 of file rustnn.hpp.

◆ conv2d()

MLOperand rustnn::MLGraphBuilder::conv2d ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 541 of file rustnn.hpp.

◆ convTranspose2d()

MLOperand rustnn::MLGraphBuilder::convTranspose2d ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 543 of file rustnn.hpp.

◆ cos() [1/2]

MLOperand rustnn::MLGraphBuilder::cos ( const MLOperand & input)
inline

Definition at line 482 of file rustnn.hpp.

◆ cos() [2/2]

MLOperand rustnn::MLGraphBuilder::cos ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 482 of file rustnn.hpp.

◆ cumulativeSum()

MLOperand rustnn::MLGraphBuilder::cumulativeSum ( const MLOperand & input,
std::uint32_t axis )
inline

Definition at line 576 of file rustnn.hpp.

◆ dataType()

MLOperandDataType rustnn::MLGraphBuilder::dataType ( const MLOperand & operand)
inline

Definition at line 738 of file rustnn.hpp.

◆ dequantizeLinear()

MLOperand rustnn::MLGraphBuilder::dequantizeLinear ( const MLOperand & input,
const MLOperand & scale,
const MLOperand * zero_point = nullptr )
inline

Definition at line 654 of file rustnn.hpp.

◆ divide() [1/2]

MLOperand rustnn::MLGraphBuilder::divide ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 459 of file rustnn.hpp.

◆ divide() [2/2]

MLOperand rustnn::MLGraphBuilder::divide ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 459 of file rustnn.hpp.

◆ elu()

MLOperand rustnn::MLGraphBuilder::elu ( const MLOperand & input)
inline

Definition at line 508 of file rustnn.hpp.

◆ equal() [1/2]

MLOperand rustnn::MLGraphBuilder::equal ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 463 of file rustnn.hpp.

◆ equal() [2/2]

MLOperand rustnn::MLGraphBuilder::equal ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 463 of file rustnn.hpp.

◆ erf() [1/2]

MLOperand rustnn::MLGraphBuilder::erf ( const MLOperand & input)
inline

Definition at line 494 of file rustnn.hpp.

◆ erf() [2/2]

MLOperand rustnn::MLGraphBuilder::erf ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 494 of file rustnn.hpp.

◆ exp() [1/2]

MLOperand rustnn::MLGraphBuilder::exp ( const MLOperand & input)
inline

Definition at line 483 of file rustnn.hpp.

◆ exp() [2/2]

MLOperand rustnn::MLGraphBuilder::exp ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 483 of file rustnn.hpp.

◆ expand()

MLOperand rustnn::MLGraphBuilder::expand ( const MLOperand & input,
const std::vector< std::uint32_t > & new_shape )
inline

Definition at line 588 of file rustnn.hpp.

◆ floor() [1/2]

MLOperand rustnn::MLGraphBuilder::floor ( const MLOperand & input)
inline

Definition at line 484 of file rustnn.hpp.

◆ floor() [2/2]

MLOperand rustnn::MLGraphBuilder::floor ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 484 of file rustnn.hpp.

◆ gather()

MLOperand rustnn::MLGraphBuilder::gather ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 544 of file rustnn.hpp.

◆ gatherElements()

MLOperand rustnn::MLGraphBuilder::gatherElements ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 546 of file rustnn.hpp.

◆ gatherND()

MLOperand rustnn::MLGraphBuilder::gatherND ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 547 of file rustnn.hpp.

◆ gelu() [1/2]

MLOperand rustnn::MLGraphBuilder::gelu ( const MLOperand & input)
inline

Definition at line 485 of file rustnn.hpp.

◆ gelu() [2/2]

MLOperand rustnn::MLGraphBuilder::gelu ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 485 of file rustnn.hpp.

◆ gemm()

MLOperand rustnn::MLGraphBuilder::gemm ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 540 of file rustnn.hpp.

◆ greater() [1/2]

MLOperand rustnn::MLGraphBuilder::greater ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 464 of file rustnn.hpp.

◆ greater() [2/2]

MLOperand rustnn::MLGraphBuilder::greater ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 464 of file rustnn.hpp.

◆ greaterOrEqual() [1/2]

MLOperand rustnn::MLGraphBuilder::greaterOrEqual ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 466 of file rustnn.hpp.

◆ greaterOrEqual() [2/2]

MLOperand rustnn::MLGraphBuilder::greaterOrEqual ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 466 of file rustnn.hpp.

◆ gru()

std::vector< MLOperand > rustnn::MLGraphBuilder::gru ( const MLOperand & input,
const MLOperand & weight,
const MLOperand & recurrent_weight,
std::uint32_t steps,
std::uint32_t hidden_size )
inline

Definition at line 683 of file rustnn.hpp.

◆ gruCell()

MLOperand rustnn::MLGraphBuilder::gruCell ( const MLOperand & input,
const MLOperand & weight,
const MLOperand & recurrent_weight,
const MLOperand & hidden_state,
std::uint32_t hidden_size )
inline

Definition at line 694 of file rustnn.hpp.

◆ hardSigmoid()

MLOperand rustnn::MLGraphBuilder::hardSigmoid ( const MLOperand & input)
inline

Definition at line 509 of file rustnn.hpp.

◆ hardSwish()

MLOperand rustnn::MLGraphBuilder::hardSwish ( const MLOperand & input)
inline

Definition at line 510 of file rustnn.hpp.

◆ identity() [1/2]

MLOperand rustnn::MLGraphBuilder::identity ( const MLOperand & input)
inline

Definition at line 500 of file rustnn.hpp.

◆ identity() [2/2]

MLOperand rustnn::MLGraphBuilder::identity ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 500 of file rustnn.hpp.

◆ input()

MLOperand rustnn::MLGraphBuilder::input ( const std::string & name,
const MLOperandDescriptor & descriptor )
inline

Declare a named graph input with the supplied type and shape.

Definition at line 409 of file rustnn.hpp.

◆ instanceNormalization()

MLOperand rustnn::MLGraphBuilder::instanceNormalization ( const MLOperand & input)
inline

Definition at line 515 of file rustnn.hpp.

◆ isInfinite() [1/2]

MLOperand rustnn::MLGraphBuilder::isInfinite ( const MLOperand & input)
inline

Definition at line 505 of file rustnn.hpp.

◆ isInfinite() [2/2]

MLOperand rustnn::MLGraphBuilder::isInfinite ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 505 of file rustnn.hpp.

◆ isNaN() [1/2]

MLOperand rustnn::MLGraphBuilder::isNaN ( const MLOperand & input)
inline

Definition at line 503 of file rustnn.hpp.

◆ isNaN() [2/2]

MLOperand rustnn::MLGraphBuilder::isNaN ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 503 of file rustnn.hpp.

◆ l2Pool2d()

MLOperand rustnn::MLGraphBuilder::l2Pool2d ( const MLOperand & input)
inline

Definition at line 523 of file rustnn.hpp.

◆ layerNormalization()

MLOperand rustnn::MLGraphBuilder::layerNormalization ( const MLOperand & input)
inline

Definition at line 517 of file rustnn.hpp.

◆ leakyRelu()

MLOperand rustnn::MLGraphBuilder::leakyRelu ( const MLOperand & input)
inline

Definition at line 511 of file rustnn.hpp.

◆ lesser() [1/2]

MLOperand rustnn::MLGraphBuilder::lesser ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 467 of file rustnn.hpp.

◆ lesser() [2/2]

MLOperand rustnn::MLGraphBuilder::lesser ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 467 of file rustnn.hpp.

◆ lesserOrEqual() [1/2]

MLOperand rustnn::MLGraphBuilder::lesserOrEqual ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 469 of file rustnn.hpp.

◆ lesserOrEqual() [2/2]

MLOperand rustnn::MLGraphBuilder::lesserOrEqual ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 469 of file rustnn.hpp.

◆ linear()

MLOperand rustnn::MLGraphBuilder::linear ( const MLOperand & input)
inline

Definition at line 512 of file rustnn.hpp.

◆ log() [1/2]

MLOperand rustnn::MLGraphBuilder::log ( const MLOperand & input)
inline

Definition at line 486 of file rustnn.hpp.

◆ log() [2/2]

MLOperand rustnn::MLGraphBuilder::log ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 486 of file rustnn.hpp.

◆ logicalAnd() [1/2]

MLOperand rustnn::MLGraphBuilder::logicalAnd ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 472 of file rustnn.hpp.

◆ logicalAnd() [2/2]

MLOperand rustnn::MLGraphBuilder::logicalAnd ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 472 of file rustnn.hpp.

◆ logicalNot() [1/2]

MLOperand rustnn::MLGraphBuilder::logicalNot ( const MLOperand & input)
inline

Definition at line 499 of file rustnn.hpp.

◆ logicalNot() [2/2]

MLOperand rustnn::MLGraphBuilder::logicalNot ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 499 of file rustnn.hpp.

◆ logicalOr() [1/2]

MLOperand rustnn::MLGraphBuilder::logicalOr ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 474 of file rustnn.hpp.

◆ logicalOr() [2/2]

MLOperand rustnn::MLGraphBuilder::logicalOr ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 474 of file rustnn.hpp.

◆ logicalXor() [1/2]

MLOperand rustnn::MLGraphBuilder::logicalXor ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 476 of file rustnn.hpp.

◆ logicalXor() [2/2]

MLOperand rustnn::MLGraphBuilder::logicalXor ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 476 of file rustnn.hpp.

◆ lstm()

std::vector< MLOperand > rustnn::MLGraphBuilder::lstm ( const MLOperand & input,
const MLOperand & weight,
const MLOperand & recurrent_weight,
std::uint32_t steps,
std::uint32_t hidden_size )
inline

Definition at line 704 of file rustnn.hpp.

◆ lstmCell()

std::vector< MLOperand > rustnn::MLGraphBuilder::lstmCell ( const MLOperand & input,
const MLOperand & weight,
const MLOperand & recurrent_weight,
const MLOperand & hidden_state,
const MLOperand & cell_state,
std::uint32_t hidden_size )
inline

Definition at line 716 of file rustnn.hpp.

◆ matmul() [1/2]

MLOperand rustnn::MLGraphBuilder::matmul ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 477 of file rustnn.hpp.

◆ matmul() [2/2]

MLOperand rustnn::MLGraphBuilder::matmul ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 477 of file rustnn.hpp.

◆ maximum() [1/2]

MLOperand rustnn::MLGraphBuilder::maximum ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 461 of file rustnn.hpp.

◆ maximum() [2/2]

MLOperand rustnn::MLGraphBuilder::maximum ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 461 of file rustnn.hpp.

◆ maxPool2d()

MLOperand rustnn::MLGraphBuilder::maxPool2d ( const MLOperand & input)
inline

Definition at line 522 of file rustnn.hpp.

◆ minimum() [1/2]

MLOperand rustnn::MLGraphBuilder::minimum ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 462 of file rustnn.hpp.

◆ minimum() [2/2]

MLOperand rustnn::MLGraphBuilder::minimum ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 462 of file rustnn.hpp.

◆ multiply() [1/2]

MLOperand rustnn::MLGraphBuilder::multiply ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 458 of file rustnn.hpp.

◆ multiply() [2/2]

MLOperand rustnn::MLGraphBuilder::multiply ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 458 of file rustnn.hpp.

◆ negate() [1/2]

MLOperand rustnn::MLGraphBuilder::negate ( const MLOperand & input)
inline

Definition at line 487 of file rustnn.hpp.

◆ negate() [2/2]

MLOperand rustnn::MLGraphBuilder::negate ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 487 of file rustnn.hpp.

◆ notEqual() [1/2]

MLOperand rustnn::MLGraphBuilder::notEqual ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 470 of file rustnn.hpp.

◆ notEqual() [2/2]

MLOperand rustnn::MLGraphBuilder::notEqual ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 470 of file rustnn.hpp.

◆ operandShape()

std::vector< std::uint64_t > rustnn::MLGraphBuilder::operandShape ( const MLOperand & operand)
inline

Return an operand's inferred dimensions.

Definition at line 729 of file rustnn.hpp.

◆ operator=() [1/2]

MLGraphBuilder & rustnn::MLGraphBuilder::operator= ( const MLGraphBuilder & )
delete

◆ operator=() [2/2]

MLGraphBuilder & rustnn::MLGraphBuilder::operator= ( MLGraphBuilder && other)
inlinenoexcept

Definition at line 400 of file rustnn.hpp.

◆ pad()

MLOperand rustnn::MLGraphBuilder::pad ( const MLOperand & input,
const std::vector< std::uint32_t > & beginning_padding,
const std::vector< std::uint32_t > & ending_padding )
inline

Definition at line 612 of file rustnn.hpp.

◆ power() [1/2]

MLOperand rustnn::MLGraphBuilder::power ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 460 of file rustnn.hpp.

◆ power() [2/2]

MLOperand rustnn::MLGraphBuilder::power ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 460 of file rustnn.hpp.

◆ prelu()

MLOperand rustnn::MLGraphBuilder::prelu ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 548 of file rustnn.hpp.

◆ quantizeLinear()

MLOperand rustnn::MLGraphBuilder::quantizeLinear ( const MLOperand & input,
const MLOperand & scale,
const MLOperand * zero_point = nullptr )
inline

Definition at line 645 of file rustnn.hpp.

◆ reciprocal() [1/2]

MLOperand rustnn::MLGraphBuilder::reciprocal ( const MLOperand & input)
inline

Definition at line 496 of file rustnn.hpp.

◆ reciprocal() [2/2]

MLOperand rustnn::MLGraphBuilder::reciprocal ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 496 of file rustnn.hpp.

◆ reduceL1()

MLOperand rustnn::MLGraphBuilder::reduceL1 ( const MLOperand & input)
inline

Definition at line 529 of file rustnn.hpp.

◆ reduceL2()

MLOperand rustnn::MLGraphBuilder::reduceL2 ( const MLOperand & input)
inline

Definition at line 530 of file rustnn.hpp.

◆ reduceLogSum()

MLOperand rustnn::MLGraphBuilder::reduceLogSum ( const MLOperand & input)
inline

Definition at line 531 of file rustnn.hpp.

◆ reduceLogSumExp()

MLOperand rustnn::MLGraphBuilder::reduceLogSumExp ( const MLOperand & input)
inline

Definition at line 533 of file rustnn.hpp.

◆ reduceMax()

MLOperand rustnn::MLGraphBuilder::reduceMax ( const MLOperand & input)
inline

Definition at line 526 of file rustnn.hpp.

◆ reduceMean()

MLOperand rustnn::MLGraphBuilder::reduceMean ( const MLOperand & input)
inline

Definition at line 525 of file rustnn.hpp.

◆ reduceMin()

MLOperand rustnn::MLGraphBuilder::reduceMin ( const MLOperand & input)
inline

Definition at line 527 of file rustnn.hpp.

◆ reduceProduct()

MLOperand rustnn::MLGraphBuilder::reduceProduct ( const MLOperand & input)
inline

Definition at line 528 of file rustnn.hpp.

◆ reduceSum()

MLOperand rustnn::MLGraphBuilder::reduceSum ( const MLOperand & input)
inline

Definition at line 524 of file rustnn.hpp.

◆ reduceSumSquare()

MLOperand rustnn::MLGraphBuilder::reduceSumSquare ( const MLOperand & input)
inline

Definition at line 535 of file rustnn.hpp.

◆ relu() [1/2]

MLOperand rustnn::MLGraphBuilder::relu ( const MLOperand & input)
inline

Definition at line 488 of file rustnn.hpp.

◆ relu() [2/2]

MLOperand rustnn::MLGraphBuilder::relu ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 488 of file rustnn.hpp.

◆ resample2d()

MLOperand rustnn::MLGraphBuilder::resample2d ( const MLOperand & input)
inline

Definition at line 518 of file rustnn.hpp.

◆ reshape()

MLOperand rustnn::MLGraphBuilder::reshape ( const MLOperand & input,
const std::vector< std::uint32_t > & new_shape )
inline

Definition at line 596 of file rustnn.hpp.

◆ reverse()

MLOperand rustnn::MLGraphBuilder::reverse ( const MLOperand & input)
inline

Definition at line 519 of file rustnn.hpp.

◆ roundEven() [1/2]

MLOperand rustnn::MLGraphBuilder::roundEven ( const MLOperand & input)
inline

Definition at line 480 of file rustnn.hpp.

◆ roundEven() [2/2]

MLOperand rustnn::MLGraphBuilder::roundEven ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 480 of file rustnn.hpp.

◆ scatterElements()

MLOperand rustnn::MLGraphBuilder::scatterElements ( const MLOperand & first,
const MLOperand & second,
const MLOperand & third )
inline

Definition at line 554 of file rustnn.hpp.

◆ scatterND()

MLOperand rustnn::MLGraphBuilder::scatterND ( const MLOperand & first,
const MLOperand & second,
const MLOperand & third )
inline

Definition at line 555 of file rustnn.hpp.

◆ shape() [1/2]

MLOperand rustnn::MLGraphBuilder::shape ( const MLOperand & input)
inline

Definition at line 506 of file rustnn.hpp.

◆ shape() [2/2]

MLOperand rustnn::MLGraphBuilder::shape ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 506 of file rustnn.hpp.

◆ sigmoid() [1/2]

MLOperand rustnn::MLGraphBuilder::sigmoid ( const MLOperand & input)
inline

Definition at line 489 of file rustnn.hpp.

◆ sigmoid() [2/2]

MLOperand rustnn::MLGraphBuilder::sigmoid ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 489 of file rustnn.hpp.

◆ sign() [1/2]

MLOperand rustnn::MLGraphBuilder::sign ( const MLOperand & input)
inline

Definition at line 497 of file rustnn.hpp.

◆ sign() [2/2]

MLOperand rustnn::MLGraphBuilder::sign ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 497 of file rustnn.hpp.

◆ sin() [1/2]

MLOperand rustnn::MLGraphBuilder::sin ( const MLOperand & input)
inline

Definition at line 490 of file rustnn.hpp.

◆ sin() [2/2]

MLOperand rustnn::MLGraphBuilder::sin ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 490 of file rustnn.hpp.

◆ slice()

MLOperand rustnn::MLGraphBuilder::slice ( const MLOperand & input,
const std::vector< std::uint32_t > & starts,
const std::vector< std::uint32_t > & sizes )
inline

Definition at line 622 of file rustnn.hpp.

◆ softmax()

MLOperand rustnn::MLGraphBuilder::softmax ( const MLOperand & input,
std::uint32_t axis )
inline

Definition at line 582 of file rustnn.hpp.

◆ softplus() [1/2]

MLOperand rustnn::MLGraphBuilder::softplus ( const MLOperand & input)
inline

Definition at line 501 of file rustnn.hpp.

◆ softplus() [2/2]

MLOperand rustnn::MLGraphBuilder::softplus ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 501 of file rustnn.hpp.

◆ softsign() [1/2]

MLOperand rustnn::MLGraphBuilder::softsign ( const MLOperand & input)
inline

Definition at line 502 of file rustnn.hpp.

◆ softsign() [2/2]

MLOperand rustnn::MLGraphBuilder::softsign ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 502 of file rustnn.hpp.

◆ split() [1/2]

std::vector< MLOperand > rustnn::MLGraphBuilder::split ( const MLOperand & input,
const std::vector< std::uint32_t > & splits )
inline

Definition at line 663 of file rustnn.hpp.

◆ split() [2/2]

std::vector< MLOperand > rustnn::MLGraphBuilder::split ( const MLOperand & input,
std::uint32_t num_splits )
inline

Definition at line 673 of file rustnn.hpp.

◆ sqrt() [1/2]

MLOperand rustnn::MLGraphBuilder::sqrt ( const MLOperand & input)
inline

Definition at line 491 of file rustnn.hpp.

◆ sqrt() [2/2]

MLOperand rustnn::MLGraphBuilder::sqrt ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 491 of file rustnn.hpp.

◆ squeeze()

MLOperand rustnn::MLGraphBuilder::squeeze ( const MLOperand & input)
inline

Definition at line 537 of file rustnn.hpp.

◆ subtract() [1/2]

MLOperand rustnn::MLGraphBuilder::subtract ( const MLOperand & lhs,
const MLOperand & rhs )
inline

Definition at line 457 of file rustnn.hpp.

◆ subtract() [2/2]

MLOperand rustnn::MLGraphBuilder::subtract ( const MLOperand & lhs,
const MLOperand & rhs,
const MLOperatorOptions & options )
inline

Definition at line 457 of file rustnn.hpp.

◆ tan() [1/2]

MLOperand rustnn::MLGraphBuilder::tan ( const MLOperand & input)
inline

Definition at line 492 of file rustnn.hpp.

◆ tan() [2/2]

MLOperand rustnn::MLGraphBuilder::tan ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 492 of file rustnn.hpp.

◆ tanh() [1/2]

MLOperand rustnn::MLGraphBuilder::tanh ( const MLOperand & input)
inline

Definition at line 493 of file rustnn.hpp.

◆ tanh() [2/2]

MLOperand rustnn::MLGraphBuilder::tanh ( const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 493 of file rustnn.hpp.

◆ tile()

MLOperand rustnn::MLGraphBuilder::tile ( const MLOperand & input,
const std::vector< std::uint32_t > & repetitions )
inline

Definition at line 604 of file rustnn.hpp.

◆ transpose()

MLOperand rustnn::MLGraphBuilder::transpose ( const MLOperand & input)
inline

Definition at line 536 of file rustnn.hpp.

◆ triangular()

MLOperand rustnn::MLGraphBuilder::triangular ( const MLOperand & input)
inline

Definition at line 520 of file rustnn.hpp.

◆ unary() [1/2]

MLOperand rustnn::MLGraphBuilder::unary ( RustnnUnaryOperation operation,
const MLOperand & input )
inline

Definition at line 425 of file rustnn.hpp.

◆ unary() [2/2]

MLOperand rustnn::MLGraphBuilder::unary ( RustnnUnaryOperation operation,
const MLOperand & input,
const MLOperatorOptions & options )
inline

Definition at line 431 of file rustnn.hpp.

◆ unsqueeze()

MLOperand rustnn::MLGraphBuilder::unsqueeze ( const MLOperand & input)
inline

Definition at line 538 of file rustnn.hpp.

◆ webnnText()

std::string rustnn::MLGraphBuilder::webnnText ( const std::vector< std::pair< std::string, const MLOperand * > > & outputs) const
inline

Serialize the named outputs as rustnn WebNN graph text.

Definition at line 745 of file rustnn.hpp.

◆ where()

MLOperand rustnn::MLGraphBuilder::where ( const MLOperand & first,
const MLOperand & second,
const MLOperand & third )
inline

Definition at line 552 of file rustnn.hpp.


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