From 911bc752488f10103e5676a0991e34bb1458f319 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: Thu, 24 Oct 2019 19:18:46 +0900 Subject: [PATCH] [moco] Add TFDataLayout and TFPadding to IR (#8453) This will add TFDataLayout and TFPadding type into IR Signed-off-by: SaeHie Park --- compiler/moco/lang/include/moco/IR/TFDataLayout.h | 29 +++++++++++++++++++++++ compiler/moco/lang/include/moco/IR/TFNodeDecl.h | 7 +++--- compiler/moco/lang/include/moco/IR/TFPadding.h | 29 +++++++++++++++++++++++ 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 compiler/moco/lang/include/moco/IR/TFDataLayout.h create mode 100644 compiler/moco/lang/include/moco/IR/TFPadding.h diff --git a/compiler/moco/lang/include/moco/IR/TFDataLayout.h b/compiler/moco/lang/include/moco/IR/TFDataLayout.h new file mode 100644 index 0000000..f0edfac --- /dev/null +++ b/compiler/moco/lang/include/moco/IR/TFDataLayout.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __MOCO_IR_TFDATALAYOUT_H__ +#define __MOCO_IR_TFDATALAYOUT_H__ + +#include + +namespace moco +{ + +using TFDataLayout = std::string; + +} // namespace moco + +#endif // __MOCO_IR_TFDATALAYOUT_H__ diff --git a/compiler/moco/lang/include/moco/IR/TFNodeDecl.h b/compiler/moco/lang/include/moco/IR/TFNodeDecl.h index 1b106a0..5665988 100644 --- a/compiler/moco/lang/include/moco/IR/TFNodeDecl.h +++ b/compiler/moco/lang/include/moco/IR/TFNodeDecl.h @@ -23,15 +23,14 @@ #include "moco/IR/TFOpcode.h" #include "moco/IR/TFNodeVisitor.forward.h" +#include "moco/IR/TFDataLayout.h" +#include "moco/IR/TFPadding.h" + #include namespace moco { -/// @note Below alias may be introduced as separate class -using TFDataLayout = std::string; -using TFPadding = std::string; - struct TFNode : public loco::Node { virtual ~TFNode() = default; diff --git a/compiler/moco/lang/include/moco/IR/TFPadding.h b/compiler/moco/lang/include/moco/IR/TFPadding.h new file mode 100644 index 0000000..c75b3f2 --- /dev/null +++ b/compiler/moco/lang/include/moco/IR/TFPadding.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __MOCO_IR_TFPADDING_H__ +#define __MOCO_IR_TFPADDING_H__ + +#include + +namespace moco +{ + +using TFPadding = std::string; + +} // namespace moco + +#endif // __MOCO_IR_TFPADDING_H__ -- 2.7.4