On 30/01/2020 16:08, Thomas Schwinge wrote:
Hi!

Andrew and Frederik, thanks for your emails reminding/educating me about
'snprintf' as well as this HSA fixed-size buffer API.  There doesn't
happen to be something available in the HSA API available so that we
could use 'sizeof [something]' instead of hard-coding '64' etc.?

No, not at present; hsa_agent_get_info_fn is a somewhat generic interface that takes an enum and returns a void*. The return type is written in the documentation: https://rocm-documentation.readthedocs.io/en/latest/ROCm_API_References/ROCr-API.html#rocr-api

However, we don't use the official ROCm header files, because dependencies and licenses, so we could invent our own typedefs in hsa.h, if we chose. I don't see that doing so would be worth the effort now, or maintenance burden later.

I'll let Frederik explain his implementation decisions.

Andrew

Reply via email to