From 4c02102d3b87742a534327bc82a3b0234c2ed941 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 9 Sep 2019 10:34:46 +0900 Subject: [PATCH] [moco-tf] Introduce shape_inference_done (#7276) This will introduce shape_inference_done() method in FixShapeTransform as a helper function not to directly access ShapeInferenceData annotation to check shape inference is done or not Signed-off-by: SaeHie Park --- compiler/moco-tf/src/Transforms/FixShapeTransform.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp index f3e850b..7f90f6e 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -43,6 +43,16 @@ namespace using namespace moco::tf; /** + * @brief Return true if node has shape inference data for checking shape + * inference is done or not + */ +bool shape_inference_done(const loco::Node *node) +{ + auto shapedata = node->annot(); + return (shapedata != nullptr); +} + +/** * @brief Copy ShapeInferenceData values from src to dst * * @note T can be ShapeInferenceData or loco::Node based class having shape -- 2.7.4