Skip to content

Commit

Permalink
remove const of output in tvm generate_project.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueSkyB committed Feb 1, 2024
1 parent 2db7e92 commit 97e1c52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tvm/export_onnx_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def generate_project(template_dir, tar_file, output_dir, input_ndarray, input_sh
with open(os.path.join(output_dir, 'main', 'output_data.h'), 'w') as file:
file.write('#include <tvmgen_default.h>\n')
file.write(f'const size_t output_len = {product};\n')
file.write(f'const static __attribute__((aligned(16))) {output_dtype} output_data[{product}]\n')
file.write(f'static __attribute__((aligned(16))) {output_dtype} output_data[{product}]\n')
file.write('={};\n')

print(f"generated project in: {output_dir}")
Expand Down Expand Up @@ -235,4 +235,4 @@ def debug_onnx_model(target_chip, model_path, img_path):
args = parser.parse_args()

dump_tvm_onnx_project(target_chip=args.target_chip, model_path=args.model_path, img_path=args.img_path, template_path=args.template_path, generated_project_path=args.out_path)
# debug_onnx_model(args.target_chip, args.model_path, args.img_path)
# debug_onnx_model(args.target_chip, args.model_path, args.img_path)

0 comments on commit 97e1c52

Please sign in to comment.