def get_configurations_x86_64_avx(): cpu_name = "x86_avx" use_fpga = "disable" test_cases = [ { 'hard_quantize': True, 'threshold_skipping': True }, { 'hard_quantize': True, 'threshold_skipping': False }, { 'hard_quantize': False, 'threshold_skipping': False }, ] configurations = get_configurations_by_architecture( test_cases, cpu_name, use_fpga) additional_test_configuration = updated_dict( dict_codegen_classification(cpu_name, use_fpga), {'use_run_test_script': True}) additional_test_cases = [ { 'input_name': 'raw_image.png', 'test_level': TEST_LEVEL_FUTURE_TARGET }, { 'input_name': 'preprocessed_image.npy', 'from_npy': True }, ] configurations.extend( get_configurations_by_test_cases(additional_test_cases, additional_test_configuration)) return enumerate(configurations)
def get_configurations_by_test_cases(test_cases, configuration): return [updated_dict(configuration, test_case) for test_case in test_cases]
def get_configurations(): configurations = [ # Classification / x86 dict_codegen_classification_x86(), updated_dict(dict_codegen_classification_x86(), {'hard_quantize': True}), updated_dict( dict_codegen_classification_x86(), { 'hard_quantize': True, "input_name": 'raw_image.png', "use_run_test_script": True, "test_level": TEST_LEVEL_FUTURE_TARGET }), updated_dict( dict_codegen_classification_x86(), { 'hard_quantize': True, "input_name": 'preprocessed_image.npy', "use_run_test_script": True, "from_npy": True }), # Classification group convolution / x86 dict_codegen_group_conv_classification_x86(), updated_dict(dict_codegen_group_conv_classification_x86(), {'hard_quantize': True}), dict_codegen_classification_cpu_hq_ts(), # Detection / x86 dict_codegen_object_detection_x86(), updated_dict(dict_codegen_object_detection_x86(), {'hard_quantize': True}), updated_dict(dict_codegen_object_detection_x86(), { 'hard_quantize': True, 'threshold_skipping': True }), # Segmentation / x86 dict_codegen_segmentation_x86(), updated_dict(dict_codegen_segmentation_x86(), {'hard_quantize': True}), updated_dict(dict_codegen_segmentation_x86(), { 'hard_quantize': True, 'threshold_skipping': True }), # Classification FPGA dict_codegen_classification_fpga(), updated_dict(dict_codegen_classification_fpga(), { 'cache_dma': True, 'threshold_skipping': False }), updated_dict(dict_codegen_classification_fpga(), { 'cache_dma': False, 'threshold_skipping': True }), updated_dict(dict_codegen_classification_fpga(), { 'cache_dma': True, 'threshold_skipping': True }), # Detection on FPGA dict_codegen_object_detection_fpga(), updated_dict(dict_codegen_object_detection_fpga(), { 'cache_dma': True, 'threshold_skipping': False }), updated_dict(dict_codegen_object_detection_fpga(), { 'cache_dma': False, 'threshold_skipping': True }), updated_dict(dict_codegen_object_detection_fpga(), { 'cache_dma': True, 'threshold_skipping': True }), # Detection WiderFace on FPGA dict_codegen_object_detection_widerface_fpga(), updated_dict(dict_codegen_object_detection_widerface_fpga(), { 'cache_dma': False, 'threshold_skipping': True }), updated_dict(dict_codegen_object_detection_widerface_fpga(), { 'cache_dma': True, 'threshold_skipping': False }), updated_dict(dict_codegen_object_detection_widerface_fpga(), { 'cache_dma': True, 'threshold_skipping': True }), # Detection WiderFace 1x1 on FPGA dict_codegen_object_detection_widerface_1x1_fpga(), updated_dict(dict_codegen_object_detection_widerface_1x1_fpga(), { 'cache_dma': False, 'threshold_skipping': True }), updated_dict(dict_codegen_object_detection_widerface_1x1_fpga(), { 'cache_dma': True, 'threshold_skipping': False }), updated_dict(dict_codegen_object_detection_widerface_1x1_fpga(), { 'cache_dma': True, 'threshold_skipping': True }), # Classification ARM updated_dict( dict_codegen_classification_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_cls', 'hard_quantize': False, 'threshold_skipping': False }), updated_dict( dict_codegen_classification_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_cls', 'hard_quantize': True, 'threshold_skipping': False }), updated_dict( dict_codegen_classification_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_cls', 'hard_quantize': False, 'threshold_skipping': True }), updated_dict( dict_codegen_classification_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_cls', 'hard_quantize': True, 'threshold_skipping': True }), # Detection ARM updated_dict( dict_codegen_object_detection_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det', 'hard_quantize': False, 'threshold_skipping': False }), updated_dict( dict_codegen_object_detection_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det', 'hard_quantize': True, 'threshold_skipping': False }), updated_dict( dict_codegen_object_detection_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det', 'hard_quantize': False, 'threshold_skipping': True }), updated_dict( dict_codegen_object_detection_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det', 'hard_quantize': True, 'threshold_skipping': True }), # Detection WiderFace ARM updated_dict( dict_codegen_object_detection_widerface_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det_wf', 'hard_quantize': False, 'threshold_skipping': False }), updated_dict( dict_codegen_object_detection_widerface_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det_wf', 'hard_quantize': True, 'threshold_skipping': False }), updated_dict( dict_codegen_object_detection_widerface_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det_wf', 'hard_quantize': False, 'threshold_skipping': True }), updated_dict( dict_codegen_object_detection_widerface_fpga(), { 'cpu_name': 'arm_fpga', 'prefix': 'arm_det_wf', 'hard_quantize': True, 'threshold_skipping': True }), ] return [(i, configuration) for i, configuration in enumerate(configurations)]