[rocprofiler-systems] Fix ROCM_VERSION guard used for the scratch_memory_record structure (#2948)
- Fix ROCM_VERSION guard used for the scratch_memory_record structure - This fixes a rocm/7.0.2 build failure --------- Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Tento commit je obsažen v:
+8
-5
@@ -569,8 +569,10 @@ uint64_t
|
||||
get_scratch_mem_alloc_size(
|
||||
[[maybe_unused]] const rocprofiler_buffer_tracing_scratch_memory_record_t& record)
|
||||
{
|
||||
// Scratch memory samples from SDK versions prior to 7.0.2 do not include allocation_size
|
||||
#if(ROCPROFSYS_USE_ROCM > 0 && ROCPROFSYS_ROCM_VERSION >= 70002)
|
||||
// The version of rocprofiler_buffer_tracing_scratch_memory_record_t from ROCm < 7.1 does
|
||||
// not have the allocation_size field. ROCPROFILER_VERSION for both ROCm 7.0 and 7.1
|
||||
// is 1.0.0, so we need to check the ROCm version.
|
||||
#if(ROCPROFSYS_USE_ROCM > 0 && ROCPROFSYS_ROCM_VERSION >= 70100)
|
||||
return record.allocation_size;
|
||||
#else
|
||||
return 0;
|
||||
@@ -1832,9 +1834,10 @@ tool_tracing_buffered(rocprofiler_context_id_t /*context*/,
|
||||
|
||||
if(get_use_perfetto())
|
||||
{
|
||||
// Scratch memory samples from SDK versions prior to 7.0.2 do not include
|
||||
// allocation_size field, so counter tracks are not needed
|
||||
#if(ROCPROFSYS_USE_ROCM > 0 && ROCPROFSYS_ROCM_VERSION >= 70002)
|
||||
// The version of rocprofiler_buffer_tracing_scratch_memory_record_t from ROCm < 7.1 does
|
||||
// not have the allocation_size field. ROCPROFILER_VERSION for both ROCm 7.0 and 7.1
|
||||
// is 1.0.0, so we need to check the ROCm version.
|
||||
#if(ROCPROFSYS_USE_ROCM > 0 && ROCPROFSYS_ROCM_VERSION >= 70100)
|
||||
using counter_track = perfetto_counter_track<
|
||||
rocprofiler_buffer_tracing_scratch_memory_record_t>;
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele