From fbe7133b5842a55589e097c8b045ceb08cb346b2 Mon Sep 17 00:00:00 2001 From: Don Jang Date: Thu, 26 Aug 2021 08:08:53 -0700 Subject: [PATCH] [Static Runtime] Disable out variant of aten::clone (#63980) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63980 The out variant implementation of `aten::clone` causes a crash, which needs further investigation. This change disables it until the problem gets fixed. Note that `inline_cvr` doesn't use `aten::clone` as of now, so no perf implication: https://www.internalfb.com/phabricator/paste/view/P446858755?lines=121 Test Plan: N/A Reviewed By: hlu1 Differential Revision: D30544149 fbshipit-source-id: facb334d67473f622b36862fbdb2633358556fdf --- torch/csrc/jit/runtime/static/ops.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/torch/csrc/jit/runtime/static/ops.cpp b/torch/csrc/jit/runtime/static/ops.cpp index 140fdf1..4d34ed9 100644 --- a/torch/csrc/jit/runtime/static/ops.cpp +++ b/torch/csrc/jit/runtime/static/ops.cpp @@ -601,11 +601,12 @@ REGISTER_OPERATOR_FUNCTOR(aten::logit, aten_logit, [](Node* n) -> SROperator { }; }); +// TODO(T98923825): Uncomment this once the bug in this gets fixed. +/* REGISTER_OPERATOR_FUNCTOR(aten::clone, aten_clone, [](Node* n) -> SROperator { if (!n->matches(torch::schema( - "aten::clone(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor"))) { - LogAndDumpSchema(n); - return nullptr; + "aten::clone(Tensor self, *, MemoryFormat? memory_format=None) -> +Tensor"))) { LogAndDumpSchema(n); return nullptr; } return [](ProcessedNode* p_node) { const auto& src = p_node->Input(0).toTensor(); @@ -631,6 +632,8 @@ REGISTER_OPERATOR_FUNCTOR(aten::clone, aten_clone, [](Node* n) -> SROperator { at::native::copy_(out_t, src, false); }; }); +*/ + REGISTER_OPERATOR_FUNCTOR( quantized::embedding_bag_byte_rowwise_offsets, quantized_embedding_bag_byte_rowwise_offsets, -- 2.7.4