nki.language.trunc — AWS Neuron Documentation (original) (raw)

This document is relevant for: Inf2, Trn1, Trn2

nki.language.trunc#

nki.language.trunc(x, *, dtype=None, mask=None, **kwargs)[source]#

Truncated value of the input, element-wise.

((Similar to numpy.trunc))

The truncated value of the scalar x is the nearest integer i which is closer to zero than x is. In short, the fractional part of the signed number x is discarded.

Parameters:

Returns:

a tile that has truncated values of x.

This document is relevant for: Inf2, Trn1, Trn2