2
0
- add calls to ihipInit missing from some routines.
- sync before draining a stream.


[ROCm/clr commit: 8f98aca124]
Este cometimento está contido em:
Ben Sander
2016-02-23 04:07:05 -06:00
ascendente 34aa8f1304
cometimento bb27a1d7e8
+13 -1
Ver ficheiro
@@ -65,7 +65,6 @@ THE SOFTWARE.
//static const int debug = 0;
static const int release = 1;
#define ENABLE_CHECKS 1
int HIP_LAUNCH_BLOCKING = 0;
@@ -1413,6 +1412,15 @@ hipError_t hipStreamDestroy(hipStream_t stream)
hipError_t e = hipSuccess;
//--- Drain the stream:
if (stream == NULL) {
ihipDevice_t *device = ihipGetTlsDefaultDevice();
ihipWaitNullStream(device);
} else {
stream->wait();
e = hipSuccess;
}
ihipDevice_t *device = stream->getDevice();
if (device) {
@@ -1862,6 +1870,8 @@ hipError_t hipMallocHost(void** ptr, size_t sizeBytes)
//---
hipError_t hipMemcpyToSymbol(const char* symbolName, const void *src, size_t count, size_t offset, hipMemcpyKind kind)
{
std::call_once(hip_initialized, ihipInit);
#ifdef USE_MEMCPYTOSYMBOL
if(kind != hipMemcpyHostToDevice)
{
@@ -2288,6 +2298,8 @@ hipError_t hipMemsetAsync(void* dst, int value, size_t sizeBytes, hipStream_t s
hipError_t hipMemset(void* dst, int value, size_t sizeBytes )
{
std::call_once(hip_initialized, ihipInit);
// TODO - call an ihip memset so HIP_TRACE is correct.
return hipMemsetAsync(dst, value, sizeBytes, hipStreamNull);
}