Created
May 29, 2017 13:06
-
-
Save jrprice/4dca8971102bb0ba2d3d342db96f7f2e to your computer and use it in GitHub Desktop.
WIP patch for attempting to fix event dependencies in pocl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/CL/devices/common.c b/lib/CL/devices/common.c | |
index 075474c..a574b14 100644 | |
--- a/lib/CL/devices/common.c | |
+++ b/lib/CL/devices/common.c | |
@@ -632,6 +632,7 @@ pocl_broadcast (cl_event brc_event) | |
if (tmp->event == brc_event) | |
{ | |
LL_DELETE (target->event->wait_list, tmp); | |
+ POname(clReleaseEvent) (tmp->event); | |
pocl_mem_manager_free_event_node (tmp); | |
break; | |
} | |
diff --git a/lib/CL/pocl_util.c b/lib/CL/pocl_util.c | |
index d102a3a..b822ee5 100644 | |
--- a/lib/CL/pocl_util.c | |
+++ b/lib/CL/pocl_util.c | |
@@ -269,6 +269,9 @@ pocl_create_event_sync(cl_event waiting_event, | |
wait_list_item->event = notifier_event; | |
LL_PREPEND (notifier_event->notify_list, notify_target); | |
LL_PREPEND (waiting_event->wait_list, wait_list_item); | |
+ | |
+ notifier_event->pocl_refcount++; | |
+ | |
POCL_UNLOCK_OBJ (waiting_event); | |
return CL_SUCCESS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment