From 6b7c58d24cdd40777ec6cc4a8b8e0b3ad69772df Mon Sep 17 00:00:00 2001 From: Yifan Zhao <yifanz16@illinois.edu> Date: Thu, 3 Dec 2020 20:38:04 -0600 Subject: [PATCH] Rename codegen files --- .../onnx/frontend/{hpvm_codegen.py => codegen_hpvm.py} | 2 +- .../onnx/frontend/{graph_codegen.py => codegen_tensor.py} | 2 +- hpvm/projects/onnx/frontend/main.py | 8 ++++---- .../frontend/{hpvm_template.cpp => template_hpvm.cpp} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename hpvm/projects/onnx/frontend/{hpvm_codegen.py => codegen_hpvm.py} (99%) rename hpvm/projects/onnx/frontend/{graph_codegen.py => codegen_tensor.py} (99%) rename hpvm/projects/onnx/frontend/{hpvm_template.cpp => template_hpvm.cpp} (100%) diff --git a/hpvm/projects/onnx/frontend/hpvm_codegen.py b/hpvm/projects/onnx/frontend/codegen_hpvm.py similarity index 99% rename from hpvm/projects/onnx/frontend/hpvm_codegen.py rename to hpvm/projects/onnx/frontend/codegen_hpvm.py index 9ddc436531..8583e15479 100644 --- a/hpvm/projects/onnx/frontend/hpvm_codegen.py +++ b/hpvm/projects/onnx/frontend/codegen_hpvm.py @@ -7,7 +7,7 @@ import jinja2 from graph_builder import DFG from tensor import WeightTensor -TEMPLATE_FILE = "hpvm_template.cpp" +TEMPLATE_FILE = "template_hpvm.cpp" loader = jinja2.FileSystemLoader(searchpath="./") template_env = jinja2.Environment(loader=loader, trim_blocks=True) template = template_env.get_template(TEMPLATE_FILE) diff --git a/hpvm/projects/onnx/frontend/graph_codegen.py b/hpvm/projects/onnx/frontend/codegen_tensor.py similarity index 99% rename from hpvm/projects/onnx/frontend/graph_codegen.py rename to hpvm/projects/onnx/frontend/codegen_tensor.py index a9db0ad92b..132debc269 100644 --- a/hpvm/projects/onnx/frontend/graph_codegen.py +++ b/hpvm/projects/onnx/frontend/codegen_tensor.py @@ -5,7 +5,7 @@ import os from tensor import WeightTensor from utils import skip_layer -class GraphCodeGen(object): +class TensorCodeGen(object): def __init__(self, dfg, weights_dir, test_data_shape=None): self.program_str = "" self.graph = dfg.graph diff --git a/hpvm/projects/onnx/frontend/main.py b/hpvm/projects/onnx/frontend/main.py index 161b6e8efc..668d5dcdef 100644 --- a/hpvm/projects/onnx/frontend/main.py +++ b/hpvm/projects/onnx/frontend/main.py @@ -31,8 +31,8 @@ def compile( hpvmc: bool, ): from graph_builder import GraphBuilder - from graph_codegen import GraphCodeGen - from hpvm_codegen import HpvmCodeGen + from codegen_tensor import TensorCodeGen + from codegen_hpvm import HpvmCodeGen if opset_version is not None: model = check_version(model, opset_version) @@ -41,8 +41,8 @@ def compile( hpvmCodeGen = HpvmCodeGen(graphBuilder.dfg, output_dir) hpvmCodeGen.compile() else: - graphCodeGen = GraphCodeGen(graphBuilder.dfg, output_dir, input_size) - graphCodeGen.compile() + TensorCodeGen = TensorCodeGen(graphBuilder.dfg, output_dir, input_size) + TensorCodeGen.compile() graphBuilder.dump_weights(output_dir) diff --git a/hpvm/projects/onnx/frontend/hpvm_template.cpp b/hpvm/projects/onnx/frontend/template_hpvm.cpp similarity index 100% rename from hpvm/projects/onnx/frontend/hpvm_template.cpp rename to hpvm/projects/onnx/frontend/template_hpvm.cpp -- GitLab