Remove deprecated HIP markers (#1876)

[ROCm/clr commit: 6be7537cf9]
이 커밋은 다음에 포함됨:
Rahul Garg 작성하고 GitHub가 2020-02-28 16:47:15 +05:30를 커밋함
1 부모 ff421fb2d2
커밋 7395bf9ba9
11 파일이 변경됨
+77 -745

검색과 일치하는 파일 없음

+1 -43
파일 보기
@@ -72,7 +72,6 @@ int HIP_API_BLOCKING = 0;
int HIP_PRINT_ENV = 0;
int HIP_TRACE_API = 0;
std::string HIP_TRACE_API_COLOR("green");
int HIP_PROFILE_API = 0;
// TODO - DB_START/STOP need more testing.
std::string HIP_DB_START_API;
@@ -150,12 +149,10 @@ uint64_t recordApiTrace(TlsData *tls, std::string* fullStr, const std::string& a
if ((tid < g_dbStartTriggers.size()) && (apiSeqNum >= g_dbStartTriggers[tid].nextTrigger())) {
printf("info: resume profiling at %lu\n", apiSeqNum);
RESUME_PROFILING;
g_dbStartTriggers.pop_back();
};
if ((tid < g_dbStopTriggers.size()) && (apiSeqNum >= g_dbStopTriggers[tid].nextTrigger())) {
printf("info: stop profiling at %lu\n", apiSeqNum);
STOP_PROFILING;
g_dbStopTriggers.pop_back();
};
@@ -1295,9 +1292,6 @@ void HipReadEnv() {
"executes.");
READ_ENV_S(release, HIP_TRACE_API_COLOR, 0,
"Color to use for HIP_API. None/Red/Green/Yellow/Blue/Magenta/Cyan/White");
READ_ENV_I(release, HIP_PROFILE_API, 0,
"Add HIP API markers to ATP file generated with CodeXL. 0x1=short API name, "
"0x2=full API name including args.");
READ_ENV_S(release, HIP_DB_START_API, 0,
"Comma-separated list of tid.api_seq_num for when to start debug and profiling.");
READ_ENV_S(release, HIP_DB_STOP_API, 0,
@@ -1373,14 +1367,6 @@ void HipReadEnv() {
HIP_DB |= 0x1;
}
if (HIP_PROFILE_API && !COMPILE_HIP_ATP_MARKER) {
fprintf(stderr,
"warning: env var HIP_PROFILE_API=0x%x but COMPILE_HIP_ATP_MARKER=0. (perhaps "
"enable COMPILE_HIP_ATP_MARKER in src code before compiling?)\n",
HIP_PROFILE_API);
HIP_PROFILE_API = 0;
}
if (HIP_DB) {
fprintf(stderr, "HIP_DB=0x%x [%s]\n", HIP_DB, HIP_DB_string(HIP_DB).c_str());
}
@@ -1424,11 +1410,6 @@ void HipReadEnv() {
// This function creates a vector with only the GPU accelerators.
// It is called with C++11 call_once, which provided thread-safety.
void ihipInit() {
#if COMPILE_HIP_ATP_MARKER
amdtInitializeActivityLogger();
amdtScopedMarker("ihipInit", "HIP", NULL);
#endif
HipReadEnv();
@@ -1618,7 +1599,7 @@ hipStream_t ihipSyncAndResolveStream(hipStream_t stream, bool lockAcquired) {
void ihipPrintKernelLaunch(const char* kernelName, const grid_launch_parm* lp,
const hipStream_t stream) {
if ((HIP_TRACE_API & (1 << TRACE_KCMD)) || HIP_PROFILE_API ||
if ((HIP_TRACE_API & (1 << TRACE_KCMD)) ||
(COMPILE_HIP_DB & HIP_TRACE_API)) {
GET_TLS();
std::stringstream os;
@@ -1631,14 +1612,6 @@ void ihipPrintKernelLaunch(const char* kernelName, const grid_launch_parm* lp,
std::string fullStr;
recordApiTrace(tls, &fullStr, os.str());
}
if (HIP_PROFILE_API == 0x1) {
std::string shortAtpString("hipLaunchKernel:");
shortAtpString += kernelName;
MARKER_BEGIN(shortAtpString.c_str(), "HIP");
} else if (HIP_PROFILE_API == 0x2) {
MARKER_BEGIN(os.str().c_str(), "HIP");
}
}
}
@@ -1697,9 +1670,6 @@ void ihipPostLaunchKernel(const char* kernelName, hipStream_t stream, grid_launc
tprintf(DB_SYNC, "ihipPostLaunchKernel, unlocking stream\n");
stream->lockclose_postKernelCommand(kernelName, lp.av, unlockPostponed);
if (HIP_PROFILE_API) {
MARKER_END();
}
}
//=================================================================================================
@@ -2481,29 +2451,17 @@ bool ihipStream_t::locked_copy2DAsync(void* dst, const void* src, size_t width,
return retStatus;
}
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
// Profiler, really these should live elsewhere:
hipError_t hipProfilerStart() {
HIP_INIT_API(hipProfilerStart);
#if COMPILE_HIP_ATP_MARKER
amdtResumeProfiling(AMDT_ALL_PROFILING);
#endif
return ihipLogStatus(hipSuccess);
};
hipError_t hipProfilerStop() {
HIP_INIT_API(hipProfilerStop);
#if COMPILE_HIP_ATP_MARKER
amdtStopProfiling(AMDT_ALL_PROFILING);
#endif
return ihipLogStatus(hipSuccess);
};
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
// HCC-specific accessor functions: