Skip to content

Commit ebfa927

Browse files
jiatongzhoufacebook-github-bot
authored andcommitted
Move prim::layout for lite jit (pytorch#53781)
Summary: Pull Request resolved: pytorch#53781 needed for running noise suppression model in lite interpreter Test Plan: run model Reviewed By: linbinyu Differential Revision: D26967227 fbshipit-source-id: 19677fc796f1fb4423ebb11b5ffd9df5870a39cf
1 parent 3bd250f commit ebfa927

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

torch/csrc/jit/runtime/register_prim_ops.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ RegisterOperators reg(
106106
push(stack, a.cpu());
107107
},
108108
aliasAnalysisFromSchema()),
109+
Operator(
110+
"prim::layout(Tensor a) -> int",
111+
[](Stack* stack) {
112+
at::Tensor a;
113+
pop(stack, a);
114+
push(stack, a.layout());
115+
},
116+
aliasAnalysisFromSchema()),
109117
Operator(
110118
prim::tolist,
111119
// This operator has to be unschematized because the return type

torch/csrc/jit/runtime/register_prim_ops_fulljit.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,6 @@ RegisterOperators reg(
333333
}
334334
},
335335
aliasAnalysisFromSchema()),
336-
Operator(
337-
"prim::layout(Tensor a) -> int",
338-
[](Stack* stack) {
339-
at::Tensor a;
340-
pop(stack, a);
341-
push(stack, a.layout());
342-
},
343-
aliasAnalysisFromSchema()),
344336
Operator(
345337
"prim::index(Device self) -> int?",
346338
[](Stack* stack) {

0 commit comments

Comments
 (0)