From 8b3fce8069a2d9c52a96679103f710c505bd49ba Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Mon, 4 Nov 2019 23:02:59 -0800 Subject: [PATCH] Deprecate HIP Markers (#1622) * Deprecate HIP markers * Deprecate profiler start/stop --- hipamd/CMakeLists.txt | 3 +++ hipamd/include/hip/hcc_detail/hip_runtime_api.h | 4 ++-- hipamd/include/hip/hip_profile.h | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt index 7aeb415bcc..5d1f785f1b 100644 --- a/hipamd/CMakeLists.txt +++ b/hipamd/CMakeLists.txt @@ -184,7 +184,10 @@ if(NOT DEFINED COMPILE_HIP_ATP_MARKER) set(COMPILE_HIP_ATP_MARKER 0) else() set(COMPILE_HIP_ATP_MARKER $ENV{COMPILE_HIP_ATP_MARKER}) + message(WARNING "HIP Markers are deprecated, please use roctracer/rocTX marker APIs.") endif() +else() + message(WARNING "HIP Markers are deprecated, please use roctracer/rocTX marker APIs.") endif() add_to_config(_buildInfo COMPILE_HIP_ATP_MARKER) diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index 5a61219f4a..7c11eaf0bf 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -2994,7 +2994,7 @@ hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList, * When using this API, start the profiler with profiling disabled. (--startdisabled) * @warning : hipProfilerStart API is under development. */ -hipError_t hipProfilerStart(); +hipError_t hipProfilerStart() __attribute__((deprecated("use roctracer/rocTX instead"))); /** @@ -3002,7 +3002,7 @@ hipError_t hipProfilerStart(); * When using this API, start the profiler with profiling disabled. (--startdisabled) * @warning : hipProfilerStop API is under development. */ -hipError_t hipProfilerStop(); +hipError_t hipProfilerStop() __attribute__((deprecated("use roctracer/rocTX instead"))); /** diff --git a/hipamd/include/hip/hip_profile.h b/hipamd/include/hip/hip_profile.h index 7474839258..95224af4a3 100644 --- a/hipamd/include/hip/hip_profile.h +++ b/hipamd/include/hip/hip_profile.h @@ -23,11 +23,14 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_HIP_PROFILE_H #define HIP_INCLUDE_HIP_HIP_PROFILE_H +#warning "HIP Profiling through markers is deprecated, please check roctrace/rocTX support." + #if not defined(ENABLE_HIP_PROFILE) #define ENABLE_HIP_PROFILE 1 #endif #if defined(__HIP_PLATFORM_HCC__) and (ENABLE_HIP_PROFILE == 1) +#warning "HIP Markers are deprecated and would be removed soon." #include #define HIP_SCOPED_MARKER(markerName, group) \ amdtScopedMarker __scopedMarker(markerName, group, nullptr);