From 242c24d2ae063191fdf12727615f201692d7b1ff Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <maltanar@gmail.com> Date: Wed, 1 Jul 2020 18:30:10 +0100 Subject: [PATCH] [Test] ensure all tests use own export filename for parallel tests --- tests/brevitas/test_brevitas_avg_pool_export.py | 2 +- tests/brevitas/test_brevitas_cnv.py | 2 +- .../brevitas/test_brevitas_non_scaled_QuantHardTanh_export.py | 2 +- tests/brevitas/test_brevitas_relu_act_export.py | 2 +- tests/brevitas/test_brevitas_scaled_QHardTanh_export.py | 2 +- tests/core/test_modelwrapper.py | 2 +- tests/custom_op/test_xnorpopcountmatmul.py | 2 +- tests/fpgadataflow/test_convert_to_hls_layers_cnv.py | 2 +- tests/fpgadataflow/test_convert_to_hls_layers_fc.py | 3 +-- tests/transformation/test_conv_lowering.py | 2 +- tests/transformation/test_fold_constants.py | 2 +- tests/transformation/test_infer_data_layouts.py | 2 +- tests/transformation/test_infer_datatypes.py | 2 +- tests/transformation/test_linear_past_eltwise.py | 2 +- tests/transformation/test_sign_to_thres.py | 3 +-- tests/transformation/test_topk_insert.py | 2 +- 16 files changed, 16 insertions(+), 18 deletions(-) diff --git a/tests/brevitas/test_brevitas_avg_pool_export.py b/tests/brevitas/test_brevitas_avg_pool_export.py index 24854a215..e78812b21 100644 --- a/tests/brevitas/test_brevitas_avg_pool_export.py +++ b/tests/brevitas/test_brevitas_avg_pool_export.py @@ -16,7 +16,7 @@ import finn.core.onnx_exec as oxe import pytest -export_onnx_path = "test_avg_pool.onnx" +export_onnx_path = "test_brevitas_avg_pool_export.onnx" @pytest.mark.parametrize("kernel_size", [2, 3]) diff --git a/tests/brevitas/test_brevitas_cnv.py b/tests/brevitas/test_brevitas_cnv.py index c04e16ad1..f91ca600d 100644 --- a/tests/brevitas/test_brevitas_cnv.py +++ b/tests/brevitas/test_brevitas_cnv.py @@ -42,7 +42,7 @@ from finn.transformation.general import GiveUniqueNodeNames from finn.transformation.double_to_single_float import DoubleToSingleFloat from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_cnv.onnx" +export_onnx_path = "test_brevitas_cnv.onnx" @pytest.mark.parametrize("abits", [1, 2]) diff --git a/tests/brevitas/test_brevitas_non_scaled_QuantHardTanh_export.py b/tests/brevitas/test_brevitas_non_scaled_QuantHardTanh_export.py index b66348a99..9c7296b7b 100644 --- a/tests/brevitas/test_brevitas_non_scaled_QuantHardTanh_export.py +++ b/tests/brevitas/test_brevitas_non_scaled_QuantHardTanh_export.py @@ -12,7 +12,7 @@ import finn.core.onnx_exec as oxe from finn.transformation.infer_shapes import InferShapes from brevitas.core.quant import QuantType -export_onnx_path = "test_act.onnx" +export_onnx_path = "test_brevitas_non_scaled_QuantHardTanh_export.onnx" @pytest.mark.parametrize("abits", [1, 2, 4, 8]) diff --git a/tests/brevitas/test_brevitas_relu_act_export.py b/tests/brevitas/test_brevitas_relu_act_export.py index c5ddad12c..77974dacb 100644 --- a/tests/brevitas/test_brevitas_relu_act_export.py +++ b/tests/brevitas/test_brevitas_relu_act_export.py @@ -12,7 +12,7 @@ from finn.core.modelwrapper import ModelWrapper import finn.core.onnx_exec as oxe from finn.transformation.infer_shapes import InferShapes -export_onnx_path = "test_act.onnx" +export_onnx_path = "test_brevitas_relu_act_export.onnx" @pytest.mark.parametrize("abits", [1, 2, 4, 8]) diff --git a/tests/brevitas/test_brevitas_scaled_QHardTanh_export.py b/tests/brevitas/test_brevitas_scaled_QHardTanh_export.py index d499f1517..e0ec82ebe 100644 --- a/tests/brevitas/test_brevitas_scaled_QHardTanh_export.py +++ b/tests/brevitas/test_brevitas_scaled_QHardTanh_export.py @@ -12,7 +12,7 @@ from finn.core.modelwrapper import ModelWrapper import finn.core.onnx_exec as oxe from finn.transformation.infer_shapes import InferShapes -export_onnx_path = "test_act.onnx" +export_onnx_path = "test_brevitas_scaled_QHardTanh_export.onnx" @pytest.mark.parametrize("abits", [2, 4, 8]) diff --git a/tests/core/test_modelwrapper.py b/tests/core/test_modelwrapper.py index 5fa9b23ba..0fb7ae42f 100644 --- a/tests/core/test_modelwrapper.py +++ b/tests/core/test_modelwrapper.py @@ -36,7 +36,7 @@ import finn.core.data_layout as DataLayout from finn.core.modelwrapper import ModelWrapper from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_lfc.onnx" +export_onnx_path = "test_modelwrapper.onnx" def test_modelwrapper(): diff --git a/tests/custom_op/test_xnorpopcountmatmul.py b/tests/custom_op/test_xnorpopcountmatmul.py index 37d9b7e59..745b782d4 100644 --- a/tests/custom_op/test_xnorpopcountmatmul.py +++ b/tests/custom_op/test_xnorpopcountmatmul.py @@ -47,7 +47,7 @@ from finn.transformation.infer_shapes import InferShapes from finn.transformation.streamline.sign_to_thres import ConvertSignToThres from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_lfc.onnx" +export_onnx_path = "test_xnorpopcountmatmul.onnx" def test_xnorpopcountmatmul(): diff --git a/tests/fpgadataflow/test_convert_to_hls_layers_cnv.py b/tests/fpgadataflow/test_convert_to_hls_layers_cnv.py index 48803c961..20e3ee08d 100644 --- a/tests/fpgadataflow/test_convert_to_hls_layers_cnv.py +++ b/tests/fpgadataflow/test_convert_to_hls_layers_cnv.py @@ -51,7 +51,7 @@ from finn.transformation.fpgadataflow.compile_cppsim import CompileCppSim from finn.transformation.fpgadataflow.set_exec_mode import SetExecMode from finn.custom_op.registry import getCustomOp -export_onnx_path_cnv = "test_output_cnv.onnx" +export_onnx_path_cnv = "test_convert_to_hls_layers_cnv.onnx" @pytest.mark.vivado diff --git a/tests/fpgadataflow/test_convert_to_hls_layers_fc.py b/tests/fpgadataflow/test_convert_to_hls_layers_fc.py index e261a3114..d77065ad9 100644 --- a/tests/fpgadataflow/test_convert_to_hls_layers_fc.py +++ b/tests/fpgadataflow/test_convert_to_hls_layers_fc.py @@ -52,8 +52,7 @@ from finn.transformation.streamline.round_thresholds import RoundAndClipThreshol from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_tfc.onnx" -export_onnx_path_cnv = "test_output_cnv.onnx" +export_onnx_path = "test_convert_to_hls_layers_fc.onnx" @pytest.mark.vivado diff --git a/tests/transformation/test_conv_lowering.py b/tests/transformation/test_conv_lowering.py index 73891ded1..16c574b29 100644 --- a/tests/transformation/test_conv_lowering.py +++ b/tests/transformation/test_conv_lowering.py @@ -41,7 +41,7 @@ from finn.transformation.lower_convs_to_matmul import LowerConvsToMatMul from finn.transformation.double_to_single_float import DoubleToSingleFloat import finn.core.onnx_exec as oxe -export_onnx_path = "test_output_cnv.onnx" +export_onnx_path = "test_conv_lowering.onnx" def test_conv_lowering_cnv_w1a1(): diff --git a/tests/transformation/test_fold_constants.py b/tests/transformation/test_fold_constants.py index 685c14a98..a976ffd62 100644 --- a/tests/transformation/test_fold_constants.py +++ b/tests/transformation/test_fold_constants.py @@ -40,7 +40,7 @@ from finn.transformation.fold_constants import FoldConstants from finn.transformation.infer_shapes import InferShapes from finn.util.test import get_test_model_untrained -export_onnx_path = "test_output_lfc.onnx" +export_onnx_path = "test_fold_constants.onnx" def test_const_folding(): diff --git a/tests/transformation/test_infer_data_layouts.py b/tests/transformation/test_infer_data_layouts.py index fccc7813d..d6d992004 100644 --- a/tests/transformation/test_infer_data_layouts.py +++ b/tests/transformation/test_infer_data_layouts.py @@ -44,7 +44,7 @@ import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls from finn.transformation.infer_data_layouts import InferDataLayouts import finn.core.data_layout as DataLayout -export_onnx_path_cnv = "test_output_cnv.onnx" +export_onnx_path_cnv = "test_infer_data_layouts.onnx" def test_infer_data_layouts(): diff --git a/tests/transformation/test_infer_datatypes.py b/tests/transformation/test_infer_datatypes.py index e3db40289..097ae03f6 100644 --- a/tests/transformation/test_infer_datatypes.py +++ b/tests/transformation/test_infer_datatypes.py @@ -38,7 +38,7 @@ from finn.transformation.infer_datatypes import InferDataTypes from finn.transformation.infer_shapes import InferShapes from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_lfc.onnx" +export_onnx_path = "test_infer_datatypes.onnx" def test_infer_datatypes(): diff --git a/tests/transformation/test_linear_past_eltwise.py b/tests/transformation/test_linear_past_eltwise.py index b77f59779..4cff5e5e1 100644 --- a/tests/transformation/test_linear_past_eltwise.py +++ b/tests/transformation/test_linear_past_eltwise.py @@ -41,7 +41,7 @@ from finn.transformation.double_to_single_float import DoubleToSingleFloat import pytest -export_onnx_path = "test_scalar_past_eltwise.onnx" +export_onnx_path = "test_linear_past_eltwise.onnx" # construct a synthetic graph to test: # topk insertion, topk conversion to hls, add conversion to hls diff --git a/tests/transformation/test_sign_to_thres.py b/tests/transformation/test_sign_to_thres.py index b10840df3..a92f839e5 100644 --- a/tests/transformation/test_sign_to_thres.py +++ b/tests/transformation/test_sign_to_thres.py @@ -40,8 +40,7 @@ from finn.transformation.infer_shapes import InferShapes from finn.transformation.streamline import ConvertSignToThres from finn.util.test import get_test_model_trained -export_onnx_path = "test_output_lfc.onnx" -transformed_onnx_path = "test_output_lfc_transformed.onnx" +export_onnx_path = "test_sign_to_thres.onnx" def test_sign_to_thres(): diff --git a/tests/transformation/test_topk_insert.py b/tests/transformation/test_topk_insert.py index 1af0f255d..a18e63384 100644 --- a/tests/transformation/test_topk_insert.py +++ b/tests/transformation/test_topk_insert.py @@ -18,7 +18,7 @@ from pkgutil import get_data import pytest -export_onnx_path = "test_output_lfc.onnx" +export_onnx_path = "test_topk_insert.onnx" @pytest.mark.parametrize("k", [1, 5, 10]) -- GitLab