Files
compute-runtime/opencl/test/unit_test/program/program_with_source.h
Mateusz Jablonski 75d1ebb811 Use all devices when building program
remove Program::internalOptions
internal options are calculated separately in compile, link and build methods

Related-To: NEO-5001
Change-Id: I85ea2d64c72edb9b0e3f23244b59b9af20e2d357
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-02 19:37:55 +01:00

62 lines
1.9 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/compiler_interface/compiler_interface.h"
#include "opencl/test/unit_test/fixtures/context_fixture.h"
#include "opencl/test/unit_test/fixtures/memory_management_fixture.h"
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
#include "opencl/test/unit_test/fixtures/program_fixture.h"
#include "opencl/test/unit_test/helpers/kernel_binary_helper.h"
#include "opencl/test/unit_test/mocks/mock_context.h"
namespace NEO {
// ProgramFromSource Test Fixture
// Used to test the Program class
////////////////////////////////////////////////////////////////////////////////
class ProgramFromSourceTest : public ContextFixture,
public PlatformFixture,
public ProgramFixture,
public testing::TestWithParam<std::tuple<const char *, const char *, const char *>> {
using ContextFixture::SetUp;
using PlatformFixture::SetUp;
protected:
void SetUp() override {
std::tie(SourceFileName, BinaryFileName, KernelName) = GetParam();
kbHelper = new KernelBinaryHelper(BinaryFileName);
PlatformFixture::SetUp();
cl_device_id device = pPlatform->getClDevice(0);
ContextFixture::SetUp(1, &device);
ProgramFixture::SetUp();
CreateProgramWithSource(
pContext,
SourceFileName);
}
void TearDown() override {
knownSource.reset();
ProgramFixture::TearDown();
ContextFixture::TearDown();
PlatformFixture::TearDown();
delete kbHelper;
}
KernelBinaryHelper *kbHelper = nullptr;
const char *SourceFileName = nullptr;
const char *BinaryFileName = nullptr;
const char *KernelName = nullptr;
cl_int retVal = CL_SUCCESS;
};
} // namespace NEO