ZXFoundation™ 26h2
Loading...
Searching...
No Matches
arch.s390x.cpu.nnpa Module Reference

Concepts

concept  arch::s390x::cpu::nnpa::pb_for
concept  arch::s390x::cpu::nnpa::TensorElement

Data Structures

struct  arch::s390x::cpu::nnpa::detail::data_layout_feature_tensor
struct  arch::s390x::cpu::nnpa::detail::data_layout_kernel_tensor
struct  arch::s390x::cpu::nnpa::detail::data_layout_weights_tensor
struct  arch::s390x::cpu::nnpa::fn_pb< Fc >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::add >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::avgpool2d >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::batchnorm >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::convolution >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::div >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::exp >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::gelu >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::gruact >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::invsqrt >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::layernorm >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::log >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::lstmact >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::matmul_op >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::matmul_op_bcast1 >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::matmul_op_bcast23 >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::max >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::maxpool2d >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::min >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::moments >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::mul >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::norm >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::qaf >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::reduce >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::relu >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::sigmoid >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::softmax >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::sqrt >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::sub >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::tanh >
struct  arch::s390x::cpu::nnpa::fn_pb< fn_code::transform >
struct  arch::s390x::cpu::nnpa::format0_pb
struct  arch::s390x::cpu::nnpa::format1_pb
class  arch::s390x::cpu::nnpa::generic_tensor_view< T >
struct  arch::s390x::cpu::nnpa::qaf_pb
struct  arch::s390x::cpu::nnpa::result
class  arch::s390x::cpu::nnpa::stickified_tensor_view< Policy >
struct  arch::s390x::cpu::nnpa::tensor_descriptor

Enumerations

enum class  data_layout_format : u8 { feature_tensor_4d = 0 , kernel_tensor_4d = 1 , weights_tensor_4d = 2 , generic_tensor_4d = 31 }
enum class  data_type : u8 { nnp_data_type1 = 0 , bfp_short_format = 6 , signed_binary_int = 8 , signed_unsigned_int = 10 }
enum class  fn_code : u8 {
  qaf = 0x00 , add = 0x10 , sub = 0x11 , mul = 0x12 ,
  div = 0x13 , min = 0x14 , max = 0x15 , log = 0x20 ,
  exp = 0x21 , sqrt = 0x22 , invsqrt = 0x23 , relu = 0x31 ,
  tanh = 0x32 , sigmoid = 0x33 , softmax = 0x34 , gelu = 0x35 ,
  batchnorm = 0x40 , moments = 0x41 , layernorm = 0x42 , norm = 0x43 ,
  maxpool2d = 0x50 , avgpool2d = 0x51 , lstmact = 0x60 , gruact = 0x61 ,
  convolution = 0x70 , matmul_op = 0x71 , matmul_op_bcast23 = 0x72 , matmul_op_bcast1 = 0x73 ,
  transform = 0xf0 , reduce = 0xf1
}
enum class  response_code : u16 {
  format_not_supported = 0x0001 , function_not_installed = 0x0002 , tensor_layout_not_supported = 0x0010 , tensor_type_not_supported = 0x0020 ,
  tensor_index_size_invalid = 0x0012 , tensor_size_invalid = 0x0013 , tensor_address_alignment = 0x0014 , fn_save_area_address_alignment = 0x0015
}
enum class  slot_kind : u8 { data , e1_pad , e2_pad }
enum class  status_code : u8 { range_violation = 0b10000000 }

Typedefs

using arch::s390x::cpu::nnpa::feature_tensor_view = stickified_tensor_view<detail::data_layout_feature_tensor>
using arch::s390x::cpu::nnpa::kernel_tensor_view = stickified_tensor_view<detail::data_layout_kernel_tensor>
using arch::s390x::cpu::nnpa::weights_tensor_view = stickified_tensor_view<detail::data_layout_weights_tensor>

Functions

 arch::s390x::cpu::nnpa::assert_size (format0_pb, 4096)
 arch::s390x::cpu::nnpa::assert_size (format1_pb, 4096)
 arch::s390x::cpu::nnpa::assert_size (qaf_pb, fn_pb< fn_code::qaf >::value)
 arch::s390x::cpu::nnpa::assert_size (tensor_descriptor, 32)
 bitfield (continuation_flag)
 bitfield (continuation_flag)
 bitfield (lf)
 bitrsvd (1)
 bitrsvd (39)
 bitrsvd (1)
 bitrsvd (38)
 bitsfield (7, pm_version_number)
 bitsfield (7, pm_version_number)
constexpr auto byte_offset (u32 e4, u32 e3, u32 e2, u32 e1) const noexcept -> usize
 bytersvd (1)
 bytersvd (tobytes(dw, 12))
 bytersvd (tobytes(dw, 456))
 bytersvd (tobytes(dw, 5)+tobytes(w, 1))
 bytersvd (tobytes(dw, 6))
 bytersvd (tobytes(dw, 8))
 bytersvd (1)
 bytersvd (tobytes(dw, 12))
 bytersvd (tobytes(dw, 456))
 bytersvd (tobytes(dw, 6))
 bytersvd (tobytes(dw, 8))
 bytersvd (tobytes(dw, 1))
 bytersvd (tobytes(dw, 19))
 bytersvd (tobytes(hw, 1))
 bytersvd (tobytes(hw, 1)+tobytes(w, 1))
 bytersvd (tobytes(w, 1))
 bytersvd (6)
constexpr auto arch::s390x::cpu::nnpa::detail::ceil_to (usize n, usize group) noexcept -> usize
constexpr slot_kind arch::s390x::cpu::nnpa::detail::classify (u32 E1, u32 E2, u32 e1x, u32 e2x) noexcept
constexpr auto classify (u32 e2, u32 e1) const noexcept -> detail::slot_kind
constexpr auto e1 () const noexcept -> u32
constexpr u32 e1 () const noexcept
constexpr auto e1 () const noexcept -> u32
static constexpr auto e1_limit (u32 E1, usize eps) noexcept -> usize
static constexpr auto e1_limit (u32 E1, usize eps) noexcept -> usize
static constexpr auto e1_limit (u32 E1, usize) noexcept -> usize
constexpr auto e2 () const noexcept -> u32
constexpr u32 e2 () const noexcept
constexpr auto e2 () const noexcept -> u32
static constexpr auto e2_limit (u32 E2) noexcept -> usize
static constexpr auto e2_limit (u32 E2) noexcept -> usize
static constexpr auto e2_limit (u32 E2) noexcept -> usize
constexpr auto e3 () const noexcept -> u32
constexpr u32 e3 () const noexcept
constexpr auto e3 () const noexcept -> u32
constexpr auto e4 () const noexcept -> u32
constexpr u32 e4 () const noexcept
constexpr auto e4 () const noexcept -> u32
constexpr auto element_bytes (u32 e4, u32 e3, u32 e2, u32 e1) noexcept -> std::span< std::byte >
constexpr auto arch::s390x::cpu::nnpa::detail::element_size (data_type dt) noexcept -> usize
constexpr auto arch::s390x::cpu::nnpa::detail::elements_per_stick (data_type dt) noexcept -> usize
constexpr generic_tensor_view (std::span< T > storage, u32 e4, u32 e3, u32 e2, u32 e1) noexcept
auto installed_functions () const noexcept -> std::span< const std::byte, 32 >
auto installed_param_block_fmts () const noexcept -> std::span< const std::byte, 16 >
template<fn_code Fc, typename Pb>
requires pb_for<Fc, Pb>
auto arch::s390x::cpu::nnpa::invoke (Pb &pb) noexcept -> result
template<fn_code Fc>
auto is_function_installed () const noexcept -> bool
constexpr auto is_generic () const noexcept -> bool
template<data_layout_format Fmt>
auto is_param_block_fmt_installed () const noexcept -> bool
constexpr auto linear_index (u32 e4, u32 e3, u32 e2, u32 e1) const noexcept -> usize
static constexpr usize offset (u32 E3, u32, usize eps, usize e2_lim, usize e1_lim, u32 e4x, u32 e3x, u32 e2x, u32 e1x) noexcept
static constexpr auto offset (u32 E3, u32 E4, usize eps, usize e2_lim, usize, u32 e4x, u32 e3x, u32 e2x, u32 e1x) noexcept -> usize
static constexpr auto offset (u32 E3, u32, usize, usize e2_lim, usize e1_lim, u32 e4x, u32 e3x, u32 e2x, u32 e1x) noexcept -> usize
constexpr auto operator[] (u32 e4, u32 e3, u32 e2, u32 e1) const noexcept -> T &
constexpr auto operator[] (u32 e4, u32 e3, u32 e2, u32 e1) noexcept -> T &
constexpr auto required_bytes () const noexcept -> usize
constexpr auto set_dims (u32 e4, u32 e3, u32 e2, u32 e1) noexcept -> void
constexpr auto set_tensor_address (u32 addr) noexcept -> void
constexpr stickified_tensor_view (std::span< std::byte > storage, data_type dt, u32 E4, u32 E3, u32 E2, u32 E1) noexcept
constexpr auto storage () const noexcept -> std::span< T >
constexpr std::span< std::byte > storage () const noexcept
constexpr auto tensor_address () const noexcept -> u32
template<class Policy, TensorElement T>
constexpr auto arch::s390x::cpu::nnpa::transform_from_stickified (const stickified_tensor_view< Policy > &src, generic_tensor_view< T > &dst) noexcept -> void
template<class Policy>
constexpr auto arch::s390x::cpu::nnpa::detail::transform_from_stickified_bytes (std::span< const std::byte > stick, std::span< std::byte > generic, data_type dt, u32 E4, u32 E3, u32 E2, u32 E1) noexcept -> void
constexpr auto arch::s390x::cpu::nnpa::transform_generic_to_stickified (std::span< const std::byte > generic, std::span< std::byte > stick, data_layout_format dst_format, data_type dt, u32 E4, u32 E3, u32 E2, u32 E1, std::byte pad_fill=std::byte{0}) noexcept -> void
constexpr auto arch::s390x::cpu::nnpa::transform_stickified_to_generic (std::span< const std::byte > stick, std::span< std::byte > generic, data_layout_format src_format, data_type dt, u32 E4, u32 E3, u32 E2, u32 E1) noexcept -> void
template<class Policy, TensorElement T>
constexpr auto arch::s390x::cpu::nnpa::transform_to_stickified (const generic_tensor_view< T > &src, stickified_tensor_view< Policy > &dst, std::byte pad_fill=std::byte{0}) noexcept -> void
template<class Policy>
constexpr auto arch::s390x::cpu::nnpa::detail::transform_to_stickified_bytes (std::span< const std::byte > generic, std::span< std::byte > stick, data_type dt, u32 E4, u32 E3, u32 E2, u32 E1, std::byte pad_fill) noexcept -> void
constexpr data_type type () const noexcept
static constexpr auto unit_bytes (usize element_sz) noexcept -> usize
static constexpr auto unit_bytes (usize element_sz) noexcept -> usize
static constexpr auto unit_bytes (usize) noexcept -> usize

Variables

std::array< u32, 4 > dimse {}
std::array< u32, 5 > function_specific_parameters {}
std::array< u32, 16 > function_specific_parameters {}
u64 function_specific_save_area_addr {}
u64 function_specific_save_area_addr {}
static constexpr usize group = 64
static constexpr usize idx_E1 = 3
static constexpr usize idx_E2 = 2
static constexpr usize idx_E3 = 1
static constexpr usize idx_E4 = 0
std::array< tensor_descriptor, 3 > input_tensor_descriptors {}
std::array< tensor_descriptor, 3 > input_tensor_descriptors {}
u32   installed_data_layout_fmt_vector 
u16   installed_dt_vector 
std::array< std::byte, 32 > installed_functions_vector {}
u16   installed_nnp_dt1_conv_vector 
std::array< std::byte, 16 > installed_param_block_formats {}
static constexpr auto layout_format = data_layout_format::feature_tensor_4d
static constexpr auto layout_format = data_layout_format::kernel_tensor_4d
static constexpr auto layout_format = data_layout_format::kernel_tensor_4d
data_layout_format layout_format {}
u32 maximum_dimension_idx_size {}
std::array< u32, 4 > maximum_dimension_idx_sizes {}
u64 maximum_tensor_size {}
u8 model_version_number {}
u8 model_version_number {}
std::array< tensor_descriptor, 2 > output_tensor_descriptors {}
std::array< tensor_descriptor, 2 > output_tensor_descriptors {}
template<fn_code Fc>
constexpr usize arch::s390x::cpu::nnpa::pb_v = fn_pb<Fc>::value
response_code response_code {}
status_code status_code {}
constexpr usize arch::s390x::cpu::nnpa::detail::stick_bytes = 128
u64 tensor_addr {}
data_type type {}
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 256
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096
static constexpr usize value = 4096

Files

file  arch/s390x/cpu/nnpa.cxxm
 nnpa cpu support module