/home/runner/work/HiCR/HiCR/include/hicr/backends/ascend/topologyManager.hpp Source File
HiCR
|
topologyManager.hpp
Go to the documentation of this file.
71 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not retrieve Ascend device count. Error %d", err);
81 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not select the Ascend device %d. Error %d", deviceId, err);
84 auto ascendDevice = std::make_shared<ascend::Device>(deviceId, HiCR::Device::computeResourceList_t({}), HiCR::Device::memorySpaceList_t({}));
88 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not get default context in Ascend device %d. Error %d", deviceId, err);
92 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not retrieve Ascend device %d memory space. Error %d", deviceId, err);
142 __INLINE__ HiCR::Topology _deserializeTopology(const nlohmann::json &topology) const override { return deserializeTopology(topology); }
153 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Failed to initialize Ascend Computing Language. Error %d", err);
179 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not determine peer accessibility to device %ld from device %ld.. Error %d", dst, src, err);
181 if (canAccessPeer == 0) HICR_THROW_RUNTIME("Can not access device %ld from device %ld. Error %d", dst, src, err);
188 if (err != ACL_SUCCESS) HICR_THROW_RUNTIME("Can not enable peer access from device %ld to device %ld. Error %d", dst->getId(), src->getId(), err);
This file implements the compute resource class for the Ascend backend.
This file implements the Device class for the Ascend backend.
This file implements the memory space class for the Ascend backend.
std::vector< std::shared_ptr< ComputeResource > > computeResourceList_t
Definition device.hpp:59
std::vector< std::shared_ptr< MemorySpace > > memorySpaceList_t
Definition device.hpp:64
Definition topologyManager.hpp:50
Definition topology.hpp:40
__INLINE__ void addDevice(const std::shared_ptr< HiCR::Device > &device)
Definition topology.hpp:62
static __INLINE__ void verify(const nlohmann::json &input)
Definition topology.hpp:102
Definition device.hpp:39
Definition topologyManager.hpp:45
static __INLINE__ std::unique_ptr< HiCR::TopologyManager > createDefault()
Definition topologyManager.hpp:149
static __INLINE__ HiCR::Topology deserializeTopology(const nlohmann::json &topology)
Definition topologyManager.hpp:120
~TopologyManager()=default
TopologyManager()
Definition topologyManager.hpp:51
__INLINE__ HiCR::Topology queryTopology() override
Definition topologyManager.hpp:60
__INLINE__ HiCR::Topology _deserializeTopology(const nlohmann::json &topology) const override
Definition topologyManager.hpp:142
Provides a definition for the abstract device manager class.
Generated by