mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Refactor SipKernel
- add debug bindless SipKernelType Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d79317da35
commit
2fb8edb69f
@@ -31,10 +31,6 @@ BuiltIns::BuiltIns() {
|
||||
BuiltIns::~BuiltIns() = default;
|
||||
|
||||
const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) {
|
||||
return getSipKernel(type, false, device);
|
||||
}
|
||||
|
||||
const SipKernel &BuiltIns::getSipKernel(SipKernelType type, bool bindlessSip, Device &device) {
|
||||
uint32_t kernelId = static_cast<uint32_t>(type);
|
||||
UNRECOVERABLE_IF(kernelId >= static_cast<uint32_t>(SipKernelType::COUNT));
|
||||
auto &sipBuiltIn = this->sipKernels[kernelId];
|
||||
@@ -45,7 +41,7 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, bool bindlessSip, De
|
||||
auto compilerInteface = device.getCompilerInterface();
|
||||
UNRECOVERABLE_IF(compilerInteface == nullptr);
|
||||
|
||||
auto ret = compilerInteface->getSipKernelBinary(device, type, bindlessSip, sipBinary, stateSaveAreaHeader);
|
||||
auto ret = compilerInteface->getSipKernelBinary(device, type, sipBinary, stateSaveAreaHeader);
|
||||
|
||||
UNRECOVERABLE_IF(ret != TranslationOutput::ErrorCode::Success);
|
||||
UNRECOVERABLE_IF(sipBinary.size() == 0);
|
||||
|
||||
@@ -154,7 +154,6 @@ class BuiltIns {
|
||||
virtual ~BuiltIns();
|
||||
|
||||
MOCKABLE_VIRTUAL const SipKernel &getSipKernel(SipKernelType type, Device &device);
|
||||
MOCKABLE_VIRTUAL const SipKernel &getSipKernel(SipKernelType type, bool bindlessSip, Device &device);
|
||||
MOCKABLE_VIRTUAL void freeSipKernels(MemoryManager *memoryManager);
|
||||
|
||||
BuiltinsLib &getBuiltinsLib() {
|
||||
|
||||
@@ -254,8 +254,15 @@ const SipKernel &SipKernel::getSipKernelImpl(Device &device) {
|
||||
}
|
||||
|
||||
const SipKernel &SipKernel::getBindlessDebugSipKernel(Device &device) {
|
||||
auto debugSipType = SipKernel::getSipKernelType(device, true);
|
||||
return device.getBuiltIns()->getSipKernel(debugSipType, true, device);
|
||||
auto debugSipType = SipKernelType::DbgBindless;
|
||||
SipKernel::initSipKernelImpl(debugSipType, device);
|
||||
|
||||
switch (SipKernel::classType) {
|
||||
case SipClassType::RawBinaryFromFile:
|
||||
return *device.getRootDeviceEnvironment().sipKernels[static_cast<uint32_t>(debugSipType)].get();
|
||||
default:
|
||||
return device.getBuiltIns()->getSipKernel(debugSipType, device);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,6 +15,7 @@ enum class SipKernelType : std::uint32_t {
|
||||
Csr = 0,
|
||||
DbgCsr,
|
||||
DbgCsrLocal,
|
||||
DbgBindless,
|
||||
COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user