nki.isa.tensor_copy_dynamic_dst#
- nki.isa.tensor_copy_dynamic_dst(dst, src, engine=engine.unknown, name=None)[source]#
Create a copy of
srctile within NeuronCore on-chip SRAMs using Vector or Scalar or GpSimd Engine, withdstlocated at a dynamic offset within each partition.Both source and destination tiles can be in either SBUF or PSUM.
The source and destination tiles must also have the same number of partitions and the same number of elements per partition.
The dynamic offset must be a scalar value resided in SBUF. If you have a list of dynamic offsets for scattering tiles in SBUF/PSUM, you may loop over each offset and call
tensor_copy_dynamic_dstonce per offset.- Parameters:
dst – the destination of copy, must be a tile in SBUF of PSUM that is dynamically indexed within each dimension.
src – the source of copy, must be a tile in SBUF or PSUM.
engine – (optional) the engine to use for the operation: nki.isa.vector_engine, nki.isa.gpsimd_engine, nki.isa.scalar_engine or nki.isa.unknown_engine (default, let compiler select best engine).