Closed dezhiAmd closed 1 month ago
Currently all input buffer are created here
This is not correct, they are created in many places and the flags are set in many places, such as in runtime/src/iree-amd-aie/driver/xrt/direct_allocator.cc
There is no buffer created in function iree_hal_xrt_allocator_query_buffer_compatibility which is the link point to.
Please reread my comment again.
@dezhiAmd please do not resolve conversations without making requested changes. That is our policy.
@dezhiAmd please also do not delete comments since it completely distorts the discussion.
@makslevental , Which test/application do you use to test runtime/src/iree-amd-aie/driver/xrt/cts/matmul_dispatch_test.cc?
At this point, I am not looking for PR approval, I am looking for answers for one question: How to test code in runtime/src/iree-amd-aie/driver/xrt/cts/matmul_dispatch_test.cc? Please share the knowledge if you have it
@makslevental , Which test/application do you use to test runtime/src/iree-amd-aie/driver/xrt/cts/matmul_dispatch_test.cc?
ctest -R driver/xrt/cts
At this point, I am not looking for PR approval, I am looking for answers for one question: How to test code in runtime/src/iree-amd-aie/driver/xrt/cts/matmul_dispatch_test.cc? Please share the knowledge if you have it
Please stop re-requesting reviews then. That is not the purpose of review requests. It's sufficient to simply ask the question.
Issue description: In function iree_hal_xrt_direct_command_buffer_dispatch, all buffers are trying to sync from the device regardless of it is buffer for holding input or output. This may impact performance.
Solution: Use member allowed_usage and memory_type in struct iree_hal_buffer_t to decide whether the buffer is for input or output. Currently all input buffer are created here
Assumption: output buffer will never use IREE_HAL_BUFFER_USAGE_MAPPING flag since mapping can be extremely expensive, use limited hardware resources, introduce data hazards, and synchronize host and device execution. But input buffer cannot avoid using this flag