mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Add info about supported thread arbitration policies
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6a4c263bd6
commit
3d13a9d855
@@ -15,6 +15,7 @@
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
#include "opencl/source/helpers/cl_hw_helper.h"
|
||||
#include "opencl/source/platform/extensions.h"
|
||||
#include "opencl/source/sharings/sharing_factory.h"
|
||||
|
||||
@@ -373,7 +374,12 @@ void ClDevice::initializeCaps() {
|
||||
deviceInfo.queueFamilyProperties.push_back(properties);
|
||||
}
|
||||
}
|
||||
|
||||
auto &clHwHelper = NEO::ClHwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
const std::vector<uint32_t> &supportedThreadArbitrationPolicies = clHwHelper.getSupportedThreadArbitrationPolicies();
|
||||
deviceInfo.supportedThreadArbitrationPolicies.resize(supportedThreadArbitrationPolicies.size());
|
||||
for (size_t policy = 0u; policy < supportedThreadArbitrationPolicies.size(); policy++) {
|
||||
deviceInfo.supportedThreadArbitrationPolicies[policy] = supportedThreadArbitrationPolicies[policy];
|
||||
}
|
||||
deviceInfo.preemptionSupported = false;
|
||||
deviceInfo.maxGlobalVariableSize = ocl21FeaturesEnabled ? 64 * KB : 0;
|
||||
deviceInfo.globalVariablePreferredTotalSize = ocl21FeaturesEnabled ? static_cast<size_t>(sharedDeviceInfo.maxMemAllocSize) : 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "opencl/source/cl_device/cl_device_info_map.h"
|
||||
#include "opencl/source/cl_device/cl_device_vector.h"
|
||||
#include "opencl/source/helpers/cl_device_helpers.h"
|
||||
#include "opencl/source/helpers/cl_hw_helper.h"
|
||||
#include "opencl/source/helpers/get_info_status_mapper.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
|
||||
@@ -237,6 +238,10 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
|
||||
src = deviceInfo.extensionsWithVersion.data();
|
||||
retSize = srcSize = deviceInfo.extensionsWithVersion.size() * sizeof(cl_name_version);
|
||||
break;
|
||||
case CL_DEVICE_SUPPORTED_THREAD_ARBITRATION_POLICY_INTEL:
|
||||
src = deviceInfo.supportedThreadArbitrationPolicies.data();
|
||||
retSize = srcSize = deviceInfo.supportedThreadArbitrationPolicies.size() * sizeof(cl_uint);
|
||||
break;
|
||||
default:
|
||||
if (getDeviceInfoForImage(paramName, src, srcSize, retSize) && !getSharedDeviceInfo().imageSupport) {
|
||||
src = &value;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -132,6 +132,7 @@ struct ClDeviceInfo {
|
||||
cl_unified_shared_memory_capabilities_intel singleDeviceSharedMemCapabilities;
|
||||
cl_unified_shared_memory_capabilities_intel crossDeviceSharedMemCapabilities;
|
||||
cl_unified_shared_memory_capabilities_intel sharedSystemMemCapabilities;
|
||||
StackVec<uint32_t, 4> supportedThreadArbitrationPolicies;
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user