mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Remove usage of TestLegacy from opencl tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
44d218e52e
commit
bca852617c
@ -12,7 +12,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace NEO {
|
||||
void ClDeviceFixture::SetUp() {
|
||||
void ClDeviceFixture::setUp() {
|
||||
hardwareInfo = *defaultHwInfo;
|
||||
setUpImpl(&hardwareInfo);
|
||||
}
|
||||
@ -30,7 +30,7 @@ void ClDeviceFixture::setUpImpl(const NEO::HardwareInfo *hardwareInfo) {
|
||||
this->osContext = pDevice->getDefaultEngine().osContext;
|
||||
}
|
||||
|
||||
void ClDeviceFixture::TearDown() {
|
||||
void ClDeviceFixture::tearDown() {
|
||||
delete pClDevice;
|
||||
pClDevice = nullptr;
|
||||
pDevice = nullptr;
|
||||
|
@ -14,9 +14,9 @@ namespace NEO {
|
||||
struct HardwareInfo;
|
||||
|
||||
struct ClDeviceFixture {
|
||||
void SetUp(); // NOLINT(readability-identifier-naming)
|
||||
void setUp();
|
||||
void setUpImpl(const NEO::HardwareInfo *hardwareInfo);
|
||||
void TearDown(); // NOLINT(readability-identifier-naming)
|
||||
void tearDown();
|
||||
|
||||
MockDevice *createWithUsDeviceId(unsigned short usDeviceId);
|
||||
|
||||
|
@ -67,14 +67,14 @@ void ThreadGroupPreemptionEnqueueKernelTest::SetUp() {
|
||||
originalPreemptionMode = globalHwInfo->capabilityTable.defaultPreemptionMode;
|
||||
globalHwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
||||
|
||||
HelloWorldFixture::SetUp();
|
||||
HelloWorldFixture::setUp();
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
}
|
||||
|
||||
void ThreadGroupPreemptionEnqueueKernelTest::TearDown() {
|
||||
globalHwInfo->capabilityTable.defaultPreemptionMode = originalPreemptionMode;
|
||||
|
||||
HelloWorldFixture::TearDown();
|
||||
HelloWorldFixture::tearDown();
|
||||
}
|
||||
|
||||
void MidThreadPreemptionEnqueueKernelTest::SetUp() {
|
||||
@ -85,12 +85,12 @@ void MidThreadPreemptionEnqueueKernelTest::SetUp() {
|
||||
originalPreemptionMode = globalHwInfo->capabilityTable.defaultPreemptionMode;
|
||||
globalHwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
|
||||
|
||||
HelloWorldFixture::SetUp();
|
||||
HelloWorldFixture::setUp();
|
||||
pDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||
}
|
||||
|
||||
void MidThreadPreemptionEnqueueKernelTest::TearDown() {
|
||||
globalHwInfo->capabilityTable.defaultPreemptionMode = originalPreemptionMode;
|
||||
|
||||
HelloWorldFixture::TearDown();
|
||||
HelloWorldFixture::tearDown();
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ struct KernelInfo;
|
||||
struct WorkaroundTable;
|
||||
|
||||
using PreemptionEnqueueKernelFixture = HelloWorldFixture<HelloWorldFixtureFactory>;
|
||||
using PreemptionEnqueueKernelTest = TestLegacy<PreemptionEnqueueKernelFixture>;
|
||||
using PreemptionEnqueueKernelTest = Test<PreemptionEnqueueKernelFixture>;
|
||||
} // namespace NEO
|
||||
|
||||
class DevicePreemptionTests : public ::testing::Test {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
void ContextFixture::SetUp(cl_uint numDevices, cl_device_id *pDeviceList) {
|
||||
void ContextFixture::setUp(cl_uint numDevices, cl_device_id *pDeviceList) {
|
||||
auto retVal = CL_SUCCESS;
|
||||
pContext = Context::create<MockContext>(nullptr, ClDeviceVector(pDeviceList, numDevices),
|
||||
nullptr, nullptr, retVal);
|
||||
@ -21,7 +21,7 @@ void ContextFixture::SetUp(cl_uint numDevices, cl_device_id *pDeviceList) {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void ContextFixture::TearDown() {
|
||||
void ContextFixture::tearDown() {
|
||||
if (pContext != nullptr) {
|
||||
pContext->release();
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ class MockContext;
|
||||
|
||||
class ContextFixture {
|
||||
protected:
|
||||
void SetUp(cl_uint numDevices, cl_device_id *pDeviceList); // NOLINT(readability-identifier-naming)
|
||||
void TearDown(); // NOLINT(readability-identifier-naming)
|
||||
void setUp(cl_uint numDevices, cl_device_id *pDeviceList);
|
||||
void tearDown();
|
||||
|
||||
MockContext *pContext = nullptr;
|
||||
};
|
||||
|
@ -97,7 +97,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
|
||||
void SetUp() override {
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false;
|
||||
PlatformFixture::SetUp();
|
||||
PlatformFixture::setUp();
|
||||
rootDeviceIndex = pPlatform->getClDevice(0)->getRootDeviceIndex();
|
||||
context = new MockContext(pPlatform->getClDevice(0));
|
||||
context->preferD3dSharedResources = true;
|
||||
@ -134,7 +134,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
|
||||
if (!mockMM->gmmOwnershipPassed) {
|
||||
delete gmm;
|
||||
}
|
||||
PlatformFixture::TearDown();
|
||||
PlatformFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int pickParam(cl_int d3d10, cl_int d3d11) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -14,7 +14,7 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||
|
||||
namespace NEO {
|
||||
void DeviceInstrumentationFixture::SetUp(bool instrumentation) {
|
||||
void DeviceInstrumentationFixture::setUp(bool instrumentation) {
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
hwInfo->capabilityTable.instrumentationEnabled = instrumentation;
|
||||
device = std::make_unique<ClDevice>(*Device::create<RootDevice>(executionEnvironment, 0), platform());
|
||||
|
@ -16,7 +16,7 @@ class Device;
|
||||
struct HardwareInfo;
|
||||
|
||||
struct DeviceInstrumentationFixture {
|
||||
void SetUp(bool instrumentation); // NOLINT(readability-identifier-naming)
|
||||
void setUp(bool instrumentation);
|
||||
|
||||
std::unique_ptr<ClDevice> device = nullptr;
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
|
@ -13,13 +13,13 @@ class EnqueueHandlerTest : public NEO::ClDeviceFixture,
|
||||
public testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context = new NEO::MockContext(pClDevice);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
context->decRefInternal();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
NEO::MockContext *context;
|
||||
};
|
||||
|
@ -39,23 +39,23 @@ struct HelloWorldFixture : public FixtureFactory::IndirectHeapFixture,
|
||||
typedef typename FixtureFactory::KernelFixture KernelFixture;
|
||||
|
||||
using CommandQueueFixture::pCmdQ;
|
||||
using CommandQueueFixture::SetUp;
|
||||
using CommandQueueFixture::setUp;
|
||||
using CommandStreamFixture::pCS;
|
||||
using CommandStreamFixture::SetUp;
|
||||
using HelloWorldKernelFixture::SetUp;
|
||||
using IndirectHeapFixture::SetUp;
|
||||
using CommandStreamFixture::setUp;
|
||||
using HelloWorldKernelFixture::setUp;
|
||||
using IndirectHeapFixture::setUp;
|
||||
using KernelFixture::pKernel;
|
||||
|
||||
public:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
void setUp() {
|
||||
ClDeviceFixture::setUp();
|
||||
ASSERT_NE(nullptr, pClDevice);
|
||||
CommandQueueFixture::SetUp(pClDevice, 0);
|
||||
CommandQueueFixture::setUp(pClDevice, 0);
|
||||
ASSERT_NE(nullptr, pCmdQ);
|
||||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
CommandStreamFixture::setUp(pCmdQ);
|
||||
ASSERT_NE(nullptr, pCS);
|
||||
IndirectHeapFixture::SetUp(pCmdQ);
|
||||
KernelFixture::SetUp(pClDevice, kernelFilename, kernelName);
|
||||
IndirectHeapFixture::setUp(pCmdQ);
|
||||
KernelFixture::setUp(pClDevice, kernelFilename, kernelName);
|
||||
ASSERT_NE(nullptr, pKernel);
|
||||
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
@ -85,18 +85,18 @@ struct HelloWorldFixture : public FixtureFactory::IndirectHeapFixture,
|
||||
pKernel->setArg(1, destBuffer);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void tearDown() {
|
||||
pCmdQ->flush();
|
||||
|
||||
srcBuffer->release();
|
||||
destBuffer->release();
|
||||
|
||||
KernelFixture::TearDown();
|
||||
IndirectHeapFixture::TearDown();
|
||||
CommandStreamFixture::TearDown();
|
||||
CommandQueueFixture::TearDown();
|
||||
KernelFixture::tearDown();
|
||||
IndirectHeapFixture::tearDown();
|
||||
CommandStreamFixture::tearDown();
|
||||
CommandQueueFixture::tearDown();
|
||||
BufferDefaults::context->release();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
Buffer *srcBuffer = nullptr;
|
||||
Buffer *destBuffer = nullptr;
|
||||
@ -128,7 +128,7 @@ struct HelloWorldFixture : public FixtureFactory::IndirectHeapFixture,
|
||||
};
|
||||
|
||||
template <typename FixtureFactory>
|
||||
struct HelloWorldTest : TestLegacy<HelloWorldFixture<FixtureFactory>> {
|
||||
struct HelloWorldTest : Test<HelloWorldFixture<FixtureFactory>> {
|
||||
};
|
||||
|
||||
template <typename FixtureFactory>
|
||||
|
@ -27,13 +27,13 @@ class Kernel;
|
||||
class Program;
|
||||
|
||||
struct HelloWorldKernelFixture : public ProgramFixture {
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
void SetUp(ClDevice *pDevice, const char *kernelFilenameStr, const char *kernelNameStr) {
|
||||
SetUp(pDevice, kernelFilenameStr, kernelNameStr, nullptr);
|
||||
void setUp(ClDevice *pDevice, const char *kernelFilenameStr, const char *kernelNameStr) {
|
||||
setUp(pDevice, kernelFilenameStr, kernelNameStr, nullptr);
|
||||
}
|
||||
void SetUp(ClDevice *pDevice, const char *kernelFilenameStr, const char *kernelNameStr, const char *options) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *pDevice, const char *kernelFilenameStr, const char *kernelNameStr, const char *options) {
|
||||
ProgramFixture::setUp();
|
||||
|
||||
pTestFilename = new std::string(kernelFilenameStr);
|
||||
pKernelName = new std::string(kernelNameStr);
|
||||
@ -50,13 +50,13 @@ struct HelloWorldKernelFixture : public ProgramFixture {
|
||||
if (options) {
|
||||
std::string optionsToProgram(options);
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
pContext,
|
||||
deviceVector,
|
||||
*pTestFilename,
|
||||
optionsToProgram);
|
||||
} else {
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
pContext,
|
||||
deviceVector,
|
||||
*pTestFilename);
|
||||
@ -81,13 +81,13 @@ struct HelloWorldKernelFixture : public ProgramFixture {
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void tearDown() {
|
||||
delete pKernelName;
|
||||
delete pTestFilename;
|
||||
pMultiDeviceKernel->release();
|
||||
|
||||
pContext->release();
|
||||
ProgramFixture::TearDown();
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
std::string *pTestFilename = nullptr;
|
||||
|
@ -51,7 +51,7 @@ void KernelImageArgTest::SetUp() {
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.bufferAddressingMode = ApiSpecificConfig::getBindlessConfiguration() ? KernelDescriptor::AddressingMode::BindlessAndStateless : KernelDescriptor::AddressingMode::BindfulAndStateless;
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.imageAddressingMode = ApiSpecificConfig::getBindlessConfiguration() ? KernelDescriptor::AddressingMode::Bindless : KernelDescriptor::AddressingMode::Bindful;
|
||||
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context.reset(new MockContext(pClDevice));
|
||||
program = std::make_unique<MockProgram>(context.get(), false, toClDeviceVector(*pClDevice));
|
||||
int32_t retVal = CL_INVALID_VALUE;
|
||||
@ -78,5 +78,5 @@ void KernelImageArgTest::TearDown() {
|
||||
pMultiDeviceKernel.reset();
|
||||
program.reset();
|
||||
context.reset();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace iOpenCL {
|
||||
struct SKernelBinaryHeaderCommon;
|
||||
}
|
||||
|
||||
class KernelImageArgTest : public TestLegacy<NEO::ClDeviceFixture> {
|
||||
class KernelImageArgTest : public Test<NEO::ClDeviceFixture> {
|
||||
public:
|
||||
KernelImageArgTest() {
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ struct clGetKernelWorkGroupInfoTest : public ApiFixture<>,
|
||||
typedef ApiFixture BaseClass;
|
||||
|
||||
void SetUp() override {
|
||||
BaseClass::SetUp();
|
||||
BaseClass::setUp();
|
||||
|
||||
std::unique_ptr<char[]> pSource = nullptr;
|
||||
size_t sourceSize = 0;
|
||||
@ -68,7 +68,7 @@ struct clGetKernelWorkGroupInfoTest : public ApiFixture<>,
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
delete kbHelper;
|
||||
BaseClass::TearDown();
|
||||
BaseClass::tearDown();
|
||||
}
|
||||
|
||||
cl_program pProgram = nullptr;
|
||||
|
@ -65,7 +65,7 @@ struct MediaKernelFixture : public HelloWorldFixture<FactoryType>,
|
||||
Parent::kernelFilename = "vme_kernels";
|
||||
Parent::kernelName = "non_vme_kernel";
|
||||
|
||||
Parent::SetUp();
|
||||
Parent::setUp();
|
||||
ClHardwareParse::setUp();
|
||||
|
||||
ASSERT_NE(nullptr, pKernel);
|
||||
@ -91,7 +91,7 @@ struct MediaKernelFixture : public HelloWorldFixture<FactoryType>,
|
||||
pMultiDeviceVmeKernel->release();
|
||||
|
||||
ClHardwareParse::tearDown();
|
||||
Parent::TearDown();
|
||||
Parent::tearDown();
|
||||
}
|
||||
|
||||
GenCmdList::iterator itorWalker1;
|
||||
|
@ -27,7 +27,7 @@ struct OneMipLevelImageFixture {
|
||||
}
|
||||
};
|
||||
|
||||
void SetUp() { // NOLINT(readability-identifier-naming)
|
||||
void setUp() {
|
||||
REQUIRE_IMAGES_OR_SKIP(defaultHwInfo);
|
||||
|
||||
cl_image_desc imageDesc = Image3dDefaults::imageDesc;
|
||||
@ -38,7 +38,7 @@ struct OneMipLevelImageFixture {
|
||||
this->image.reset(createImage());
|
||||
}
|
||||
|
||||
void TearDown() { // NOLINT(readability-identifier-naming)
|
||||
void tearDown() {
|
||||
}
|
||||
|
||||
Image *createImage() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -13,7 +13,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace NEO {
|
||||
void PlatformFixture::SetUp() {
|
||||
void PlatformFixture::setUp() {
|
||||
pPlatform = constructPlatform();
|
||||
ASSERT_EQ(0u, pPlatform->getNumDevices());
|
||||
|
||||
@ -35,7 +35,7 @@ void PlatformFixture::SetUp() {
|
||||
}
|
||||
}
|
||||
|
||||
void PlatformFixture::TearDown() {
|
||||
void PlatformFixture::tearDown() {
|
||||
platformsImpl->clear();
|
||||
delete[] devices;
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ namespace NEO {
|
||||
|
||||
class PlatformFixture {
|
||||
protected:
|
||||
void SetUp(); // NOLINT(readability-identifier-naming)
|
||||
void TearDown(); // NOLINT(readability-identifier-naming)
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
Platform *pPlatform = nullptr;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -11,9 +11,9 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_program.h"
|
||||
|
||||
namespace NEO {
|
||||
void ProgramFixture::CreateProgramWithSource(Context *pContext,
|
||||
void ProgramFixture::createProgramWithSource(Context *pContext,
|
||||
const std::string &sourceFileName) {
|
||||
Cleanup();
|
||||
cleanup();
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
std::string testFile;
|
||||
|
||||
@ -40,7 +40,7 @@ void ProgramFixture::CreateProgramWithSource(Context *pContext,
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void ProgramFixture::CreateProgramFromBinary(Context *pContext,
|
||||
void ProgramFixture::createProgramFromBinary(Context *pContext,
|
||||
const ClDeviceVector &deviceVector,
|
||||
const std::string &binaryFileName,
|
||||
cl_int &retVal,
|
||||
@ -66,13 +66,13 @@ void ProgramFixture::CreateProgramFromBinary(Context *pContext,
|
||||
retVal);
|
||||
}
|
||||
|
||||
void ProgramFixture::CreateProgramFromBinary(Context *pContext,
|
||||
void ProgramFixture::createProgramFromBinary(Context *pContext,
|
||||
const ClDeviceVector &deviceVector,
|
||||
const std::string &binaryFileName,
|
||||
const std::string &options) {
|
||||
Cleanup();
|
||||
cleanup();
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
pContext,
|
||||
deviceVector,
|
||||
binaryFileName,
|
||||
|
@ -18,29 +18,29 @@ namespace NEO {
|
||||
|
||||
class ProgramFixture {
|
||||
public:
|
||||
void CreateProgramFromBinary(Context *pContext, // NOLINT(readability-identifier-naming)
|
||||
void createProgramFromBinary(Context *pContext,
|
||||
const ClDeviceVector &deviceVector,
|
||||
const std::string &binaryFileName,
|
||||
cl_int &retVal,
|
||||
const std::string &options = "");
|
||||
|
||||
void CreateProgramFromBinary(Context *pContext, // NOLINT(readability-identifier-naming)
|
||||
void createProgramFromBinary(Context *pContext,
|
||||
const ClDeviceVector &deviceVector,
|
||||
const std::string &binaryFileName,
|
||||
const std::string &options = "");
|
||||
|
||||
void CreateProgramWithSource(Context *pContext, // NOLINT(readability-identifier-naming)
|
||||
void createProgramWithSource(Context *pContext,
|
||||
const std::string &sourceFileName);
|
||||
|
||||
protected:
|
||||
virtual void SetUp() { // NOLINT(readability-identifier-naming)
|
||||
void setUp() {
|
||||
}
|
||||
|
||||
virtual void TearDown() { // NOLINT(readability-identifier-naming)
|
||||
Cleanup();
|
||||
void tearDown() {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void Cleanup() { // NOLINT(readability-identifier-naming)
|
||||
void cleanup() {
|
||||
if (pProgram != nullptr) {
|
||||
pProgram->release();
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ using namespace NEO;
|
||||
|
||||
class ScenarioTest : public ::testing::Test,
|
||||
public PlatformFixture {
|
||||
using PlatformFixture::SetUp;
|
||||
using PlatformFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
DebugManager.flags.EnableTimestampPacket.set(false);
|
||||
PlatformFixture::SetUp();
|
||||
PlatformFixture::setUp();
|
||||
|
||||
auto pDevice = pPlatform->getClDevice(0);
|
||||
ASSERT_NE(nullptr, pDevice);
|
||||
@ -43,7 +43,7 @@ class ScenarioTest : public ::testing::Test,
|
||||
context->release();
|
||||
program->release();
|
||||
|
||||
PlatformFixture::TearDown();
|
||||
PlatformFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal;
|
||||
|
@ -72,11 +72,11 @@ inline const char *typeName(unsigned short &) {
|
||||
class SimpleArgKernelFixture : public ProgramFixture {
|
||||
|
||||
public:
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
virtual void SetUp(ClDevice *pDevice) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *pDevice) {
|
||||
ProgramFixture::setUp();
|
||||
|
||||
std::string testFile;
|
||||
int forTheName = 0;
|
||||
@ -94,7 +94,7 @@ class SimpleArgKernelFixture : public ProgramFixture {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
ASSERT_NE(nullptr, pContext);
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
pContext,
|
||||
deviceVector,
|
||||
testFile);
|
||||
@ -117,7 +117,7 @@ class SimpleArgKernelFixture : public ProgramFixture {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void tearDown() {
|
||||
if (pKernel) {
|
||||
delete pKernel;
|
||||
pKernel = nullptr;
|
||||
@ -125,7 +125,7 @@ class SimpleArgKernelFixture : public ProgramFixture {
|
||||
|
||||
pContext->release();
|
||||
|
||||
ProgramFixture::TearDown();
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@ -135,13 +135,13 @@ class SimpleArgKernelFixture : public ProgramFixture {
|
||||
|
||||
class SimpleArgNonUniformKernelFixture : public ProgramFixture {
|
||||
public:
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
context,
|
||||
context->getDevices(),
|
||||
"simple_nonuniform",
|
||||
@ -163,13 +163,13 @@ class SimpleArgNonUniformKernelFixture : public ProgramFixture {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void tearDown() {
|
||||
if (kernel) {
|
||||
delete kernel;
|
||||
kernel = nullptr;
|
||||
}
|
||||
|
||||
ProgramFixture::TearDown();
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@ -178,14 +178,14 @@ class SimpleArgNonUniformKernelFixture : public ProgramFixture {
|
||||
|
||||
class SimpleKernelFixture : public ProgramFixture {
|
||||
public:
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
|
||||
std::string programName("simple_kernels");
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
context,
|
||||
toClDeviceVector(*device),
|
||||
programName);
|
||||
@ -212,14 +212,14 @@ class SimpleKernelFixture : public ProgramFixture {
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void tearDown() {
|
||||
for (size_t i = 0; i < maxKernelsCount; i++) {
|
||||
if (kernels[i]) {
|
||||
kernels[i].reset(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
ProgramFixture::TearDown();
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
uint32_t kernelIds = 0;
|
||||
@ -231,15 +231,15 @@ class SimpleKernelFixture : public ProgramFixture {
|
||||
class SimpleKernelStatelessFixture : public ProgramFixture {
|
||||
public:
|
||||
DebugManagerStateRestore restorer;
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
DebugManager.flags.DisableStatelessToStatefulOptimization.set(true);
|
||||
DebugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.set(false);
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
context,
|
||||
toClDeviceVector(*device),
|
||||
"stateless_kernel");
|
||||
@ -260,8 +260,8 @@ class SimpleKernelStatelessFixture : public ProgramFixture {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ProgramFixture::TearDown();
|
||||
void tearDown() {
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
std::unique_ptr<Kernel> kernel = nullptr;
|
||||
@ -271,15 +271,15 @@ class SimpleKernelStatelessFixture : public ProgramFixture {
|
||||
class StatelessCopyKernelFixture : public ProgramFixture {
|
||||
public:
|
||||
DebugManagerStateRestore restorer;
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
DebugManager.flags.DisableStatelessToStatefulOptimization.set(true);
|
||||
DebugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.set(false);
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
context,
|
||||
toClDeviceVector(*device),
|
||||
"stateless_copy_buffer");
|
||||
@ -300,8 +300,8 @@ class StatelessCopyKernelFixture : public ProgramFixture {
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ProgramFixture::TearDown();
|
||||
void tearDown() {
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
std::unique_ptr<MultiDeviceKernel> multiDeviceKernel = nullptr;
|
||||
@ -312,15 +312,15 @@ class StatelessCopyKernelFixture : public ProgramFixture {
|
||||
class StatelessKernelWithIndirectAccessFixture : public ProgramFixture {
|
||||
public:
|
||||
DebugManagerStateRestore restorer;
|
||||
using ProgramFixture::SetUp;
|
||||
using ProgramFixture::setUp;
|
||||
|
||||
protected:
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
DebugManager.flags.DisableStatelessToStatefulOptimization.set(true);
|
||||
DebugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.set(false);
|
||||
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
context,
|
||||
toClDeviceVector(*device),
|
||||
"indirect_access_kernel");
|
||||
@ -342,8 +342,8 @@ class StatelessKernelWithIndirectAccessFixture : public ProgramFixture {
|
||||
EXPECT_TRUE(multiDeviceKernel->getKernel(device->getRootDeviceIndex())->getKernelInfo().hasIndirectStatelessAccess);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ProgramFixture::TearDown();
|
||||
void tearDown() {
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
std::unique_ptr<MultiDeviceKernel> multiDeviceKernel = nullptr;
|
||||
@ -352,20 +352,20 @@ class StatelessKernelWithIndirectAccessFixture : public ProgramFixture {
|
||||
|
||||
class BindlessKernelFixture : public ProgramFixture {
|
||||
public:
|
||||
using ProgramFixture::SetUp;
|
||||
void SetUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::SetUp();
|
||||
using ProgramFixture::setUp;
|
||||
void setUp(ClDevice *device, Context *context) {
|
||||
ProgramFixture::setUp();
|
||||
this->deviceCl = device;
|
||||
this->contextCl = context;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ProgramFixture::TearDown();
|
||||
void tearDown() {
|
||||
ProgramFixture::tearDown();
|
||||
}
|
||||
|
||||
void createKernel(const std::string &programName, const std::string &kernelName) {
|
||||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
CreateProgramFromBinary(
|
||||
createProgramFromBinary(
|
||||
contextCl,
|
||||
contextCl->getDevices(),
|
||||
programName);
|
||||
|
@ -28,7 +28,7 @@ struct UltCommandStreamReceiverTest
|
||||
public ClHardwareParse,
|
||||
::testing::Test {
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
ClHardwareParse::setUp();
|
||||
|
||||
cmdBuffer = alignedMalloc(sizeStream, alignmentStream);
|
||||
@ -83,7 +83,7 @@ struct UltCommandStreamReceiverTest
|
||||
alignedFree(dshBuffer);
|
||||
alignedFree(cmdBuffer);
|
||||
ClHardwareParse::tearDown();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
template <typename CommandStreamReceiverType>
|
||||
|
Reference in New Issue
Block a user