mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
OpenCL Queue Families extension 2/n
Disable CL_QUEUE_CAPABILITY_KERNEL_INTEL capability for copy queues Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5120
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
438ad860ab
commit
2184ba7ec8
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/device/sub_device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/program/sync_buffer_handler.h"
|
||||
@@ -201,4 +202,33 @@ bool ClDevice::arePipesSupported() const {
|
||||
return device.getHardwareInfo().capabilityTable.supportsPipes;
|
||||
}
|
||||
|
||||
cl_command_queue_capabilities_intel ClDevice::getQueueFamilyCapabilitiesAll() {
|
||||
return CL_QUEUE_CAPABILITY_EVENT_WAIT_LIST_INTEL |
|
||||
CL_QUEUE_CAPABILITY_EVENTS_INTEL |
|
||||
CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_INTEL |
|
||||
CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_RECT_INTEL |
|
||||
CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL |
|
||||
CL_QUEUE_CAPABILITY_FILL_BUFFER_INTEL |
|
||||
CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_INTEL |
|
||||
CL_QUEUE_CAPABILITY_MAP_IMAGE_INTEL |
|
||||
CL_QUEUE_CAPABILITY_FILL_IMAGE_INTEL |
|
||||
CL_QUEUE_CAPABILITY_MARKER_INTEL |
|
||||
CL_QUEUE_CAPABILITY_BARRIER_INTEL |
|
||||
CL_QUEUE_CAPABILITY_KERNEL_INTEL;
|
||||
}
|
||||
|
||||
cl_command_queue_capabilities_intel ClDevice::getQueueFamilyCapabilities(EngineGroupType type) {
|
||||
auto &hwHelper = NEO::HwHelper::get(getHardwareInfo().platform.eRenderCoreFamily);
|
||||
|
||||
cl_command_queue_capabilities_intel disabledProperties = 0u;
|
||||
if (hwHelper.isCopyOnlyEngineType(type)) {
|
||||
disabledProperties |= CL_QUEUE_CAPABILITY_KERNEL_INTEL;
|
||||
}
|
||||
|
||||
if (disabledProperties != 0) {
|
||||
return getQueueFamilyCapabilitiesAll() & ~disabledProperties;
|
||||
}
|
||||
return CL_QUEUE_CAPABILITY_ALL_INTEL;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -123,6 +123,9 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
||||
bool isDeviceEnqueueSupported() const;
|
||||
bool arePipesSupported() const;
|
||||
|
||||
static cl_command_queue_capabilities_intel getQueueFamilyCapabilitiesAll();
|
||||
MOCKABLE_VIRTUAL cl_command_queue_capabilities_intel getQueueFamilyCapabilities(EngineGroupType type);
|
||||
|
||||
protected:
|
||||
void initializeCaps();
|
||||
void initializeExtensionsWithVersion();
|
||||
|
||||
@@ -365,8 +365,9 @@ void ClDevice::initializeCaps() {
|
||||
for (int queueFamilyIndex = 0; queueFamilyIndex < static_cast<int>(EngineGroupType::MaxEngineGroups); queueFamilyIndex++) {
|
||||
const std::vector<EngineControl> &enginesInFamily = queueFamilies.at(queueFamilyIndex);
|
||||
if (enginesInFamily.size() > 0) {
|
||||
const auto engineGroupType = static_cast<EngineGroupType>(queueFamilyIndex);
|
||||
cl_queue_family_properties_intel properties;
|
||||
properties.capabilities = CL_QUEUE_CAPABILITY_ALL_INTEL;
|
||||
properties.capabilities = getQueueFamilyCapabilities(engineGroupType);
|
||||
properties.count = static_cast<cl_uint>(enginesInFamily.size());
|
||||
properties.properties = deviceInfo.queueOnHostProperties;
|
||||
deviceInfo.queueFamilyProperties.push_back(properties);
|
||||
|
||||
Reference in New Issue
Block a user