From 6ed43b58e74281cbdde2219962048bc36d560a3b Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 12 Jul 2018 17:34:22 +0100 Subject: COMPMID-1188: Report error on graphs that do not support NHWC Change-Id: I14c6ded780339aa75555ea5f62247c509e64d0b0 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139797 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- examples/graph_alexnet.cpp | 3 ++- examples/graph_googlenet.cpp | 3 ++- examples/graph_inception_v3.cpp | 3 ++- examples/graph_inception_v4.cpp | 3 ++- examples/graph_lenet.cpp | 3 ++- examples/graph_resnet50.cpp | 3 ++- examples/graph_resnext50.cpp | 3 ++- examples/graph_squeezenet.cpp | 3 ++- examples/graph_squeezenet_v1_1.cpp | 3 ++- examples/graph_vgg16.cpp | 3 ++- examples/graph_vgg19.cpp | 3 ++- 11 files changed, 22 insertions(+), 11 deletions(-) (limited to 'examples') diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp index 95d36342f9..bf4d131ac5 100644 --- a/examples/graph_alexnet.cpp +++ b/examples/graph_alexnet.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp index e23107f081..ff7992c164 100644 --- a/examples/graph_googlenet.cpp +++ b/examples/graph_googlenet.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_inception_v3.cpp b/examples/graph_inception_v3.cpp index 639554ebfc..1b7b0fd6c2 100644 --- a/examples/graph_inception_v3.cpp +++ b/examples/graph_inception_v3.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_inception_v4.cpp b/examples/graph_inception_v4.cpp index e048766634..93166a41c2 100644 --- a/examples/graph_inception_v4.cpp +++ b/examples/graph_inception_v4.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp index f90892aeee..9be5bed6a1 100644 --- a/examples/graph_lenet.cpp +++ b/examples/graph_lenet.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_resnet50.cpp b/examples/graph_resnet50.cpp index 66fc6e869d..2970037768 100644 --- a/examples/graph_resnet50.cpp +++ b/examples/graph_resnet50.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_resnext50.cpp b/examples/graph_resnext50.cpp index c0a2308a1f..0fce3a1b04 100644 --- a/examples/graph_resnext50.cpp +++ b/examples/graph_resnext50.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_squeezenet.cpp b/examples/graph_squeezenet.cpp index a290b91148..09fb1c5960 100644 --- a/examples/graph_squeezenet.cpp +++ b/examples/graph_squeezenet.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_squeezenet_v1_1.cpp b/examples/graph_squeezenet_v1_1.cpp index 8ce928c5b1..75ea6b258b 100644 --- a/examples/graph_squeezenet_v1_1.cpp +++ b/examples/graph_squeezenet_v1_1.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp index 5ff306507f..c2a9b82f68 100644 --- a/examples/graph_vgg16.cpp +++ b/examples/graph_vgg16.cpp @@ -59,7 +59,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp index 8bf88b96ed..8de0223a48 100644 --- a/examples/graph_vgg19.cpp +++ b/examples/graph_vgg19.cpp @@ -58,7 +58,8 @@ public: } // Checks - ARM_COMPUTE_ERROR_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "Unsupported data type!"); + ARM_COMPUTE_EXIT_ON_MSG(common_params.data_layout == DataLayout::NHWC, "Unsupported data layout!"); // Print parameter values std::cout << common_params << std::endl; -- cgit v1.2.1