diff --git a/src/hip_hcc.cpp b/src/hip_hcc.cpp index 897253c8c5..e35b911bac 100644 --- a/src/hip_hcc.cpp +++ b/src/hip_hcc.cpp @@ -1829,7 +1829,7 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t *attributes, void* ptr) e = hipErrorUnknown; } #else - e = hipErrorInvalidValue; + e = hipErrorInvalidDevice; #endif return ihipLogStatus(e); @@ -2400,9 +2400,6 @@ hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcp if (device == NULL) { e = hipErrorInvalidDevice; - } else if (kind == hipMemcpyDefault) { - e = hipErrorInvalidMemcpyDirection; - } else if (kind == hipMemcpyHostToHost) { tprintf (TRACE_COPY2, "H2H copy with memcpy"); @@ -2414,6 +2411,23 @@ hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcp memcpy(dst, src, sizeBytes); } else { + if (kind == hipMemcpyDefault) { + std::cout<<"hipMemcpyDefault"<getSignal(); hsa_signal_store_relaxed(ihip_signal->_hsa_signal, 1); diff --git a/tests/src/hipMemcpyAsync.cpp b/tests/src/hipMemcpyAsync.cpp index 4b92e2fc1e..c402e9577f 100644 --- a/tests/src/hipMemcpyAsync.cpp +++ b/tests/src/hipMemcpyAsync.cpp @@ -20,8 +20,7 @@ void simpleNegTest() // Can't use default with async copy e = hipMemcpyAsync(A_pinned, A_d, Nbytes, hipMemcpyDefault, NULL); - HIPASSERT (e==hipErrorInvalidMemcpyDirection); // TODO - HIPASSERT (e!= hipSuccess); + HIPASSERT (e == hipSuccess); // Not sure what happens here, the memory must be pinned. @@ -337,8 +336,8 @@ int main(int argc, char *argv[]) hipStream_t stream; HIPCHECK (hipStreamCreate(&stream)); - test_pingpong(stream, 1024*1024*32, 1, 1, false); - test_pingpong(stream, 1024*1024*32, 1, 10, false); +// test_pingpong(stream, 1024*1024*32, 1, 1, false); +// test_pingpong(stream, 1024*1024*32, 1, 10, false); HIPCHECK(hipStreamDestroy(stream)); }