DPA Group Affinity Support Status

Hello,

I’ve created a DPA group using the dpaeumgmt tool, and am trying to use the group with the affinity and thread flow in the DOCA DPA documentation.

doca_error_t doca_dpa_eu_affinity_create(struct doca_dpa *dpa, struct doca_dpa_eu_affinity **affinity)
doca_error_t doca_dpa_eu_affinity_set(struct doca_dpa_eu_affinity *affinity, unsigned int eu_id)
doca_error_t doca_dpa_thread_create(struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread)
doca_error_t doca_dpa_thread_set_affinity(struct doca_dpa_thread *thread, struct doca_dpa_eu_thread_affinity *eu_affinity)

I’ve set eu_id to my group ID (1), but I’m not sure if this is the right way. Performance numbers remain the same no matter what eu_id I use, then increase when I don’t set an affinity at all (assumedly because I’m using all DPAs at that point). It seems as though eu_id is referring to a single EU, not the group.

In the dpaeumgmt documentation we see

After successfully creating an EU group, users can run a DPA thread using group affinity with the affinity type set to the group's ID.

There seems to be no explicit DPA group setting right now in the API. Is this currently supported?

Thank you.

Hello @nvidiasuperfan,

Thank you for posting your query on our community.

Based on the DOCA DPA documentation, I would like to clarify a few points regarding group affinity and the Execution Unit Groups (EUGs) feature:

  1. As noted, group affinity is supported in the API, and you should be able to use the group ID to set the affinity for DPA threads. This would allow a thread to execute on any available EU within the group.
  2. The Execution Unit Groups feature, as described in the documentation, is currently unsupported. This means that while you can create a group and set affinity to a group ID, group-based execution (where a thread dynamically selects an EU from a group) may not function as expected.
    For more information, you can refer to the relevant section of the documentation here: DPA Development - NVIDIA Docs
  3. It is also important to note that a DPA thread may only execute if an EU is available. If all the EUs in the specified group are occupied, the thread will not execute until an EU becomes available.
  4. You can check if your EU group exists and retrieve relevant details using the dpaeumgmt tool:
    $ sudo ./dpaeumgmt eu_group info -d

To summarize - While group affinity is supported in theory, Execution Unit Groups are currently unsupported, which could limit the functionality of group-based execution. Hope this answers your question.

Thanks,
Bhargavi