Fix hipHostRegister mem leak and copy kind in hipMemcpyAsync (#587)

Tento commit je obsažen v:
saleelk
2018-07-22 22:34:14 -07:00
odevzdal Maneesh Gupta
rodič 1a2c16decb
revize 8bc73424d1
2 změnil soubory, kde provedl 4 přidání a 1 odebrání
+3
Zobrazit soubor
@@ -108,6 +108,7 @@ int main(int argc, char* argv[]) {
HIPCHECK(hipHostUnregister(A));
free(A);
delete [] Ad;
}
@@ -144,6 +145,8 @@ int main(int argc, char* argv[]) {
free(A);
free(Bh);
hipFree(Bd);
}
+1 -1
Zobrazit soubor
@@ -41,7 +41,7 @@ void simpleNegTest() {
// Not sure what happens here, the memory must be pinned.
e = hipMemcpyAsync(A_malloc, A_d, Nbytes, hipMemcpyHostToDevice, NULL);
e = hipMemcpyAsync(A_malloc, A_d, Nbytes, hipMemcpyDeviceToHost, NULL);
printf(" async memcpy of A_malloc to A_d. Result=%d\n", e);
// HIPASSERT (e==hipErrorInvalidValue);