ArmNN
 21.02
JsonPrinterTestImpl.hpp File Reference
#include <armnn/BackendId.hpp>
#include <vector>

Go to the source code of this file.

Functions

void RunSoftmaxProfilerJsonPrinterTest (const std::vector< armnn::BackendId > &backends)
 

Function Documentation

◆ RunSoftmaxProfilerJsonPrinterTest()

void RunSoftmaxProfilerJsonPrinterTest ( const std::vector< armnn::BackendId > &  backends)

Definition at line 245 of file JsonPrinterTestImpl.cpp.

References armnn::CpuAcc, GetSoftmaxProfilerJson(), armnn::GpuAcc, and ValidateProfilerJson().

Referenced by BOOST_AUTO_TEST_CASE().

246 {
247  // setup the test fixture and obtain JSON Printer result
248  std::string result = GetSoftmaxProfilerJson(backends);
249 
250  // validate the JSON Printer result
251  ValidateProfilerJson(result);
252 
253  const armnn::BackendId& firstBackend = backends.at(0);
254  if (firstBackend == armnn::Compute::GpuAcc)
255  {
256  BOOST_CHECK(result.find("OpenClKernelTimer/: softmax_layer_max_shift_exp_sum_quantized_serial GWS[,,]")
257  != std::string::npos);
258  }
259  else if (firstBackend == armnn::Compute::CpuAcc)
260  {
261  BOOST_CHECK(result.find("NeonKernelTimer/: CpuLogitsDLogSoftmaxKernel_#") != std::string::npos);
262  }
263 }
std::string GetSoftmaxProfilerJson(const std::vector< armnn::BackendId > &backends)
GPU Execution: OpenCL: ArmCompute.
CPU Execution: NEON: ArmCompute.
void ValidateProfilerJson(std::string &result)