clvk
clvk copied to clipboard
Fix/improve printf support
- [ ] Support batching kernels that use printf
- [ ] Remove serialisation between kernel regions when printf is used
- [ ] Introduce unit test callback to give tests access to printf's output stream and remove all stdout capture logic (https://github.com/kpet/clvk/pull/565#discussion_r1264651226)
- [ ] Fix concurrent accesses to the printf buffer (https://github.com/kpet/clvk/pull/565#discussion_r1264652192). Add tests.
Hey Kevin can you please check off point 3? I will start working on other parts now.
To fix the issue with concurrent accesses, we mentioned during our last discussion that we might just not perform any reset.
I don't think this would be working because, when we print on clvk side, we go from offset 0, to the end offset.
The issue is with both 0 (the start offset) and the end offset (first word of the printf buffer).
So 2 possibilities:
- continuing the work that @Rekt3421 started (having one printf buffer per kernel instead of having one per queue)
- changing the printf interface in clspv to use another buffer containing 2 words (a per-kernel buffer) to indicate the start&end offset
@kpet what do you think?