OCL cache per thread data

Add caching mechanism for local ids in OCL.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-10-21 14:16:43 +00:00
committed by Compute-Runtime-Automation
parent 8a9ea9afd7
commit 69bef975f0
21 changed files with 309 additions and 502 deletions

View File

@ -259,13 +259,18 @@ struct PerformanceHintEnqueueKernelBadSizeTest : public PerformanceHintEnqueueKe
struct PerformanceHintEnqueueKernelPrintfTest : public PerformanceHintEnqueueTest,
public ProgramFixture {
class KernelWhitebox : public Kernel {
public:
using Kernel::initializeLocalIdsCache;
};
void SetUp() override {
PerformanceHintEnqueueTest::SetUp();
createProgramFromBinary(context, context->getDevices(), "printf");
retVal = pProgram->build(pProgram->getDevices(), nullptr, false);
ASSERT_EQ(CL_SUCCESS, retVal);
kernel = Kernel::create(pProgram, pProgram->getKernelInfoForKernel("test"), *context->getDevice(0), &retVal);
kernel = static_cast<KernelWhitebox *>(Kernel::create(pProgram, pProgram->getKernelInfoForKernel("test"), *context->getDevice(0), &retVal));
kernel->initializeLocalIdsCache();
globalWorkGroupSize[0] = globalWorkGroupSize[1] = globalWorkGroupSize[2] = 1;
}
@ -275,7 +280,7 @@ struct PerformanceHintEnqueueKernelPrintfTest : public PerformanceHintEnqueueTes
ProgramFixture::tearDown();
PerformanceHintEnqueueTest::TearDown();
}
Kernel *kernel = nullptr;
KernelWhitebox *kernel = nullptr;
size_t globalWorkGroupSize[3]{};
};