What is the purpose of setting maxPassCount to a specific value (e.g. 1) in NVPW_RawMetricsConfig_BeginPassGroup_Params? From the samples that I have used maxPassCount never is actually set and I have not found any documentation discussing this.
In CUPTI, each metric can be considered as a function of one or more raw metrics (also known as raw counters). The NVPW RawMetricsConfig APIs are used to create a configuration image for profiling, which is required for both Range Profiling and PM Sampling. This configuration image includes the scheduling details for the specified metrics, such as the number of passes required to collect the profiling data and the metrics to be collected during each pass. For more details, refer to the CUPTI Host APIs documentation (enumeration and configuration).
The maxPassCount parameter ensures that the configuration image does not exceed the specified number of passes; exceeding this value results in an error during the creation of the configuration image.
By setting maxPassCount to 1, we are limitting metric collection to a single pass.
Note:The NVPW_* APIs are planned to be deprecated in a future release. It’s recommended to transition to the new CUPTI Host APIs (cuptiProfilerHost*) introduced in version 12.6, which are simpler and well-documented.
@ssubudhi Thank you for the reply and the information. That clears a few things up for me, but I have one final clarification question. From my testing if you do not set maxPassCount to a specific value, then it defaults to 0. Does doing this mean that we are not limiting metric collection to any pass?
Correct, the default value is set to zero, meaning there is no restriction on the number of passes for the configuration image. It’s important to note that in CUPTI’s PM Sampling, configuration images requiring more than one pass are not supported. However, no such restriction applies to Range Profiling.