mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
refactor: change priority type to int32_t
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d68cfab86c
commit
9c41fe996d
@@ -182,8 +182,8 @@ ze_result_t zeDeviceSynchronize(ze_device_handle_t hDevice) {
|
||||
}
|
||||
ze_result_t ZE_APICALL zeDeviceGetPriorityLevels(
|
||||
ze_device_handle_t hDevice,
|
||||
int *lowestPriority,
|
||||
int *highestPriority) {
|
||||
int32_t *lowestPriority,
|
||||
int32_t *highestPriority) {
|
||||
return L0::Device::fromHandle(hDevice)->getPriorityLevels(lowestPriority, highestPriority);
|
||||
}
|
||||
|
||||
@@ -378,8 +378,8 @@ ze_result_t ZE_APICALL zeDeviceSynchronize(ze_device_handle_t hDevice) {
|
||||
|
||||
ze_result_t ZE_APICALL zeDeviceGetPriorityLevels(
|
||||
ze_device_handle_t hDevice,
|
||||
int *lowestPriority,
|
||||
int *highestPriority) {
|
||||
int32_t *lowestPriority,
|
||||
int32_t *highestPriority) {
|
||||
return L0::zeDeviceGetPriorityLevels(hDevice, lowestPriority, highestPriority);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ void Device::ensureSyncDispatchTokenAllocation() {
|
||||
}
|
||||
}
|
||||
|
||||
ze_result_t Device::getPriorityLevels(int *lowestPriority, int *highestPriority) {
|
||||
ze_result_t Device::getPriorityLevels(int32_t *lowestPriority, int32_t *highestPriority) {
|
||||
|
||||
*highestPriority = queuePriorityHigh;
|
||||
*lowestPriority = queuePriorityLow;
|
||||
|
||||
@@ -160,8 +160,8 @@ struct Device : _ze_device_handle_t {
|
||||
void ensureSyncDispatchTokenAllocation();
|
||||
void setIdentifier(uint32_t id) { identifier = id; }
|
||||
uint32_t getIdentifier() const { return identifier; }
|
||||
ze_result_t getPriorityLevels(int *lowestPriority,
|
||||
int *highestPriority);
|
||||
ze_result_t getPriorityLevels(int32_t *lowestPriority,
|
||||
int32_t *highestPriority);
|
||||
|
||||
protected:
|
||||
NEO::Device *neoDevice = nullptr;
|
||||
@@ -174,9 +174,9 @@ struct Device : _ze_device_handle_t {
|
||||
std::mutex syncDispatchTokenMutex;
|
||||
std::atomic<uint32_t> syncDispatchQueueIdAllocator = 0;
|
||||
uint32_t identifier = 0;
|
||||
int32_t queuePriorityHigh = 0;
|
||||
int32_t queuePriorityLow = 1;
|
||||
bool implicitScalingCapable = false;
|
||||
int queuePriorityHigh = 0;
|
||||
int queuePriorityLow = 1;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -1704,7 +1704,7 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
|
||||
auto &productHelper = device->getProductHelper();
|
||||
device->calculationForDisablingEuFusionWithDpasNeeded = productHelper.isCalculationForDisablingEuFusionWithDpasNeeded(hwInfo);
|
||||
|
||||
auto numPriorities = static_cast<int>(device->getNEODevice()->getGfxCoreHelper().getQueuePriorityLevels());
|
||||
auto numPriorities = static_cast<int32_t>(device->getNEODevice()->getGfxCoreHelper().getQueuePriorityLevels());
|
||||
|
||||
device->queuePriorityHigh = -(numPriorities + 1) / 2 + 1;
|
||||
device->queuePriorityLow = (numPriorities) / 2;
|
||||
|
||||
@@ -6827,8 +6827,8 @@ HWTEST2_F(DeviceSimpleTests, givenDeviceWhenQueryingPriorityLevelsThenHighAndLow
|
||||
|
||||
HWTEST2_F(DeviceSimpleTests, givenDeviceWhenQueryingPriorityLevelsThen2LevelsAreReturned, IsAtMostXe3Core) {
|
||||
|
||||
int highestPriorityLevel = 0;
|
||||
int lowestPriorityLevel = 0;
|
||||
int32_t highestPriorityLevel = 0;
|
||||
int32_t lowestPriorityLevel = 0;
|
||||
|
||||
auto result = zeDeviceGetPriorityLevels(device, &lowestPriorityLevel, &highestPriorityLevel);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
@@ -569,8 +569,8 @@ zeIntelMemGetFormatModifiersSupportedExp(
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
||||
ze_result_t ZE_APICALL zeDeviceGetPriorityLevels(
|
||||
ze_device_handle_t hDevice,
|
||||
int *lowestPriority,
|
||||
int *highestPriority);
|
||||
int32_t *lowestPriority,
|
||||
int32_t *highestPriority);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Descriptor used for setting priority on command queues and immediate command lists.
|
||||
|
||||
Reference in New Issue
Block a user