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

This document is relevant for: Inf2, Trn1, Trn2

nki.language.rsqrt#

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

Reciprocal of the square-root of the input, element-wise.

((Similar to torch.rsqrt))

rsqrt(x) = 1 / sqrt(x)

Parameters:

Returns:

a tile that has reciprocal square-root values of x.

This document is relevant for: Inf2, Trn1, Trn2