8000 avoiding unnecessary copying · pytorch/pytorch@691c5d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 691c5d5

Browse files
avoiding unnecessary copying
Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
1 parent 6c662e5 commit 691c5d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aten/src/ATen/native/mps/operations/Attention.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
t = x.unsqueeze(0);
2828
squeezed = true;
2929
}
30-
return {t, squeezed};
30+
return {std::move(t), squeezed};
3131
}
3232

3333
std::tuple<Tensor, Tensor> _scaled_dot_product_attention_math_mps(const Tensor& query,

0 commit comments

Comments
 (0)
0