Skip to content

Commit 65eb55b

Browse files
ammarwagargrahul
authored andcommitted
Fixing ROCTracer to match versioning changes in HIP Runtime
Change-Id: Ibde2419314824f12acb4cf51dc675cb14a51851c
1 parent 428469f commit 65eb55b

11 files changed

+367
-357
lines changed

inc/roctracer_hip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "roctracer.h"
2525

2626
#include <hip/hip_runtime.h>
27+
#include <hip/hip_deprecated.h>
2728
#include "hip_ostream_ops.h"
2829
#include <hip/amd_detail/hip_prof_str.h>
2930

script/gen_ostream_ops.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,14 @@ def gen_cppheader(infilepath, outfilepath, rank):
197197
header_s = \
198198
'#ifndef INC_' + apiname + '_OSTREAM_OPS_H_\n' + \
199199
'#define INC_' + apiname + '_OSTREAM_OPS_H_\n' + \
200-
'\n' + \
200+
'\n'
201+
if apiname.upper() == 'HIP':
202+
header_s = \
203+
header_s + \
204+
'#include <hip/hip_runtime.h>\n' + \
205+
'#include <hip/hip_deprecated.h>\n'
206+
header_s = \
207+
header_s + \
201208
'#include "roctracer.h"\n' + \
202209
'\n' + \
203210
'#ifdef __cplusplus\n' + \

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ find_file(HIP_RUNTIME_API_H hip_runtime_api.h
8484
add_custom_command(
8585
OUTPUT hip_ostream_ops.h
8686
COMMAND ${CMAKE_C_COMPILER} "$<$<BOOL:${HIP_INCLUDE_DIRECTORIES}>:-I$<JOIN:${HIP_INCLUDE_DIRECTORIES},$<SEMICOLON>-I>>"
87-
-E "${HIP_RUNTIME_API_H}" -D__HIP_PLATFORM_AMD__=1 -D__HIP_ROCclr__=1 -o hip_runtime_api.h.i
87+
-E "${CMAKE_CURRENT_SOURCE_DIR}/roctracer/hip_full_api.h" -D__HIP_PLATFORM_AMD__=1 -D__HIP_ROCclr__=1 -o hip_runtime_api.h.i
8888
BYPRODUCTS hip_runtime_api.h.i
8989
COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/script/gen_ostream_ops.py
9090
-in hip_runtime_api.h.i -out hip_ostream_ops.h > /dev/null

src/roctracer/hip_full_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include <hip/hip_runtime_api.h>
2+
#include <hip/hip_deprecated.h>

test/golden_traces/MatrixTranspose_hip_flush_trace.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ROCtracer (35331):
99
ROCtracer: trace control flush rate(100000us)
1010
HIP-trace(*)
11-
6503209734529563:6503209734531917 35331:35331 hipGetDeviceProperties(props={pageableMemoryAccessUsesHostPageTables=0, pageableMemoryAccess=0, concurrentManagedAccess=1, directManagedMemAccessFromHost=0, managedMemory=1, asicRevision=1, isLargeBar=1, cooperativeMultiDeviceUnmatchedSharedMem=1, cooperativeMultiDeviceUnmatchedBlockDim=1, cooperativeMultiDeviceUnmatchedGridDim=1, cooperativeMultiDeviceUnmatchedFunc=1, tccDriver=0, ECCEnabled=0, kernelExecTimeoutEnabled=0, texturePitchAlignment=256, textureAlignment=256, memPitch=2147483647, hdpRegFlushCntl=0x7f1f3948c004, hdpMemFlushCntl=0x7f1f3948c000, maxTexture3D=0x7f1e76c31318, maxTexture2D=0x7f1e76c31310, maxTexture1D=16384, maxTexture1DLinear=2147483647, cooperativeMultiDeviceLaunch=1, cooperativeLaunch=1, integrated=0, gcnArchName="gfx90a:sramecc+:xnack-", gcnArch=910, canMapHostMemory=1, isMultiGpuBoard=0, maxSharedMemoryPerMultiProcessor=65536, pciDeviceID=0, pciBusID=74, pciDomainID=0, concurrentKernels=1, arch={}, clockInstructionRate=1000000, computeMode=0, maxThreadsPerMultiProcessor=2048, l2CacheSize=8388608, multiProcessorCount=104, minor=0, major=9, totalConstMem=2147483647, memoryBusWidth=4096, memoryClockRate=1600000, clockRate=1700000, maxGridSize=0x7f1e76c31198, maxThreadsDim=0x7f1e76c3118c, maxThreadsPerBlock=1024, warpSize=64, regsPerBlock=65536, sharedMemPerBlock=65536, totalGlobalMem=68702699520, name="AMD Instinct MI210"}, device=0) :1
11+
6503209734529563:6503209734531917 35331:35331 hipGetDevicePropertiesR0600(props={pageableMemoryAccessUsesHostPageTables=0, pageableMemoryAccess=0, concurrentManagedAccess=1, directManagedMemAccessFromHost=0, managedMemory=1, asicRevision=1, isLargeBar=1, cooperativeMultiDeviceUnmatchedSharedMem=1, cooperativeMultiDeviceUnmatchedBlockDim=1, cooperativeMultiDeviceUnmatchedGridDim=1, cooperativeMultiDeviceUnmatchedFunc=1, tccDriver=0, ECCEnabled=0, kernelExecTimeoutEnabled=0, texturePitchAlignment=256, textureAlignment=256, memPitch=2147483647, hdpRegFlushCntl=0x7f1f3948c004, hdpMemFlushCntl=0x7f1f3948c000, maxTexture3D=0x7f1e76c31318, maxTexture2D=0x7f1e76c31310, maxTexture1D=16384, maxTexture1DLinear=2147483647, cooperativeMultiDeviceLaunch=1, cooperativeLaunch=1, integrated=0, gcnArchName="gfx90a:sramecc+:xnack-", gcnArch=910, canMapHostMemory=1, isMultiGpuBoard=0, maxSharedMemoryPerMultiProcessor=65536, pciDeviceID=0, pciBusID=74, pciDomainID=0, concurrentKernels=1, arch={}, clockInstructionRate=1000000, computeMode=0, maxThreadsPerMultiProcessor=2048, l2CacheSize=8388608, multiProcessorCount=104, minor=0, major=9, totalConstMem=2147483647, memoryBusWidth=4096, memoryClockRate=1600000, clockRate=1700000, maxGridSize=0x7f1e76c31198, maxThreadsDim=0x7f1e76c3118c, maxThreadsPerBlock=1024, warpSize=64, regsPerBlock=65536, sharedMemPerBlock=65536, totalGlobalMem=68702699520, name="AMD Instinct MI210"}, device=0) :1
1212
6503209735378958:6503209735406670 35331:35331 hipMalloc(ptr=0x7f19f7a00000, size=4194304) :2
1313
6503209735407101:6503209735423080 35331:35331 hipMalloc(ptr=0x7f19f7400000, size=4194304) :3
1414
6503209978814181:6503209979619458 2:0 CopyHostToDevice:4:35331

test/golden_traces/MatrixTranspose_hip_period_trace.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ PASSED!
204204
PASSED!
205205
## Iteration (0) #################
206206
PASSED!
207-
3802699751533941:3802699751541991 1983:1983 hipGetDeviceProperties(props=, device=0)
207+
3802699751533941:3802699751541991 1983:1983 hipGetDevicePropertiesR0600(props=, device=0)
208208
3802699752571489:3802699752686289 1983:1983 hipMalloc(ptr=0x7f6c121ff010, size=4194304)
209209
3802699752688639:3802699752749390 1983:1983 hipMalloc(ptr=0x7fffefcadf28, size=4194304)
210210
3802699752763840:3802700027958750 1983:1983 hipMemcpy(dst=0x7f6c11400000, src=0x7f6c121ff010, sizeBytes=4194304, kind=1)

0 commit comments

Comments
 (0)