Add debug flag to force nonblocking exec buffer calls when using prelim kernel

Related-To: NEO-7144
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-11-03 07:46:57 +00:00
committed by Compute-Runtime-Automation
parent 3b4695460a
commit d45d62ef0e
4 changed files with 52 additions and 4 deletions

View File

@ -31,8 +31,11 @@ namespace NEO {
IoctlHelperPrelim20::IoctlHelperPrelim20(Drm &drmArg) : IoctlHelper(drmArg) {
auto hwHelper = HwInfoConfig::get(this->drm.getRootDeviceEnvironment().getHardwareInfo()->platform.eProductFamily);
if (hwHelper && hwHelper->isNonBlockingGpuSubmissionSupported()) {
handleExecBufferInNonBlockMode = true;
handleExecBufferInNonBlockMode = hwHelper && hwHelper->isNonBlockingGpuSubmissionSupported();
if (DebugManager.flags.ForceNonblockingExecbufferCalls.get() != -1) {
handleExecBufferInNonBlockMode = DebugManager.flags.ForceNonblockingExecbufferCalls.get();
}
if (handleExecBufferInNonBlockMode) {
auto fileDescriptor = this->drm.getFileDescriptor();
SysCalls::fcntl(fileDescriptor, F_SETFL, SysCalls::fcntl(fileDescriptor, F_GETFL) | O_NONBLOCK);
}