Skip to content

Commit

Permalink
Merge branch 'Xilinx:master' into 2023.1_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojTakasi authored Jun 27, 2023
2 parents ca747dd + 2534930 commit 4c85e8e
Show file tree
Hide file tree
Showing 15 changed files with 840 additions and 655 deletions.
6 changes: 6 additions & 0 deletions src/runtime_src/core/edge/user/shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ xclAllocBO(size_t size, unsigned flags)
{
drm_zocl_create_bo info = { size, 0xffffffff, flags};
int result = ioctl(mKernelFD, DRM_IOCTL_ZOCL_CREATE_BO, &info);

if (result)
throw std::bad_alloc();

xclLog(XRT_DEBUG, "%s: size %ld, flags 0x%x", __func__, size, flags);
xclLog(XRT_INFO, "%s: ioctl return %d, bo handle %d", __func__, result, info.handle);
Expand All @@ -311,6 +314,9 @@ xclAllocUserPtrBO(void *userptr, size_t size, unsigned flags)
drm_zocl_userptr_bo info = {reinterpret_cast<uint64_t>(userptr), size, 0xffffffff, flags};
int result = ioctl(mKernelFD, DRM_IOCTL_ZOCL_USERPTR_BO, &info);

if (result)
throw std::bad_alloc();

xclLog(XRT_DEBUG, "%s: userptr %p size %ld, flags 0x%x", __func__, userptr, size, flags);
xclLog(XRT_INFO, "%s: ioctl return %d, bo handle %d", __func__, result, info.handle);

Expand Down
Loading

0 comments on commit 4c85e8e

Please sign in to comment.