mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Enable NodeMask Generation thru L0 LUID Extension
Related-To: LOCI-3250 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
aafe562bce
commit
4fce3ede9b
@@ -821,11 +821,11 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
if (extendedProperties->stype == ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES) {
|
||||
ze_device_luid_ext_properties_t *deviceLuidProperties =
|
||||
reinterpret_cast<ze_device_luid_ext_properties_t *>(extendedProperties);
|
||||
deviceLuidProperties->nodeMask = queryDeviceNodeMask();
|
||||
ze_result_t result = queryDeviceLuid(deviceLuidProperties);
|
||||
if (result != ZE_RESULT_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
deviceLuidProperties->nodeMask = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ struct DeviceImp : public Device {
|
||||
ze_result_t queryDeviceLuid(ze_device_luid_ext_properties_t *deviceLuidProperties);
|
||||
ze_result_t setDeviceLuid(ze_device_luid_ext_properties_t *deviceLuidProperties);
|
||||
uint32_t getEventMaxPacketCount() const override;
|
||||
uint32_t queryDeviceNodeMask();
|
||||
|
||||
protected:
|
||||
void adjustCommandQueueDesc(uint32_t &ordinal, uint32_t &index);
|
||||
|
||||
@@ -12,5 +12,8 @@ namespace L0 {
|
||||
ze_result_t DeviceImp::queryDeviceLuid(ze_device_luid_ext_properties_t *deviceLuidProperties) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
uint32_t DeviceImp::queryDeviceNodeMask() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
@@ -32,5 +32,17 @@ ze_result_t DeviceImp::queryDeviceLuid(ze_device_luid_ext_properties_t *deviceLu
|
||||
}
|
||||
return ZE_RESULT_ERROR_UNINITIALIZED;
|
||||
}
|
||||
uint32_t DeviceImp::queryDeviceNodeMask() {
|
||||
NEO::Device *activeDevice = getActiveDevice();
|
||||
if (activeDevice->getRootDeviceEnvironment().osInterface) {
|
||||
NEO::DriverModelType driverType = neoDevice->getRootDeviceEnvironment().osInterface->getDriverModel()->getDriverModelType();
|
||||
if (driverType == NEO::DriverModelType::WDDM) {
|
||||
NEO::CommandStreamReceiver *csr = activeDevice->getDefaultEngine().commandStreamReceiver;
|
||||
NEO::OsContextWin *context = static_cast<NEO::OsContextWin *>(&csr->getOsContext());
|
||||
return context->getDeviceNodeMask();
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
@@ -24,5 +24,11 @@ ze_result_t DeviceImp::queryDeviceLuid(ze_device_luid_ext_properties_t *deviceLu
|
||||
std::copy_n(luidData.begin(), ZE_MAX_DEVICE_LUID_SIZE_EXT, std::begin(deviceLuidProperties->luid.id));
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
uint32_t DeviceImp::queryDeviceNodeMask() {
|
||||
NEO::Device *activeDevice = getActiveDevice();
|
||||
NEO::CommandStreamReceiver *csr = activeDevice->getDefaultEngine().commandStreamReceiver;
|
||||
NEO::OsContextWin *context = static_cast<NEO::OsContextWin *>(&csr->getOsContext());
|
||||
return context->getDeviceNodeMask();
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
Reference in New Issue
Block a user