From f4af2b98c61bbc36562cd31a5f5e9e96fed73d20 Mon Sep 17 00:00:00 2001 From: Chunyuan WU Date: Thu, 2 Sep 2021 08:02:37 +0800 Subject: [PATCH] revert onednn update (#189) * Revert "[LLGA] remove infer_shape due to backend change (#176)" This reverts commit c1fe85413054aea2430465e5498409ac8639d528. * Revert "[LLGA] ww35 update backend (#175)" This reverts commit eccafbe13b5686b98a4ca23c23e1406bc4f007f4. --- third_party/llga | 2 +- torch_ipex/csrc/jit/codegen/onednn/kernel.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/third_party/llga b/third_party/llga index 5f36fafc3..1c0bff14e 160000 --- a/third_party/llga +++ b/third_party/llga @@ -1 +1 @@ -Subproject commit 5f36fafc3547b233f0f3c617ef917d729354aec3 +Subproject commit 1c0bff14e182864e835b1693db7d08c6f7e738b6 diff --git a/torch_ipex/csrc/jit/codegen/onednn/kernel.cpp b/torch_ipex/csrc/jit/codegen/onednn/kernel.cpp index dd64d335b..91a437a74 100644 --- a/torch_ipex/csrc/jit/codegen/onednn/kernel.cpp +++ b/torch_ipex/csrc/jit/codegen/onednn/kernel.cpp @@ -70,10 +70,14 @@ ArgSpecs LlgaKernel::specializeInputSpecs(const TensorArgs &inputs) const { ArgSpecs LlgaKernel::specializeOutputSpecs(const partition &partition, const ArgSpecs &inputSpecs) const { + auto inputs = fmap(inputSpecs, toLogicalTensor); + auto outputs = fmap(graph_->outputs(), toLogicalTensor); + partition.infer_shape(inputs, outputs); + ArgSpecs outputSpecs; outputSpecs.reserve(nOutputs_); for (size_t i = 0; i < nOutputs_; i++) { - auto spec = ArgSpec(graph_->outputs()[i]); + auto spec = ArgSpec(outputs[i]); if (spec.is_quantized()) spec = getQuantizedSpec(spec, i);