diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-04-23 16:12:12 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:54 +0000 |
commit | 35aa6a36e7ef9302efd554aac9b84153ad7c6a9e (patch) | |
tree | 350e676c6d5a08573dc297a7558f6a72f3624ac2 /tests/framework/instruments/Instruments.h | |
parent | 9fb0cac961f70d1937c5fa3eafeaee1385c89768 (diff) | |
download | ComputeLibrary-35aa6a36e7ef9302efd554aac9b84153ad7c6a9e.tar.gz |
COMPMID-1077 Add OpenCL Memory Usage instrument
Change-Id: Ic5a24f22bec9d6ca71486097f6ad70fb0d83da2b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128674
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/framework/instruments/Instruments.h')
-rw-r--r-- | tests/framework/instruments/Instruments.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/framework/instruments/Instruments.h b/tests/framework/instruments/Instruments.h index fe4c719319..705fc59b29 100644 --- a/tests/framework/instruments/Instruments.h +++ b/tests/framework/instruments/Instruments.h @@ -25,6 +25,7 @@ #define ARM_COMPUTE_TEST_INSTRUMENTS #include "MaliCounter.h" +#include "OpenCLMemoryUsage.h" #include "OpenCLTimer.h" #include "PMUCounter.h" #include "SchedulerTimer.h" @@ -50,6 +51,7 @@ enum class InstrumentType : unsigned int MALI = 0x0300, OPENCL_TIMER = 0x0400, SCHEDULER_TIMER = 0x0500, + OPENCL_MEMORY_USAGE = 0x0600, }; using InstrumentsDescription = std::pair<InstrumentType, ScaleFactor>; @@ -157,6 +159,22 @@ inline ::std::stringstream &operator<<(::std::stringstream &stream, InstrumentsD throw std::invalid_argument("Unsupported instrument scale"); } break; + case InstrumentType::OPENCL_MEMORY_USAGE: + switch(instrument.second) + { + case ScaleFactor::NONE: + stream << "OPENCL_MEMORY_USAGE"; + break; + case ScaleFactor::SCALE_1K: + stream << "OPENCL_MEMORY_USAGE_K"; + break; + case ScaleFactor::SCALE_1M: + stream << "OPENCL_MEMORY_USAGE_M"; + break; + default: + throw std::invalid_argument("Unsupported instrument scale"); + } + break; case InstrumentType::ALL: stream << "ALL"; break; |