Explorar o código

Restore unregister spuriously removed

Samuel Thibault %!s(int64=13) %!d(string=hai) anos
pai
achega
3265678122
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      tests/datawizard/gpu_register.c

+ 4 - 0
tests/datawizard/gpu_register.c

@@ -95,6 +95,10 @@ int main(int argc, char **argv)
 	ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 
+	starpu_data_unpartition(handle, 0);
+	starpu_data_unregister(handle);
+
+	cudaSetDevice(devid);
 	cures = cudaMemcpy(foo, foo_gpu, size * sizeof(*foo_gpu), cudaMemcpyDeviceToHost);
 	if (STARPU_UNLIKELY(cures))
 		STARPU_CUDA_REPORT_ERROR(cures);