More comprehensive IOCTL PC sampling checks (mi200 and mi300) (#1045)

* More comprehensive IOCTL PC sampling checks (mi200 and mi300)

* PC sampling tests: formatting
This commit is contained in:
Vladimir Indic
2024-09-06 16:45:05 +02:00
committed by GitHub
parent 93e82663d9
commit 8bf2ce622c
3 changed files with 39 additions and 18 deletions
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#include "lib/common/utility.hpp"
#include <rocprofiler-sdk/buffer.h>
#include <rocprofiler-sdk/fwd.h>
#include <rocprofiler-sdk/internal_threading.h>
@@ -322,9 +324,11 @@ TEST(pc_sampling, rocprofiler_configure_pc_sampling_service)
static_cast<void*>(&cb_data->gpu_pcs_agents)),
"Failed to find GPU agents");
// TODO-VLAINDIC: Can we dynamically skip the test if the underlying
// HW does not support PC sampling
if(cb_data->gpu_pcs_agents.size() == 0) exit(0);
if(cb_data->gpu_pcs_agents.size() == 0)
{
ROCP_ERROR << "PC sampling unavailable\n";
exit(0);
}
ROCPROFILER_CALL(rocprofiler_create_context(&cb_data->client_ctx),
"failed to create context");