Skip to content

Commit

Permalink
[metal] Support memcpy_internal via buffer_copy
Browse files Browse the repository at this point in the history
There isn't a standalone test for this yet but will try to add one in
the followup PRs.
  • Loading branch information
Ailing Zhang committed Jun 27, 2022
1 parent 65f8e36 commit 4ca72e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion taichi/backends/metal/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ class DeviceImpl : public Device, public AllocToMTLBufferMapper {
}

void memcpy_internal(DevicePtr dst, DevicePtr src, uint64_t size) override {
TI_NOT_IMPLEMENTED;
Stream *stream = get_compute_stream();
std::unique_ptr<CommandList> cmd = stream->new_command_list();
cmd->buffer_copy(dst, src, size);
stream->submit_synced(cmd.get());
}

Stream *get_compute_stream() override {
Expand Down

0 comments on commit 4ca72e7

Please sign in to comment.