EnqueueWriteBuffer

template<typename DType>
void tt::tt_metal::v0::EnqueueWriteBuffer(CommandQueue &cq, std::variant<std::reference_wrapper<Buffer>, std::shared_ptr<Buffer>> buffer, std::vector<DType> &src, bool blocking, tt::stl::Span<const SubDeviceId> sub_device_ids = {})

Writes a 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 vector we are writing to the device

vector<DType> &

Yes

blocking

Whether or not this is a blocking operation

bool

Yes

sub_device_ids

The sub-device ids to wait for completion on. If empty, waits for all sub-devices

tt::stl::Span<const uint32_t>

No

void tt::tt_metal::v0::EnqueueWriteBuffer(CommandQueue &cq, std::variant<std::reference_wrapper<Buffer>, std::shared_ptr<Buffer>> buffer, HostDataType src, bool blocking, tt::stl::Span<const SubDeviceId> sub_device_ids = {})

Writes a 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

blocking

Whether or not this is a blocking operation

bool

Yes

sub_device_ids

The sub-device ids to wait for completion on. If empty, waits for all sub-devices

tt::stl::Span<const uint32_t>

No