Files
compute-runtime/level_zero/core/source/fabric/fabric.h
Joshua Santosh Ranjan 44a1f4822b Update Fabric Vertex Support to include iaf querying
This patch adds
1. enumeration of connected iaf devices
2. move fabric vertex to driver, to support deviceless
vertices case

Related-To: LOCI-3376

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2022-10-06 11:45:39 +02:00

42 lines
1.1 KiB
C++

/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <level_zero/ze_api.h>
#include <memory>
#include <vector>
struct _ze_fabric_vertex_handle_t {};
namespace L0 {
struct Device;
class FabricDeviceInterface;
struct FabricVertex : _ze_fabric_vertex_handle_t {
public:
static FabricVertex *createFromDevice(Device *device);
virtual ~FabricVertex();
ze_result_t getSubVertices(uint32_t *pCount, ze_fabric_vertex_handle_t *phSubvertices);
ze_result_t getProperties(ze_fabric_vertex_exp_properties_t *pVertexProperties) const;
ze_result_t getDevice(ze_device_handle_t *phDevice) const;
static FabricVertex *fromHandle(ze_fabric_vertex_handle_t handle) { return static_cast<FabricVertex *>(handle); }
inline ze_fabric_vertex_handle_t toHandle() { return this; }
std::unique_ptr<FabricDeviceInterface> pFabricDeviceInterface;
private:
struct Device *device = nullptr;
ze_fabric_vertex_exp_properties_t properties = {};
std::vector<FabricVertex *> subVertices = {};
};
} // namespace L0