Fix normalization check_input (#1452)

This commit is contained in:
Angelos Katharopoulos
2024-10-03 13:26:56 -07:00
committed by GitHub
parent 5900e3249f
commit d878015228
11 changed files with 147 additions and 51 deletions

View File

@@ -914,10 +914,12 @@ void Convolution::eval_gpu(const std::vector<array>& inputs, array& out) {
}
// Clear copies
if (copies.size() > 0) {
if (!copies.empty()) {
auto command_buffer = d.get_command_buffer(s.index);
command_buffer->addCompletedHandler(
[copies](MTL::CommandBuffer*) mutable { copies.clear(); });
[copies = std::move(copies)](MTL::CommandBuffer*) mutable {
copies.clear();
});
}
}