Relation between device buffer and activity buffer

I have two questions regarding the setup of the activity buffer.

  1. What is the relationship between the user-allocated activity buffer size and the CUPTI-maintained device buffer size CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE? Are they completely independent of each other, or the former should be the same with the latter?
  2. Is it recommended to make the user-allocated activity buffer pinned? I would imagine that CUPTI copies the results from the device buffer to the host activity buffer, and making the activity buffer pinned gives bandwidth advantage.
    Thanks!
    PS: CUDA 12.4 on Ubuntu 22.04.

Hi King_Crimson, answering your questions below

  1. Both these buffers are completely independent of each other.
  2. No, the user-allocated buffer should not be pinned. CUPTI does not copy the device buffer to the host activity buffer.
    CUPTI uses device buffer for internal purposes like fetching the timestamps.
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.