EnqueueWriteSubBuffer

void tt::tt_metal::v0::EnqueueWriteSubBuffer(CommandQueue &cq, std::variant<std::reference_wrapper<Buffer>, std::shared_ptr<Buffer>> buffer, HostDataType src, const BufferRegion &region, bool blocking)

Writes a specified region of the buffer to the device

Return value: void

Argument

Description

Type

Valid Range

Required

cq

The command queue object which dispatches the command to the hardware

CommandQueue &

Yes

buffer

The device buffer we are writing to

Buffer & or std::shared_ptr<Buffer>

Yes

src

The memory we are writing to the device

HostDataType

Yes

region

The region of the buffer that we are writing to

const BufferRegion &

Yes

blocking

Whether or not this is a blocking operation

bool

Yes

template<typename DType>
void tt::tt_metal::v0::EnqueueWriteSubBuffer(CommandQueue &cq, std::variant<std::reference_wrapper<Buffer>, std::shared_ptr<Buffer>> buffer, std::vector<DType> &src, const BufferRegion &region, bool blocking)

Writes a specified region of the buffer to the device

Return value: void

Argument

Description

Type

Valid Range

Required

cq

The command queue object which dispatches the command to the hardware

CommandQueue &

Yes

buffer

The device buffer we are writing to

Buffer & or std::shared_ptr<Buffer>

Yes

src

The memory we are writing to the device

std::vector<DType>&

Yes

region

The region of the buffer that we are writing to the device

const BufferRegion &

Yes

blocking

Whether or not this is a blocking operation

bool

Yes