SWDEV-458392 - Add gfx12 support.

Change-Id: I91bb6a3329bf77f26005a345c18b63b86922028a
This commit is contained in:
jatang
2024-05-07 15:40:56 -04:00
committato da Jason Tang
parent 4d0fee6637
commit e7b96b1e71
10 ha cambiato i file con 199 aggiunte e 11 eliminazioni
@@ -45,7 +45,7 @@ std::string test_app_path;
std::string metrics_path;
std::string binary_path;
std::string profiler_api_lib_path = "";
bool bContainsGFX11Agent = false;
bool bSkipCounterNoneZeroCheck = false;
static void init_test_path() {
lib_path = "lib/rocprofiler/librocprofiler_tool.so";
@@ -519,8 +519,9 @@ TEST_F(LoadUnloadTest, WhenLoadingFirstTimeThenToolLoadsUnloadsSuccessfully) {
std::string agentname;
agentname.resize(64);
hsa_agent_get_info(agent, HSA_AGENT_INFO_NAME, agentname.data());
if (agentname.find("gfx11") != std::string::npos)
bContainsGFX11Agent = true;
if ((agentname.find("gfx11") != std::string::npos) ||
(agentname.find("gfx12") != std::string::npos))
bSkipCounterNoneZeroCheck = true;
hsa_device_type_t type;
return hsa_agent_get_info(agent, HSA_AGENT_INFO_DEVICE, &type);
@@ -896,7 +897,7 @@ class ProfilerAPITest : public ::testing::Test {
CheckApi(rocprofiler_query_kernel_info(ROCPROFILER_KERNEL_NAME, profiler_record->kernel_id,
&kernel_name_c));
if (profiler_record->counters && !bContainsGFX11Agent)
if (profiler_record->counters && !bSkipCounterNoneZeroCheck)
for (uint64_t i = 0; i < profiler_record->counters_count.value; i++)
if (profiler_record->counters[i].counter_handler.handle > 0)
EXPECT_NE(profiler_record->counters[i].value.value, 0);