Skip to content

Commit

Permalink
VITIS-11934GeMM Test Has Delay After Setting Performance Mode (Xilinx…
Browse files Browse the repository at this point in the history
…#8348)

Signed-off-by: AShivangi <[email protected]>
  • Loading branch information
AShivangi authored Aug 15, 2024
1 parent 8357fd7 commit 7d95295
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/runtime_src/core/tools/common/tests/TestGemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,22 @@ TestGemm::run(std::shared_ptr<xrt_core::device> dev)

//set to performance mode
xrt_core::device_update<xrt_core::query::performance_mode>(dev.get(), xrt_core::query::performance_mode::power_type::high);
// 5 second delay gives the clocks time to reach the targeted frequency
// remove this when VITIS-11934 is fixed
std::this_thread::sleep_for(std::chrono::milliseconds(5000));

// wait until clock reaches the targeted frequency
auto const target_h_clock_freq = 1810;
int ipu_hclock = 0;
try {
while (ipu_hclock < target_h_clock_freq) {
//get h-clock
auto raw = xrt_core::device_query<xrt_core::query::clock_freq_topology_raw>(dev);
auto clock_topology = reinterpret_cast<const clock_freq_topology*>(raw.data());
for (int c = 0; c < clock_topology->m_count; c++) {
if(boost::iequals(clock_topology->m_clock_freq[c].m_name, "H CLock"))
ipu_hclock = clock_topology->m_clock_freq[c].m_freq_Mhz;
}
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}

try {
//run kernel
auto run = kernel(host_app, NULL, NULL, NULL, NULL, bo_instr, instr_size, NULL);
// Wait for kernel to be done
Expand Down

0 comments on commit 7d95295

Please sign in to comment.