Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions backends/apple/metal/runtime/shims/et_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,16 @@ int metal_copy_memory(void* dst, const void* src, size_t nbytes, bool src_is_dev

// Commit methods
void ETMetalStream::commit() {
if (enableCommitAndContinue_ && commandBuffer_) {
// Use commit-and-continue for better performance
commitAndContinue();
} else {
flush();
if (!commandBuffer_) {
ET_LOG(Error, "ETMetalStream::commit: No command buffer to commit");
return;
}

[commandBuffer_ commit];
ET_LOG(Debug, "ETMetalStream::commit: Committed buffer %p", commandBuffer_);

[commandBuffer_ release];
commandBuffer_ = nil;
}

void ETMetalStream::commitAndWait() {
Expand Down
Loading
Loading