asc2.LocalTensor

class asc2.LocalTensor(handle: Value)

A local tensor is a multi-dimensional array of values in local memory (Unified Buffer, L1 Cache, etc.)

Each element is of dtype type and number of elements is defined by shape tuple.

__init__(handle: Value) None

This constructor is not called by user.

Use copy_in(), zeros(), or other functions to create a local tensor.

Methods

__init__(handle)

This constructor is not called by user.

abs()

Forwards to abs() function.

broadcast_to(*shape)

Forwards to broadcast_to() function.

ceil()

Forwards to ceil() function.

cos()

Forwards to cos() function.

cosh()

Forwards to cosh() function.

erf()

Forwards to erf() function.

exp()

Forwards to exp() function.

exp2()

Forwards to exp2() function.

expand_dims(*axis)

Forwards to expand_dims() function.

floor()

Forwards to floor() function.

from_ir(handle)

log()

Forwards to log() function.

log2()

Forwards to log2() function.

max(*dims[, keep_dims])

Forwards to reduce_max() function.

min(*dims[, keep_dims])

Forwards to reduce_min() function.

prod(*dims[, keep_dims])

Forwards to reduce_prod() function.

ravel()

Forwards to ravel() function.

relu()

Forwards to relu() function.

reshape(*shape)

Forwards to reshape() function.

rsqrt()

Forwards to rsqrt() function.

sin()

Forwards to sin() function.

sinh()

Forwards to sinh() function.

softmax()

Forwards to softmax() function.

sqrt()

Forwards to sqrt() function.

squeeze(*axis)

Forwards to squeeze() function.

sum(*dims[, keep_dims])

Forwards to reduce_sum() function.

tan()

Forwards to tan() function.

tanh()

Forwards to tanh() function.

to(dtype[, round_mode])

Forwards to cast() function.

to_ir()

transpose(*axis)

Forwards to transpose() function.

Attributes

T

Transpose a 2D tensor by swapping its dimensions (see transpose()).

dtype

Tensor element type

shape

Tensor shape

size

Number of elements

rank

Number of dimensions

location

Memory location of a tensor