diff --git a/build.sh b/build.sh index 27e7332460..02ae67b746 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/build_static.sh b/build_static.sh index ffdd22b753..d313b0a5a0 100755 --- a/build_static.sh +++ b/build_static.sh @@ -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 diff --git a/cmake_modules/env.cmake b/cmake_modules/env.cmake index 6720d0a58b..8bdedac669 100644 --- a/cmake_modules/env.cmake +++ b/cmake_modules/env.cmake @@ -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 ) diff --git a/test/tool/tracer_tool.cpp b/test/tool/tracer_tool.cpp index edb07184b5..c8667646c5 100644 --- a/test/tool/tracer_tool.cpp +++ b/test/tool/tracer_tool.cpp @@ -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); }