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 9ddc436531e7a7a998a1ada732485ca0578e76b2..8583e15479fe01ee906bf6b0806af382b90b7886 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 a9db0ad92b40e541afcc9b71d13cb0da233b2c9e..132debc269e8be8259d47d74f4f4e906c600e81a 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 161b6e8efcac0128142e2475a67fdc81340d05e4..668d5dcdef28d7fbe85a84fe466c5f4f91e273a7 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