We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 482e76c commit be88bccCopy full SHA for be88bcc
src/runtime_src/core/pcie/emulation/hw_emu/alveo_shim/shim.cxx
@@ -2675,7 +2675,10 @@ namespace xclhwemhal2 {
2675
// Shim object creation doesn't follow xclOpen/xclClose.
2676
// The core device must correspond to open and close, so
2677
// create here rather than in constructor
2678
- mCoreDevice = xrt_core::hwemu::get_userpf_device(this, mDeviceIndex);
+ // Also create it only for the first time as in further
2679
+ // iterations device is cached and returned
2680
+ if (!mCoreDevice)
2681
+ mCoreDevice = xrt_core::hwemu::get_userpf_device(this, mDeviceIndex);
2682
2683
device_handles::add(this);
2684
}
0 commit comments