From 0cf77981fadb883b97efec112e115450873e64c3 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 24 Oct 2018 15:32:39 +0100 Subject: COMPMID-1626: Fixed VGG 16/19 bad_alloc failure. Some systems don't have enough memory to run the VGG networks, for example on systems with only 2GB memory the VGG example fails throwing a bad_alloc exception. This patch introduces the concept of global memory policy in ACL, the policy is a mechanism which could be used by the library's functions to try to reduce memory consumption on systems with limited memory. In this specific case the VGG examples set the policy to MINIMIZE. The GEMM function checks if the policy is MINIMIZE and in this case does not use the pretransposed weights path as this requires considerable more memory. Change-Id: I53abc3c9c64d045d8306793ffc9d24b28e228b7b --- arm_compute/core/Types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arm_compute/core/Types.h') diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 0240916da8..8df5c65e1e 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -940,8 +940,8 @@ public: * @param[in] weights (Optional)Weights [wx, wy, ww, wh] for the deltas. Defaults to all ones * @param[in] bbox_xform_clip (Optional)Minimum bounding box width and height after bounding box transformation in log-space. Defaults to log(1000/16) */ - BoundingBoxTransformInfo(float img_width, float img_height, float scale, bool apply_scale = false, const std::array weights = { 1.0, 1.0, 1.0, 1.0 }, float bbox_xform_clip = - 4.135166556742356) + BoundingBoxTransformInfo(float img_width, float img_height, float scale, bool apply_scale = false, const std::array weights = { { 1.f, 1.f, 1.f, 1.f } }, float bbox_xform_clip = + 4.135166556742356f) : _img_width(img_width), _img_height(img_height), _scale(scale), _apply_scale(apply_scale), _weights(weights), _bbox_xform_clip(bbox_xform_clip) { } -- cgit v1.2.1