reimplement HIP_INIT as hip_impl::hip_init(), add hip_init() to some of the inlined API (#966)

* reimplement HIP_INIT as a function, expose it as hip_impl::hip_init()
so that it could be called from hipLaunchKernelGGL and other inlined
HIP functions

* Don't call hip_init from ihipPreLaunchKernel
This commit is contained in:
Siu Chi Chan
2019-03-20 01:11:15 -04:00
committed by Maneesh Gupta
orang tua 6ced14e71c
melakukan fa9495841b
6 mengubah file dengan 22 tambahan dan 22 penghapusan
+1 -1
Melihat File
@@ -32,7 +32,7 @@ THE SOFTWARE.
extern "C" std::vector<hipModule_t>*
__hipRegisterFatBinary(const void* data)
{
HIP_INIT();
hip_impl::hip_init();
tprintf(DB_FB, "Enter __hipRegisterFatBinary(%p)\n", data);
const __CudaFatBinaryWrapper* fbwrapper = reinterpret_cast<const __CudaFatBinaryWrapper*>(data);