From 9022b1ad8fbd889e85ee6208554475c0e125a3c8 Mon Sep 17 00:00:00 2001 From: auphelia <jakobapk@web.de> Date: Wed, 8 Jan 2020 16:54:52 +0000 Subject: [PATCH] [Code generation trafos] Added underscore to temporary directory name --- src/finn/transformation/fpgadataflow/codegen_ipgen.py | 2 +- src/finn/transformation/fpgadataflow/codegen_npysim.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/finn/transformation/fpgadataflow/codegen_ipgen.py b/src/finn/transformation/fpgadataflow/codegen_ipgen.py index f5739e2ed..0159873a3 100644 --- a/src/finn/transformation/fpgadataflow/codegen_ipgen.py +++ b/src/finn/transformation/fpgadataflow/codegen_ipgen.py @@ -18,7 +18,7 @@ def _codegen_single_node(node, model, fpgapart, clk): # ensure that there is a directory if code_gen_dir == "" or not os.path.isdir(code_gen_dir): code_gen_dir = tmp.mkdtemp( - prefix="code_gen_ipgen" + str(node.op_type) + "_" + prefix="code_gen_ipgen_" + str(node.op_type) + "_" ) inst.set_nodeattr("code_gen_dir_ipgen", code_gen_dir) # ensure that there is generated code inside the dir diff --git a/src/finn/transformation/fpgadataflow/codegen_npysim.py b/src/finn/transformation/fpgadataflow/codegen_npysim.py index 45a21b8b1..0d5a42dfe 100644 --- a/src/finn/transformation/fpgadataflow/codegen_npysim.py +++ b/src/finn/transformation/fpgadataflow/codegen_npysim.py @@ -17,7 +17,9 @@ def _codegen_single_node(node, model): code_gen_dir = inst.get_nodeattr("code_gen_dir_npysim") # ensure that there is a directory if code_gen_dir == "" or not os.path.isdir(code_gen_dir): - code_gen_dir = tmp.mkdtemp(prefix="code_gen_npysim" + str(node.op_type) + "_") + code_gen_dir = tmp.mkdtemp( + prefix="code_gen_npysim_" + str(node.op_type) + "_" + ) inst.set_nodeattr("code_gen_dir_npysim", code_gen_dir) # ensure that there is generated code inside the dir inst.code_generation_npysim(model) -- GitLab