nki.language.empty_like — AWS Neuron Documentation (original) (raw)
This document is relevant for: Inf2
, Trn1
, Trn2
nki.language.empty_like#
nki.language.empty_like(a, dtype=None, *, buffer=None, name='', **kwargs)[source]#
Create a new tensor with the same shape and type as a given tensor.
((Similar to numpy.empty_like))
Parameters:
- a – the tensor.
- dtype – the data type of the tensor (see Supported Data Types for more information).
- buffer – the specific buffer (ie, sbuf, psum, hbm), defaults to sbuf.
- name – the name of the tensor.
Returns:
a tensor with the same shape and type as a given tensor.
This document is relevant for: Inf2
, Trn1
, Trn2