Preparing mock files for switching the fcl interface

Change-Id: Ic80e9ec19cc4c03432873466475d60dda72dfd9e
This commit is contained in:
matborzyszkowski
2020-03-16 13:37:12 +01:00
committed by sys_ocldev
parent 4e50ccb1a7
commit 4e16de51d8
2 changed files with 20 additions and 1 deletions

View File

@ -337,6 +337,13 @@ CodeType::CodeType_t CIF_GET_INTERFACE_CLASS(FclOclDeviceCtx, 2)::GetPreferredIn
return CodeType::spirV;
}
IGC::FclOclTranslationCtxBase *CIF_GET_INTERFACE_CLASS(FclOclDeviceCtx, 3)::CreateTranslationCtxImpl(CIF::Version_t ver,
IGC::CodeType::CodeType_t inType,
IGC::CodeType::CodeType_t outType,
CIF::Builtins::BufferSimple *err) {
return nullptr;
}
} // namespace IGC
#include "cif/macros/disable.h"
@ -593,6 +600,13 @@ IGC::FclOclTranslationCtxBase *MockFclOclDeviceCtx::CreateTranslationCtxImpl(CIF
return new MockFclOclTranslationCtx;
}
IGC::FclOclTranslationCtxBase *MockFclOclDeviceCtx::CreateTranslationCtxImpl(CIF::Version_t ver,
IGC::CodeType::CodeType_t inType,
IGC::CodeType::CodeType_t outType,
CIF::Builtins::BufferSimple *err) {
return new MockFclOclTranslationCtx;
}
std::vector<char> MockCompilerInterface::getDummyGenBinary() {
return MockSipKernel::getDummyGenBinary();
}

View File

@ -235,7 +235,7 @@ struct MockFclOclTranslationCtx : MockCIF<IGC::FclOclTranslationCtxTagOCL> {
uint32_t tracingOptionsCount) override;
};
struct MockFclOclDeviceCtx : MockCIF<IGC::FclOclDeviceCtxTagOCL> {
struct MockFclOclDeviceCtx : MockCIF<IGC::FclOclDeviceCtx<3>> {
MockFclOclDeviceCtx();
~MockFclOclDeviceCtx() override;
@ -248,6 +248,11 @@ struct MockFclOclDeviceCtx : MockCIF<IGC::FclOclDeviceCtxTagOCL> {
IGC::CodeType::CodeType_t inType,
IGC::CodeType::CodeType_t outType) override;
IGC::FclOclTranslationCtxBase *CreateTranslationCtxImpl(CIF::Version_t ver,
IGC::CodeType::CodeType_t inType,
IGC::CodeType::CodeType_t outType,
CIF::Builtins::BufferSimple *err) override;
uint32_t oclApiVersion = 120;
};