XRT
XRT copied to clipboard
VITIS-11024 enable hw_context support for xrt::graph objects 2nd commit
Problem solved by the commit
https://jira.xilinx.com/browse/VITIS-11024 currently we can load only one xclbin in graph supported devices , we cannot load multiple xclbins in multiple partitions in device..
This is second commit for VITIS-11024 First commit: https://github.com/Xilinx/XRT/pull/8242
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
N/A
How problem was solved, alternative solutions (if any) and why they were rejected
These first set of changes are enabling interface to support multiple xclbins in multiple partitions in device by creating "hardware context" associated with device id and xclbin. Interfaces are created for application developers and driver component owners to load mulitple xclbins in device by creating hardware context with particular device and particualr xclbin. New shim changes (driver changes) are required to fully utilize hardware context interfaces and fullfill actual requirements. currently used old shim by extracting device and xclbin from hardware context (loaded single device id with single xclbin)
Risks (if any) associated the changes in the commit
Documentation for this change might be required, should not break old flow where it still supports to load xclbin with device id. And as mentioned in above field new shim changes (driver changes) are required.
What has been tested and how, request additional testing if necessary
Used Graph test use case where input array and input factor are provided, ouput array would be generated by muliplying input array with input factor.
Initializing ADF API... [ 99.707868] zocl-drm axi:zyxclmm_drm: zocl_create_client: created KDS client for pid(589), ret: 0 [ 99.716043] zocl-drm axi:zyxclmm_drm: zocl_destroy_client: client exits pid(589) [ 99.778415] zocl-drm axi:zyxclmm_drm: zocl_create_client: created KDS client for pid(589), ret: 0 [ 108.057897] [drm] Loading xclbin 63723cb0-4f53-4aa2-5ab0-60152b9af36b to slot 0 [ 108.058281] [drm] found kind 29(AIE_RESOURCES) [ 108.062967] [drm] skip kind 8(IP_LAYOUT) return code: -22 [ 108.065298] [drm] found kind 9(DEBUG_IP_LAYOUT) [ 108.067367] [drm] found kind 25(AIE_METADATA) [ 108.069022] [drm] skip kind 7(CONNECTIVITY) return code: -22 [ 108.070547] [drm] found kind 6(MEM_TOPOLOGY) [ 108.073657] [drm] Memory 0 is not reserved in device tree. Will allocate memory from CMA [ 108.403376] [drm] AIE create successfully finished. XAIEFAL: INFO: Resource group Avail is created. XAIEFAL: INFO: Resource group Static is created. XAIEFAL: INFO: Resource group Generic is created. [ 108.404487] [drm] zocl_xclbin_read_axlf 63723cb0-4f53-4aa2-5ab0-60152b9af36b ret: 0 [ 108.585794] [drm] bitstream 63723cb0-4f53-4aa2-5ab0-60152b9af36b locked, ref=1 [ 108.594516] zocl-drm axi:zyxclmm_drm: ffff000001f5d410 kds_add_context: Client pid(589) add context Domain(65535) CU(0xffff) shared(true) [ 108.603146] zocl-drm axi:zyxclmm_drm: ffff000001f5d410 kds_del_context: Client pid(589) del context Domain(65535) CU(0xffff) graph run completed ..... trying alias graph rtp read completed ..... graph end completed ..... output Vector 1 value 3 output Vector 1 value 6 output Vector 1 value 9 output Vector 1 value 12 output Vector 1 value 15 output Vector 1 value 18 output Vector 1 value 21 output Vector 1 value 24 TEST PASSED
Documentation impact (if any)
Graph doumentation may needs to be updated with "hwctx" things. And currently both kernel and graph support only c++ API's with "hardware context"