From 6b06953732a7da4ff2446d69c2fcafed69c5008a Mon Sep 17 00:00:00 2001 From: John Richardson Date: Fri, 27 Apr 2018 12:55:37 +0100 Subject: COMPMID-1087: Fix CLHOGDetector failure. Change-Id: Ied0fbbd50f1e4dcf930798bc3b735cb70329017d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129313 Reviewed-by: Georgios Pinitas Tested-by: Jenkins --- src/runtime/CL/CLHOG.cpp | 6 +++--- tests/validation/CL/HOGDetector.cpp | 25 ++++++++++++------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/runtime/CL/CLHOG.cpp b/src/runtime/CL/CLHOG.cpp index 3f5266ce70..c4ea6398e5 100644 --- a/src/runtime/CL/CLHOG.cpp +++ b/src/runtime/CL/CLHOG.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -74,11 +74,11 @@ void CLHOG::unmap() uint8_t *CLHOG::do_map(cl::CommandQueue &q, bool blocking) { ARM_COMPUTE_ERROR_ON(_buffer.get() == nullptr); - return static_cast(q.enqueueMapBuffer(_buffer, blocking ? CL_TRUE : CL_FALSE, CL_MAP_READ | CL_MAP_WRITE, 0, info()->descriptor_size())); + return static_cast(q.enqueueMapBuffer(_buffer, blocking ? CL_TRUE : CL_FALSE, CL_MAP_READ | CL_MAP_WRITE, 0, info()->descriptor_size() * sizeof(float))); } void CLHOG::do_unmap(cl::CommandQueue &q) { ARM_COMPUTE_ERROR_ON(_buffer.get() == nullptr); q.enqueueUnmapMemObject(_buffer, descriptor()); -} \ No newline at end of file +} diff --git a/tests/validation/CL/HOGDetector.cpp b/tests/validation/CL/HOGDetector.cpp index dcf35091a1..6c2c18c3ea 100644 --- a/tests/validation/CL/HOGDetector.cpp +++ b/tests/validation/CL/HOGDetector.cpp @@ -65,25 +65,24 @@ using CLHOGDetectorFixture = HOGDetectorValidationFixture; -// TODO (COMPMID-1087) : CLHOGDetector fails on hikey -DISABLED_FIXTURE_DATA_TEST_CASE(RunSmall, CLHOGDetectorFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::SmallHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))) +FIXTURE_DATA_TEST_CASE(RunSmall, CLHOGDetectorFixture, framework::DatasetMode::PRECOMMIT, + combine(combine(combine( + DetectionWindowStrideDataset, + datasets::SmallHOGDescriptorDataset()), + framework::dataset::make("Format", Format::U8)), + framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))) { // Validate output validate_detection_windows(_target.begin(), _target.end(), _reference.begin(), _reference.end(), tolerance); } -DISABLED_FIXTURE_DATA_TEST_CASE(RunLarge, CLHOGDetectorFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::LargeHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))) +FIXTURE_DATA_TEST_CASE(RunLarge, CLHOGDetectorFixture, framework::DatasetMode::NIGHTLY, + combine(combine(combine( + DetectionWindowStrideDataset, + datasets::LargeHOGDescriptorDataset()), + framework::dataset::make("Format", Format::U8)), + framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))) { // Validate output validate_detection_windows(_target.begin(), _target.end(), _reference.begin(), _reference.end(), tolerance); -- cgit v1.2.1