Removing HIP_API_PROF_STRING from the tracer_tool

The else part was not used as it was only using the hipApiString to format the data to string

Change-Id: I376721c478cffba0890436ca8895dfe2a7641570
This commit is contained in:
Ammar ELWazir
2022-04-25 21:05:30 +00:00
zatwierdzone przez Ammar Elwazir
rodzic 046df32729
commit 5e012541c5
4 zmienionych plików z 2 dodań i 41 usunięć
-2
Wyświetl plik
@@ -45,7 +45,6 @@ if [ -z "$PACKAGE_ROOT" ] ; then PACKAGE_ROOT=$ROCM_PATH; fi
if [ -z "$PACKAGE_PREFIX" ] ; then PACKAGE_PREFIX="$ROCM_PATH/$COMPONENT"; fi
if [ -z "$PREFIX_PATH" ] ; then PREFIX_PATH=$PACKAGE_ROOT; fi
if [ -z "$HIP_VDI" ] ; then HIP_VDI=0; fi
if [ -z "$HIP_API_STRING" ] ; then HIP_API_STRING=1; fi
if [ -n "$ROCM_RPATH" ] ; then LD_RUNPATH_FLAG=" -Wl,--enable-new-dtags -Wl,--rpath,${ROCM_RPATH}"; fi
ROCTRACER_ROOT=$(cd $ROCTRACER_ROOT && echo $PWD)
@@ -63,7 +62,6 @@ cmake \
-DCPACK_GENERATOR="${CPACKGEN:-"DEB;RPM"}" \
-DCMAKE_SHARED_LINKER_FLAGS="$LD_RUNPATH_FLAG" \
-DHIP_VDI="$HIP_VDI" \
-DHIP_API_STRING="$HIP_API_STRING" \
$ROCTRACER_ROOT
make
-2
Wyświetl plik
@@ -45,7 +45,6 @@ if [ -z "$PACKAGE_ROOT" ] ; then PACKAGE_ROOT=$ROCM_PATH; fi
if [ -z "$PACKAGE_PREFIX" ] ; then PACKAGE_PREFIX="$ROCM_PATH/$COMPONENT"; fi
if [ -z "$PREFIX_PATH" ] ; then PREFIX_PATH=$PACKAGE_ROOT; fi
if [ -z "$HIP_VDI" ] ; then HIP_VDI=0; fi
if [ -z "$HIP_API_STRING" ] ; then HIP_API_STRING=1; fi
if [ -n "$ROCM_RPATH" ] ; then LD_RUNPATH_FLAG=" -Wl,--enable-new-dtags -Wl,--rpath,${ROCM_RPATH}"; fi
ROCTRACER_ROOT=$(cd $ROCTRACER_ROOT && echo $PWD)
@@ -61,7 +60,6 @@ cmake \
-DCMAKE_INSTALL_PREFIX=$PACKAGE_ROOT \
-DCMAKE_SHARED_LINKER_FLAGS="$LD_RUNPATH_FLAG" \
-DHIP_VDI="$HIP_VDI" \
-DHIP_API_STRING="$HIP_API_STRING" \
-DLIBRARY_TYPE=STATIC \
$ROCTRACER_ROOT
+2 -4
Wyświetl plik
@@ -73,10 +73,8 @@ if ( ${LIBRARY_TYPE} STREQUAL STATIC )
add_definitions ( -DSTATIC_BUILD=1 )
endif()
if ( NOT DEFINED HIP_API_STRING )
set ( HIP_API_STRING 1 )
endif()
add_definitions ( -DHIP_PROF_HIP_API_STRING=${HIP_API_STRING} )
## Enable Hip API call to translate hip call args function
add_definitions ( -DHIP_PROF_HIP_API_STRING=1 )
## Enable HIP_VDI mode
add_definitions ( -D__HIP_ROCclr__=1 )
-33
Wyświetl plik
@@ -499,7 +499,6 @@ void hip_api_flush_cb(hip_api_trace_entry_t* entry) {
entry->name, correlation_id, begin_timestamp, end_timestamp);
if (domain == ACTIVITY_DOMAIN_HIP_API) {
#if HIP_PROF_HIP_API_STRING
if (hip_api_stats != NULL) {
hip_api_stats->add_event(cid, end_timestamp - begin_timestamp);
if (is_hip_kernel_launch_api(cid)) {
@@ -517,38 +516,6 @@ void hip_api_flush_cb(hip_api_trace_entry_t* entry) {
rec_ss << " :" << correlation_id;
fprintf(hip_api_file_handle, "%s\n", rec_ss.str().c_str());
}
#else // !HIP_PROF_HIP_API_STRING
switch (cid) {
case HIP_API_ID_hipMemcpy:
fprintf(hip_api_file_handle, "%s(dst(%p) src(%p) size(0x%x) kind(%u))\n", oss.str().c_str(),
data->args.hipMemcpy.dst, data->args.hipMemcpy.src,
(uint32_t)(data->args.hipMemcpy.sizeBytes), (uint32_t)(data->args.hipMemcpy.kind));
break;
case HIP_API_ID_hipMemcpyAsync:
fprintf(hip_api_file_handle, "%s(dst(%p) src(%p) size(0x%x) kind(%u) stream(%p))\n",
oss.str().c_str(), data->args.hipMemcpyAsync.dst, data->args.hipMemcpyAsync.src,
(uint32_t)(data->args.hipMemcpyAsync.sizeBytes),
(uint32_t)(data->args.hipMemcpyAsync.kind), data->args.hipMemcpyAsync.stream);
break;
case HIP_API_ID_hipMalloc:
fprintf(hip_api_file_handle, "%s(ptr(%p) size(0x%x))\n", oss.str().c_str(), entry->ptr,
(uint32_t)(data->args.hipMalloc.size));
break;
case HIP_API_ID_hipFree:
fprintf(hip_api_file_handle, "%s(ptr(%p))\n", oss.str().c_str(), data->args.hipFree.ptr);
break;
case HIP_API_ID_hipModuleLaunchKernel:
fprintf(hip_api_file_handle, "%s(kernel(%s) stream(%p))\n", oss.str().c_str(),
cxx_demangle(entry->name), data->args.hipModuleLaunchKernel.stream);
break;
case HIP_API_ID_hipExtModuleLaunchKernel:
fprintf(hip_api_file_handle, "%s(kernel(%s) stream(%p))\n", oss.str().c_str(),
cxx_demangle(entry->name), data->args.hipExtModuleLaunchKernel.hStream);
break;
default:
fprintf(hip_api_file_handle, "%s()\n", oss.str().c_str());
}
#endif // !HIP_PROF_HIP_API_STRING
} else {
fprintf(hip_api_file_handle, "%s(name(%s))\n", oss.str().c_str(), entry->name);
}