clvk icon indicating copy to clipboard operation
clvk copied to clipboard

Fix/improve printf support

Open kpet opened this issue 2 years ago • 2 comments

  • [ ] 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.

kpet avatar Jul 16 '23 10:07 kpet

Hey Kevin can you please check off point 3? I will start working on other parts now.

Rekt3421 avatar Sep 09 '24 16:09 Rekt3421

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?

rjodinchr avatar Oct 17 '24 16:10 rjodinchr