From a26bcc22a42ca8a0366d3854607be3ac27a2f143 Mon Sep 17 00:00:00 2001 From: Sravankumar allu Date: Wed, 18 Sep 2024 15:28:35 +0530 Subject: [PATCH] graph_object constructor with aieArray instance Signed-off-by: Sravankumar allu --- src/runtime_src/core/edge/user/aie/graph_object.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/runtime_src/core/edge/user/aie/graph_object.cpp b/src/runtime_src/core/edge/user/aie/graph_object.cpp index d63b0dc7787..3d6226c1e48 100644 --- a/src/runtime_src/core/edge/user/aie/graph_object.cpp +++ b/src/runtime_src/core/edge/user/aie/graph_object.cpp @@ -17,10 +17,12 @@ namespace zynqaie { auto device{xrt_core::get_userpf_device(m_shim)}; auto drv = ZYNQ::shim::handleCheck(device->get_device_handle()); - if (!drv->isAieRegistered()) - throw xrt_core::error(-EINVAL, "No AIE presented"); - - aieArray = drv->get_aie_array_shared(); +#ifdef XRT_ENABLE_AIE + if (nullptr != m_hwctx) + aieArray = m_hwctx->get_aie_array_shared(); + else if (drv->isAieRegistered()) + aieArray = drv->get_aie_array_shared(); +#endif id = xrt_core::edge::aie::get_graph_id(device.get(), name, m_hwctx); if (id == xrt_core::edge::aie::NON_EXIST_ID)