Support for FabricEdge APIs

Related-To: LOCI-3377

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2022-09-20 09:09:12 +00:00
committed by Compute-Runtime-Automation
parent 553e194379
commit a93edd8620
24 changed files with 1046 additions and 28 deletions

View File

@@ -135,6 +135,7 @@ struct Device : _ze_device_handle_t {
virtual ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) = 0;
virtual NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) = 0;
virtual void storeReusableAllocation(NEO::GraphicsAllocation &alloc) = 0;
virtual ze_result_t getFabricVertex(ze_fabric_vertex_handle_t *phVertex) const = 0;
protected:
NEO::Device *neoDevice = nullptr;

View File

@@ -1480,4 +1480,13 @@ NEO::EngineGroupType DeviceImp::getEngineGroupTypeForOrdinal(uint32_t ordinal) c
return engineGroupType;
}
ze_result_t DeviceImp::getFabricVertex(ze_fabric_vertex_handle_t *phVertex) const {
if (fabricVertex == nullptr) {
return ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX;
}
*phVertex = fabricVertex->toHandle();
return ZE_RESULT_SUCCESS;
}
} // namespace L0

View File

@@ -116,6 +116,7 @@ struct DeviceImp : public Device {
std::vector<Device *> subDevices;
std::unordered_map<uint32_t, bool> crossAccessEnabledDevices;
DriverHandle *driverHandle = nullptr;
FabricVertex *fabricVertex = nullptr;
CommandList *pageFaultCommandList = nullptr;
ze_pci_speed_ext_t pciMaxSpeed = {-1, -1, -1};
@@ -136,7 +137,7 @@ struct DeviceImp : public Device {
using CmdListCreateFunPtrT = L0::CommandList *(*)(uint32_t, Device *, NEO::EngineGroupType, ze_command_list_flags_t, ze_result_t &);
CmdListCreateFunPtrT getCmdListCreateFunc(const ze_command_list_desc_t *desc);
FabricVertex *fabricVertex = nullptr;
ze_result_t getFabricVertex(ze_fabric_vertex_handle_t *phVertex) const override;
ze_result_t queryDeviceLuid(ze_device_luid_ext_properties_t *deviceLuidProperties);
ze_result_t setDeviceLuid(ze_device_luid_ext_properties_t *deviceLuidProperties);