Skip to content

Commit

Permalink
refactor(//core/lowering): register_const_op ->
Browse files Browse the repository at this point in the history
register_trt_placeholder_ops

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed May 26, 2020
1 parent fa509d9 commit 8c26a1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/lowering/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cc_library(
srcs = [
"lowering.cpp",
"drop_unused_nodes.cpp",
"register_const_op.cpp"
"register_trt_placeholder_ops.cpp"
],
deps = [
"//core/lowering/passes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ c10::AliasAnalysisKind aliasAnalysisFromSchema() {
return c10::AliasAnalysisKind::FROM_SCHEMA;
}

/// Op marks a Tensor to be conveted from an Torch Tensor
/// to a TRT constant Tensor
RegisterOperators trt_const_op_reg({
RegisterOperators trt_placeholder_ops_reg({
/// Op marks a Tensor to be conveted from an Torch Tensor
/// to a TRT constant Tensor
Operator(
"trt::const(Tensor val) -> Tensor",
[](Stack& stack) {
return 0; //noop
},
aliasAnalysisFromSchema())});
aliasAnalysisFromSchema()),
});


} // namespace jit
} // namespace torch

0 comments on commit 8c26a1b

Please sign in to comment.