ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::Sparsity Struct Reference

Structure for Sparse Tensor. More...

#include <Sparsity.h>

Public Member Functions

 Sparsity ()=default
 
 Sparsity (std::vector< uint16_t > &&w1_segments, std::vector< uint16_t > &&w1_indices, std::vector< int32_t > &&block_size)
 
const uint16_t * w1_segments () const
 Returns segments array. See compressed sparse row format.
 
const uint16_t * w1_indices () const
 Returns indices array. See compressed sparse row format.
 
const std::vector< int32_t > & block_size () const
 Returns block size which is used for block sparsity.
 

Detailed Description

Structure for Sparse Tensor.

Definition at line 32 of file Sparsity.h.

Constructor & Destructor Documentation

◆ Sparsity() [1/2]

onert::ir::Sparsity::Sparsity ( )
default

◆ Sparsity() [2/2]

onert::ir::Sparsity::Sparsity ( std::vector< uint16_t > &&  w1_segments,
std::vector< uint16_t > &&  w1_indices,
std::vector< int32_t > &&  block_size 
)
inline

Definition at line 36 of file Sparsity.h.

38 : _w1_segments(w1_segments), _w1_indices(w1_indices), _block_size(block_size)
39 {
40 }
const std::vector< int32_t > & block_size() const
Returns block size which is used for block sparsity.
Definition Sparsity.h:53
const uint16_t * w1_segments() const
Returns segments array. See compressed sparse row format.
Definition Sparsity.h:45
const uint16_t * w1_indices() const
Returns indices array. See compressed sparse row format.
Definition Sparsity.h:49

Member Function Documentation

◆ block_size()

const std::vector< int32_t > & onert::ir::Sparsity::block_size ( ) const
inline

Returns block size which is used for block sparsity.

Definition at line 53 of file Sparsity.h.

53{ return _block_size; }

Referenced by onert::backend::cpu::ops::FullyConnectedLayer::fullyConnectedSparseWeight().

◆ w1_indices()

const uint16_t * onert::ir::Sparsity::w1_indices ( ) const
inline

Returns indices array. See compressed sparse row format.

Definition at line 49 of file Sparsity.h.

49{ return _w1_indices.data(); }

Referenced by onert::backend::cpu::ops::FullyConnectedLayer::fullyConnectedSparseWeight().

◆ w1_segments()

const uint16_t * onert::ir::Sparsity::w1_segments ( ) const
inline

Returns segments array. See compressed sparse row format.

Definition at line 45 of file Sparsity.h.

45{ return _w1_segments.data(); }

Referenced by onert::backend::cpu::ops::FullyConnectedLayer::fullyConnectedSparseWeight().


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