Commit e4f58810 by Tianqi Chen Committed by GitHub

[METAL][RUNTIME] Fix bug of memcpy into metal buffer (#428)

parent ab17bf65
...@@ -205,6 +205,7 @@ void MetalWorkspace::CopyDataFromTo(const void* from, ...@@ -205,6 +205,7 @@ void MetalWorkspace::CopyDataFromTo(const void* from,
size:size]; size:size];
[encoder endEncoding]; [encoder endEncoding];
[cb commit]; [cb commit];
[cb waitUntilCompleted];
} else { } else {
memcpy(static_cast<char*>([to_buf contents]) + to_offset, memcpy(static_cast<char*>([to_buf contents]) + to_offset,
static_cast<const char*>(from) + from_offset, static_cast<const char*>(from) + from_offset,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment