Skip to content

Commit 8c26a1b

Browse files
committed
refactor(//core/lowering): register_const_op ->
register_trt_placeholder_ops Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent fa509d9 commit 8c26a1b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Diff for: core/lowering/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cc_library(
1515
srcs = [
1616
"lowering.cpp",
1717
"drop_unused_nodes.cpp",
18-
"register_const_op.cpp"
18+
"register_trt_placeholder_ops.cpp"
1919
],
2020
deps = [
2121
"//core/lowering/passes",

Diff for: core/lowering/register_const_op.cpp renamed to core/lowering/register_trt_placeholder_ops.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ c10::AliasAnalysisKind aliasAnalysisFromSchema() {
77
return c10::AliasAnalysisKind::FROM_SCHEMA;
88
}
99

10-
/// Op marks a Tensor to be conveted from an Torch Tensor
11-
/// to a TRT constant Tensor
12-
RegisterOperators trt_const_op_reg({
10+
RegisterOperators trt_placeholder_ops_reg({
11+
/// Op marks a Tensor to be conveted from an Torch Tensor
12+
/// to a TRT constant Tensor
1313
Operator(
1414
"trt::const(Tensor val) -> Tensor",
1515
[](Stack& stack) {
1616
return 0; //noop
1717
},
18-
aliasAnalysisFromSchema())});
18+
aliasAnalysisFromSchema()),
19+
});
20+
1921

2022
} // namespace jit
2123
} // namespace torch

0 commit comments

Comments
 (0)