Power Saving Hint Support for Level Zero in Windows

- Added Functionality to pass ze_power_saving_hint_type_t to zeContextCreate
included in the pNext extensions in ze_context_desc_t.
- Enables handling a hint value 0-100 with 0 being no power savings
and 100 being maximum power savings.
- ZE_RESULT_ERROR_INVALID_ENUMERATION is returned given an invalid hint.

Related-To: LOCI-2567

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2021-12-16 02:13:00 +00:00
committed by Compute-Runtime-Automation
parent 635c02e1ff
commit 02f075c541
33 changed files with 386 additions and 59 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -161,6 +161,11 @@ CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::
}
auto &osContext = csr->getOsContext();
DriverHandleImp *driverHandleImp = static_cast<DriverHandleImp *>(device->getDriverHandle());
if (driverHandleImp->powerHint && driverHandleImp->powerHint != osContext.getUmdPowerHintValue()) {
osContext.setUmdPowerHintValue(driverHandleImp->powerHint);
osContext.reInitializeContext();
}
osContext.ensureContextInitialized();
csr->initDirectSubmission(*device->getNEODevice(), osContext);
return commandQueue;