mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
fix(ocl zebin): do not expose functions as kernel
Do not expose dummy kernel containing functions' ISAs as kernels. Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
4981b3e0d2
commit
359b9278b8
@ -8,6 +8,7 @@
|
||||
#include "opencl/test/unit_test/fixtures/program_fixture.h"
|
||||
|
||||
#include "opencl/source/program/create.inl"
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_program.h"
|
||||
|
||||
namespace NEO {
|
||||
@ -40,6 +41,13 @@ void ProgramFixture::createProgramWithSource(Context *pContext,
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
void ProgramFixture::cleanup() {
|
||||
if (pProgram != nullptr) {
|
||||
pProgram->release();
|
||||
}
|
||||
knownSource.reset();
|
||||
}
|
||||
|
||||
void ProgramFixture::createProgramFromBinary(Context *pContext,
|
||||
const ClDeviceVector &deviceVector,
|
||||
const std::string &binaryFileName,
|
||||
@ -83,4 +91,14 @@ void ProgramFixture::createProgramFromBinary(Context *pContext,
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
NEOProgramFixture::NEOProgramFixture() = default;
|
||||
NEOProgramFixture::~NEOProgramFixture() = default;
|
||||
|
||||
void NEOProgramFixture::setUp() {
|
||||
context = std::make_unique<MockContext>();
|
||||
program = std::make_unique<MockNeoProgram>(context.get(), false, context->getDevices());
|
||||
}
|
||||
|
||||
void NEOProgramFixture::tearDown() {}
|
||||
|
||||
} // namespace NEO
|
||||
|
@ -9,12 +9,31 @@
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/test/common/helpers/test_files.h"
|
||||
|
||||
#include "opencl/source/program/program.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_program.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class ClDeviceVector;
|
||||
class MockContext;
|
||||
class MockProgram;
|
||||
class ClDevice;
|
||||
class MockNeoProgram;
|
||||
using cl_int = int;
|
||||
|
||||
class NEOProgramFixture {
|
||||
public:
|
||||
NEOProgramFixture();
|
||||
~NEOProgramFixture();
|
||||
|
||||
protected:
|
||||
void setUp();
|
||||
void tearDown();
|
||||
std::unique_ptr<MockContext> context;
|
||||
std::unique_ptr<MockNeoProgram> program;
|
||||
};
|
||||
|
||||
class ProgramFixture {
|
||||
public:
|
||||
@ -40,12 +59,7 @@ class ProgramFixture {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void cleanup() {
|
||||
if (pProgram != nullptr) {
|
||||
pProgram->release();
|
||||
}
|
||||
knownSource.reset();
|
||||
}
|
||||
void cleanup();
|
||||
|
||||
MockProgram *pProgram = nullptr;
|
||||
std::unique_ptr<char[]> knownSource;
|
||||
|
Reference in New Issue
Block a user