Introducing PcSamplingExtTable (#735)
* pcs: updating the PCS table * Fixing Clang Tidy errors * pcs: reverting old table version * testint wrong table size * new size * testing step * reverting old steps * hsa_amd_queue_get_info introduced * pcs: testing table version * formatting * removing redundand declarations * removing unnecessary files * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update source/lib/rocprofiler-sdk/hsa/pc_sampling.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Enable function pointer offset check in hsa::pc_sampling::copy_table - add offset() to HSA_API_META_DEFINITION - check if offset() >= size of struct * Support build without PC sampling API table * ids for ROCr's PC sampling public functions --------- Co-authored-by: Ammar ELWazir <aelwazir@hpe6u-21.amd.com> Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
@@ -39,6 +39,11 @@ TEST(hsa, tables)
|
||||
auto* amd_ext = hsa::get_amd_ext_table();
|
||||
auto* fini_ext = hsa::get_fini_ext_table();
|
||||
auto* img_ext = hsa::get_img_ext_table();
|
||||
auto* amd_tool = hsa::get_amd_tool_table();
|
||||
|
||||
#if ROCPROFILER_SDK_HSA_PC_SAMPLING > 0
|
||||
auto* pcs_ext = hsa::get_pc_sampling_ext_table();
|
||||
#endif
|
||||
|
||||
// HsaApiTable instance
|
||||
auto table = hsa::get_table();
|
||||
@@ -72,6 +77,18 @@ TEST(hsa, tables)
|
||||
EXPECT_EQ(img_ext->version.minor_id, sizeof(hsa::hsa_img_ext_table_t));
|
||||
EXPECT_EQ(img_ext->version.step_id, HSA_IMAGE_API_TABLE_STEP_VERSION);
|
||||
|
||||
// make sure the version matches values from HSA header
|
||||
EXPECT_EQ(amd_tool->version.major_id, HSA_TOOLS_API_TABLE_MAJOR_VERSION);
|
||||
EXPECT_EQ(amd_tool->version.minor_id, sizeof(hsa::hsa_amd_tool_table_t));
|
||||
EXPECT_EQ(amd_tool->version.step_id, HSA_TOOLS_API_TABLE_STEP_VERSION);
|
||||
|
||||
#if ROCPROFILER_SDK_HSA_PC_SAMPLING > 0
|
||||
// make sure the version matches values from HSA header
|
||||
EXPECT_EQ(pcs_ext->version.major_id, HSA_PC_SAMPLING_API_TABLE_MAJOR_VERSION);
|
||||
EXPECT_EQ(pcs_ext->version.minor_id, sizeof(hsa::hsa_pc_sampling_ext_table_t));
|
||||
EXPECT_EQ(pcs_ext->version.step_id, HSA_PC_SAMPLING_API_TABLE_STEP_VERSION);
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------//
|
||||
// checks between instances
|
||||
//------------------------------------------------------------------------//
|
||||
|
||||
مرجع در شماره جدید
Block a user