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

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

* PC sampling tests: formatting
这个提交包含在:
Vladimir Indic 编写, GitHub 于 2024-09-06 09:45:05 -05:00 提交
1 父节点 93e82663d9
当前提交 8bf2ce622c
3 个文件已更改
+39 -18

没有与搜索条件相匹配的文件

@@ -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 <gtest/gtest.h>
#include <rocprofiler-sdk/buffer.h>
#include <rocprofiler-sdk/fwd.h>
@@ -243,9 +245,11 @@ TEST(pc_sampling, query_configs_after_service_setup)
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);
}
int query_cb_data = USER_DATA_VAL;
const auto* agent = cb_data->gpu_pcs_agents.at(0);