From 57b49444bc828236e778e57b8ad6fbc5d5dda6cf Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Tue, 19 Jan 2021 02:06:32 -0600
Subject: [PATCH] Rename frontend templates so the formatter don't format them

---
 hpvm/projects/onnx_frontend/frontend/codegen_hpvm.py            | 2 +-
 hpvm/projects/onnx_frontend/frontend/codegen_tensor.py          | 2 +-
 .../frontend/{template_hpvm.cpp => template_hpvm.cpp.in}        | 0
 .../frontend/{template_tensor.cpp => template_tensor.cpp.in}    | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename hpvm/projects/onnx_frontend/frontend/{template_hpvm.cpp => template_hpvm.cpp.in} (100%)
 rename hpvm/projects/onnx_frontend/frontend/{template_tensor.cpp => template_tensor.cpp.in} (100%)

diff --git a/hpvm/projects/onnx_frontend/frontend/codegen_hpvm.py b/hpvm/projects/onnx_frontend/frontend/codegen_hpvm.py
index 1a130fc30b..fbdf0aea08 100644
--- a/hpvm/projects/onnx_frontend/frontend/codegen_hpvm.py
+++ b/hpvm/projects/onnx_frontend/frontend/codegen_hpvm.py
@@ -7,7 +7,7 @@ import jinja2
 from .graph_builder import DFG
 from .graph_ir import DFGNode, TensorNode, WeightTensor
 
-TEMPLATE_FILE = "template_hpvm.cpp"
+TEMPLATE_FILE = "template_hpvm.cpp.in"
 loader = jinja2.FileSystemLoader(searchpath=Path(__file__).parent)
 template_env = jinja2.Environment(loader=loader, trim_blocks=True)
 template = template_env.get_template(TEMPLATE_FILE)
diff --git a/hpvm/projects/onnx_frontend/frontend/codegen_tensor.py b/hpvm/projects/onnx_frontend/frontend/codegen_tensor.py
index c4660b24ba..44058b0ac4 100644
--- a/hpvm/projects/onnx_frontend/frontend/codegen_tensor.py
+++ b/hpvm/projects/onnx_frontend/frontend/codegen_tensor.py
@@ -6,7 +6,7 @@ import jinja2
 from .codegen_hpvm import CodeGen
 from .graph_ir import DFGNode, TensorNode
 
-TEMPLATE_FILE = "template_tensor.cpp"
+TEMPLATE_FILE = "template_tensor.cpp.in"
 loader = jinja2.FileSystemLoader(searchpath=Path(__file__).parent)
 template_env = jinja2.Environment(loader=loader, trim_blocks=True)
 template = template_env.get_template(TEMPLATE_FILE)
diff --git a/hpvm/projects/onnx_frontend/frontend/template_hpvm.cpp b/hpvm/projects/onnx_frontend/frontend/template_hpvm.cpp.in
similarity index 100%
rename from hpvm/projects/onnx_frontend/frontend/template_hpvm.cpp
rename to hpvm/projects/onnx_frontend/frontend/template_hpvm.cpp.in
diff --git a/hpvm/projects/onnx_frontend/frontend/template_tensor.cpp b/hpvm/projects/onnx_frontend/frontend/template_tensor.cpp.in
similarity index 100%
rename from hpvm/projects/onnx_frontend/frontend/template_tensor.cpp
rename to hpvm/projects/onnx_frontend/frontend/template_tensor.cpp.in
-- 
GitLab