Skip to content

Commit

Permalink
[inductor] Move inductor ops to CompositeExplicitAutograd (pytorch#11…
Browse files Browse the repository at this point in the history
…1702)

Relands pytorch#111274
Pull Request resolved: pytorch#111702
Approved by: https://github.com/voznesenskym
ghstack dependencies: pytorch#111700, pytorch#111701
  • Loading branch information
jansel authored and xuhancn committed Nov 8, 2023
1 parent 5b1dbfe commit 44bdbe9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions torch/csrc/inductor/inductor_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ static void accumulate_grad_(const Tensor& variable, const Tensor& new_grad) {
TORCH_LIBRARY_FRAGMENT(inductor, m) {
m.def(
"_mm_plus_mm(Tensor a, Tensor b, Tensor c, Tensor d, Tensor(t!) out) -> Tensor(t!)",
_mm_plus_mm);
dispatch(c10::DispatchKey::CompositeExplicitAutograd, _mm_plus_mm));
m.def(
"_reinterpret_tensor(Tensor self, int[] size, int[] stride, int offset_increment=0) -> Tensor",
_reinterpret_tensor);
dispatch(
c10::DispatchKey::CompositeExplicitAutograd, _reinterpret_tensor));
m.def(
"accumulate_grad_(Tensor variable, Tensor new_grad) -> ()",
dispatch(c10::DispatchKey::CompositeExplicitAutograd, accumulate_grad_));
Expand Down

0 comments on commit 44bdbe9

Please sign in to comment.