Граф коммитов

40 Коммитов

Автор SHA1 Сообщение Дата
Ammar ELWazir 9e62e066fe V1/V2 API Library Separation
V1 library will be supported as librocprofiler64.so and V2 will be supported as librocprofiler64v2.so and headers will be rocprofiler.h for V1 and v2/rocprofiler.h for v2

Change-Id: Ibe5bdbf2f79f0175342c648e917ae77918186604
2023-05-02 22:44:43 -04:00
Ammar ELWazir 8032adb64f Adding rocprofilerv2
Change-Id: Ic0cc280ba207d2b8f6ccae1cd4ac3184152fc1ad
2023-03-09 13:20:33 +00:00
Ammar ELWazir 553a4c7ee7 GPU Index to use HSA AMD Agent Driver Node ID
Change-Id: Ia814f64419615f1d77fc09fc88f11bbaf75afd45
2022-11-21 14:05:33 -05:00
Laurent Morichetti 5fd1c7e8e3 Fix vgpr count calculation for gfx90a and gfx940
Read accum_offset from compute_pgm_rsrc3 to report both the arch vgprs
and the accum vgprs

Change-Id: I99e746d54a6a1671e343da5658cc6ce970f79939
2022-08-03 14:02:36 -07:00
Ranjith Ramakrishnan e7eb195924 SWDEV-345870 - Correct include paths for new directory layout
Use hsa header files from /opt/rocm-ver/include rather than using wrapper files from /opt/rocm-ver/hsa/include/hsa

Change-Id: Id7a9bde19447cd2a0fd6e03b11c08471f09c2a46
2022-07-14 16:08:41 -07:00
Laurent Morichetti 304d3366af Fix a compilation error with gcc-9.3.0
On Ubuntu 20.04, in Release mode, gcc fails with this error:

In file included from /usr/include/string.h:495,
                 from /opt/rocm/include/hsa/hsa_api_trace.h:57,
                 from ../rocprofiler/src/util/hsa_rsrc_factory.h:29,
                 from ../rocprofiler/src/util/hsa_rsrc_factory.cpp:25:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘const util::AgentInfo* util::HsaRsrcFactory::AddAgentInfo(hsa_agent_t)’ at ../rocprofiler/src/util/hsa_rsrc_factory.cpp:323:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rocprofiler/src/util/hsa_rsrc_factory.cpp: In member function ‘const util::AgentInfo* util::HsaRsrcFactory::AddAgentInfo(hsa_agent_t)’:
../rocprofiler/src/util/hsa_rsrc_factory.cpp:322:39: note: length computed here
  322 |     const int gfxip_label_len = strlen(agent_info->name) - 2;
      |                                 ~~~~~~^~~~~~~~~~~~~~~~~~

The error is caused by the following 2 lines:

    const int gfxip_label_len = strlen(agent_info->name) - 2;
    strncpy(agent_info->gfxip, agent_info->name, gfxip_label_len);

The size argument to strncpy should not depend on the input string.

Since the terminating character is not considered (the copy is at
most len - 2 bytes), using memcpy is preferable. Also, make sure
the destination does not overflow by clamping the size.

Change-Id: I0c5cf7e0daf4cd6fcf7092efb1d9fd4c02a6c639
2021-04-22 11:12:53 -07:00
Evgeny 64bdcaddc7 fixing gfx10 gfxip name
Change-Id: Ie58768d64117a616b1896489b505790cfa993054
2021-03-24 00:48:21 -05:00
Evgeny 96ff7582ce porting of AQL packet submit to new atomic HSA queue API
Change-Id: I654448a7a8627978395d426118a5cb3ba2a92058
2020-10-12 09:26:27 -05:00
Evgeny 80747de208 optimization mechanism fix: correct tracker handler; kernel name query on completion;
Change-Id: I14da152b4ac3c7d8fd1af2f54e9d71f834071622
2020-08-03 23:34:49 -05:00
Evgeny 3ce98d33d4 get_time API: make public; extende with more time id: coarse and raw; added time error return value;
Change-Id: I1641eb2c38915222204617e07fc0bfb388bb8346
2020-04-30 02:38:18 -05:00
Evgeny f819e1c463 elliminaring the need of AMD_INTERNAL_BUILD macro defined
Change-Id: Ie97aef943793b1e4f40b7c7397af313520b35beb
2020-04-09 23:41:51 -05:00
Evgeny 40730e34e4 adding AgentInfo::lds_block_size
Change-Id: I186893add96dc92570e710ae78b475897ebfe531
2020-02-18 14:00:19 -06:00
Evgeny 5615ade977 hsa_rsrc_factory sync
Change-Id: Idecbc0cdad6068eae5259cb043bdf5746b430aec
2020-01-30 19:29:59 -06:00
Evgeny c8eb0641bf sgpr/vgpr reported sizes in terms of registers; lds size in bytes;
Change-Id: Id527687cc075a4e85ea4d0063ed8f336e34d2454
2019-11-27 15:19:14 -06:00
Xianwei Zhang ee917344ff build: slightly change files to pass compilation
Compiled using Clang and encountered errors on ambiguous pointer
type, implicit conversion NULL to bool, and unused function, etc.
As a fix, this patch slightly updates the related codes.

Change-Id: I4a73d66293313dda36749036f5c73aaf2a445231
2019-08-22 23:29:16 -04:00
Evgeny 1ed97815f1 creation fix
Change-Id: I717d96555677664ce0a926cf1c3c3c48f55287d9
2019-03-13 15:17:56 -05:00
Evgeny 01aa4c4ffb moving to non-deprecated get extension table HSA API
Change-Id: I356c6406eb5c2a1755202dc562298b30cb7acc06
2018-09-26 13:20:36 -05:00
Evgeny f6f857f6f4 licensing annotation
Change-Id: Icdd79e25e7ba30e777f1024697f87d583f380a62
2018-08-19 04:18:55 -05:00
Evgeny bd07ed73fd cpu_pool/kern_arg_pool search fix for multi core host
Change-Id: Ia7e3a0dcbb8912e88edbf4ba2028818f09599374
2018-08-17 16:34:30 -05:00
Evgeny a8db3d930c build compatibility
Change-Id: Ifde4b2e4e7cb48d5c06ccce5eb76b7b943c4114a
2018-06-26 16:05:39 -05:00
Evgeny add56e26ae license annotations
Change-Id: I96b8f625a03b707b45aee6b8e7dbfabe073294c6
2018-06-25 19:52:28 -05:00
Evgeny ca5c0e8928 documentation and cleanup, public metrics only
Change-Id: I8213d193ce2ba632adf133e630fd91baf9e81ddd
2018-06-22 10:16:13 -05:00
Evgeny 53211acd04 test: scenario with different counters sets per dispatch
Change-Id: Ia0866d485128e7295cbf98c3241a6113ce8d98b8
2018-06-01 09:06:51 -05:00
Evgeny 2d4d704f56 sync and clean up
Change-Id: Ia3b2d76f9016454b9e80ca0891ee02e0c2fd1a13
2018-05-16 13:24:04 -05:00
Evgeny cca3ca68c1 aqlprofile/rocprofiler util sync
Change-Id: If029a5aa4eff9ad3e01dc83b41426c079f7f03a7
2018-05-16 13:04:07 -05:00
Evgeny 8bed188f6a adding allocate cmd memory
Change-Id: I5fcc18673eba92e4ff84eb97ddfb16e6797eaf0d
2018-05-03 18:50:29 -05:00
Evgeny 9dec361cd4 SQTT local allocation
Change-Id: Ie4a150ad0dc141226f6f1c571916c5a526dd723c
2018-04-29 03:24:46 -05:00
Evgeny c9c0ecc976 memory allocation refactoring
Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6
2018-04-27 20:00:20 -05:00
Evgeny d04f7095f4 HSA memory alloc/copy/free refactoring 2018-04-20 11:15:26 -05:00
Evgeny e4384c2c51 loading of config rpl_rc.xml file; range format [N], [N:], [N:M] 2018-04-05 18:03:05 -05:00
Evgeny 1c8f767da4 profiling controll options 2018-02-27 13:32:11 -06:00
Evgeny 0b0ce2d931 update 2018-02-19 18:18:51 -06:00
Evgeny ff1e5b67a7 read API 2018-02-02 15:38:28 -06:00
Evgeny ac1dfb13cc minor changes 2018-02-02 14:29:58 -06:00
Evgeny 79510b8c6c resources releasing; metrics 2018-02-01 14:52:21 -06:00
Evgeny 9a9418ad16 fixing resources releasing 2018-01-22 17:02:46 -06:00
Evgeny c00a0feb36 minor changes 2018-01-04 20:11:30 -06:00
Evgeny 8270530fec several fixes; adding direct loading of alprofile library 2017-12-19 15:32:34 -06:00
Evgeny cb3a591826 coding style formatting 2017-11-29 13:53:12 -06:00
Evgeny 85278f08a0 ROC profiler prototype sources importing 2017-11-09 17:26:19 -06:00