Merge pull request #214 from scchan/reinit_printf_buffer

hipDeviceReset(): make sure to reinitialize the printf buffer in hcc RT

[ROCm/hip commit: 0e3d824e8d]
Tá an tiomantas seo le fáil i:
Ben Sander údaraithe agus GitHub tiomanta 2017-10-20 11:04:37 -05:00
2 tuismitheoirí b9e6f45cae 4dc24498af
tiomantas 584fb96850
1 comhad athraithe
+5
+5
Féach ar an gComhad
@@ -614,6 +614,11 @@ void ihipDevice_t::locked_reset()
_state = 0;
am_memtracker_reset(_acc);
//FIXME - Calling am_memtracker_reset is really bad since it destroyed all buffers allocated by the HCC runtime as well
//such as the printf buffer. Re-initialze the printf buffer as a workaround for now.
#if (__hcc_workweek__ >= 17423)
Kalmar::getContext()->initPrintfBuffer();
#endif
};
#define ErrorCheck(x) error_check(x, __LINE__, __FILE__)