Wait until the metal backend finishes its work in the TensorsToImageCalculator.

PiperOrigin-RevId: 516360846
This commit is contained in:
Jiuqiang Tang 2023-03-13 16:53:22 -07:00 committed by Copybara-Service
parent 89857f33a2
commit 57f106e0a7

View File

@ -294,7 +294,7 @@ absl::Status TensorsToImageCalculator::MetalProcess(CalculatorContext* cc) {
threadsPerThreadgroup:threads_per_group];
[compute_encoder endEncoding];
[command_buffer commit];
[command_buffer waitUntilCompleted];
kOutputImage(cc).Send(Image(output));
return absl::OkStatus();
}