mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
cl20: Khronos Bug 15619 Race condition in device execution enqueue_flags test
This commit is contained in:
committed by
Kévin Petit
parent
4c31b69980
commit
b99c6004ce
@@ -39,8 +39,6 @@ static const char* enqueue_flags_wait_kernel_simple[] =
|
|||||||
NL, " size_t lid = get_local_id(0);"
|
NL, " size_t lid = get_local_id(0);"
|
||||||
NL, " size_t tid = get_global_id(0);"
|
NL, " size_t tid = get_global_id(0);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
|
||||||
NL, ""
|
|
||||||
NL, " if(tid == 0)"
|
NL, " if(tid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " if((index + 1) < BITS_DEPTH)"
|
NL, " if((index + 1) < BITS_DEPTH)"
|
||||||
@@ -52,6 +50,8 @@ static const char* enqueue_flags_wait_kernel_simple[] =
|
|||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
||||||
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
@@ -106,8 +106,6 @@ static const char* enqueue_flags_wait_kernel_event[] =
|
|||||||
NL, " size_t lid = get_local_id(0);"
|
NL, " size_t lid = get_local_id(0);"
|
||||||
NL, " size_t tid = get_global_id(0);"
|
NL, " size_t tid = get_global_id(0);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
|
||||||
NL, ""
|
|
||||||
NL, " if(tid == 0)"
|
NL, " if(tid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " if((index + 1) < BITS_DEPTH)"
|
NL, " if((index + 1) < BITS_DEPTH)"
|
||||||
@@ -124,6 +122,8 @@ static const char* enqueue_flags_wait_kernel_event[] =
|
|||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
||||||
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
@@ -193,7 +193,6 @@ static const char* enqueue_flags_wait_kernel_local[] =
|
|||||||
NL, " val += sub_array[i];"
|
NL, " val += sub_array[i];"
|
||||||
NL, " val -= (tid == id)? 0: (id + index - 1);"
|
NL, " val -= (tid == id)? 0: (id + index - 1);"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " array[index * gs + tid] = val + 1;"
|
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(tid == 0)"
|
NL, " if(tid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
@@ -206,6 +205,8 @@ static const char* enqueue_flags_wait_kernel_local[] =
|
|||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
NL, " array[index * gs + tid] = val + 1;"
|
||||||
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
@@ -269,7 +270,6 @@ static const char* enqueue_flags_wait_kernel_event_local[] =
|
|||||||
NL, " val += sub_array[i];"
|
NL, " val += sub_array[i];"
|
||||||
NL, " val -= (tid == id)? 0: (id + index - 1);"
|
NL, " val -= (tid == id)? 0: (id + index - 1);"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " array[index * gs + tid] = val + 1;"
|
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(tid == 0)"
|
NL, " if(tid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
@@ -287,6 +287,8 @@ static const char* enqueue_flags_wait_kernel_event_local[] =
|
|||||||
NL, " }"
|
NL, " }"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
NL, " array[index * gs + tid] = val + 1;"
|
||||||
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
@@ -348,8 +350,6 @@ static const char* enqueue_flags_wait_work_group_simple[] =
|
|||||||
NL, " "
|
NL, " "
|
||||||
NL, " if(gid == group_id)"
|
NL, " if(gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
|
||||||
NL, " "
|
|
||||||
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP, ndrange_1D(gs, ls), "
|
NL, " enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP, ndrange_1D(gs, ls), "
|
||||||
@@ -357,13 +357,15 @@ static const char* enqueue_flags_wait_work_group_simple[] =
|
|||||||
NL, " block_fn(array, index + 1, ls, res, gid);"
|
NL, " block_fn(array, index + 1, ls, res, gid);"
|
||||||
NL, " });"
|
NL, " });"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
|
NL, " "
|
||||||
|
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(lid == 0)"
|
NL, " if(lid == 0 && gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " res[gid] = 1;"
|
NL, " res[gid] = 1;"
|
||||||
NL, ""
|
NL, ""
|
||||||
@@ -417,8 +419,6 @@ static const char* enqueue_flags_wait_work_group_event[] =
|
|||||||
NL, " "
|
NL, " "
|
||||||
NL, " if(gid == group_id)"
|
NL, " if(gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
|
||||||
NL, " "
|
|
||||||
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " clk_event_t block_evt;"
|
NL, " clk_event_t block_evt;"
|
||||||
@@ -431,6 +431,8 @@ static const char* enqueue_flags_wait_work_group_event[] =
|
|||||||
NL, " release_event(user_evt);"
|
NL, " release_event(user_evt);"
|
||||||
NL, " release_event(block_evt);"
|
NL, " release_event(block_evt);"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
|
NL, " "
|
||||||
|
NL, " array[index * gs + tid] = array[(index - 1) * gs + tid] + 1;"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, ""
|
NL, ""
|
||||||
@@ -438,7 +440,7 @@ static const char* enqueue_flags_wait_work_group_event[] =
|
|||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(lid == 0)"
|
NL, " if(lid == 0 && gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " res[gid] = 1;"
|
NL, " res[gid] = 1;"
|
||||||
NL, ""
|
NL, ""
|
||||||
@@ -508,8 +510,6 @@ static const char* enqueue_flags_wait_work_group_local[] =
|
|||||||
NL, " "
|
NL, " "
|
||||||
NL, " if(gid == group_id)"
|
NL, " if(gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " array[index * gs + tid] = val + 1;"
|
|
||||||
NL, " "
|
|
||||||
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP, ndrange_1D(gs, ls), "
|
NL, " enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP, ndrange_1D(gs, ls), "
|
||||||
@@ -517,6 +517,8 @@ static const char* enqueue_flags_wait_work_group_local[] =
|
|||||||
NL, " block_fn(array, index + 1, ls, res, sub_array, gid);"
|
NL, " block_fn(array, index + 1, ls, res, sub_array, gid);"
|
||||||
NL, " }, ls * sizeof(int));"
|
NL, " }, ls * sizeof(int));"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
|
NL, " "
|
||||||
|
NL, " array[index * gs + tid] = val + 1;"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, ""
|
NL, ""
|
||||||
@@ -524,7 +526,7 @@ static const char* enqueue_flags_wait_work_group_local[] =
|
|||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(lid == 0)"
|
NL, " if(lid == 0 && gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " res[gid] = 1;"
|
NL, " res[gid] = 1;"
|
||||||
NL, ""
|
NL, ""
|
||||||
@@ -589,8 +591,6 @@ static const char* enqueue_flags_wait_work_group_event_local[] =
|
|||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(gid == group_id)"
|
NL, " if(gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " array[index * gs + tid] = val + 1;"
|
|
||||||
NL, " "
|
|
||||||
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
NL, " if((index + 1) < BITS_DEPTH && lid == 0)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " clk_event_t block_evt;"
|
NL, " clk_event_t block_evt;"
|
||||||
@@ -603,13 +603,15 @@ static const char* enqueue_flags_wait_work_group_event_local[] =
|
|||||||
NL, " release_event(user_evt);"
|
NL, " release_event(user_evt);"
|
||||||
NL, " release_event(block_evt);"
|
NL, " release_event(block_evt);"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
|
NL, " "
|
||||||
|
NL, " array[index * gs + tid] = val + 1;"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if((index + 1) == BITS_DEPTH)"
|
NL, " if((index + 1) == BITS_DEPTH)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
NL, " barrier(CLK_GLOBAL_MEM_FENCE);"
|
||||||
NL, ""
|
NL, ""
|
||||||
NL, " if(lid == 0)"
|
NL, " if(lid == 0 && gid == group_id)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " res[gid] = 1;"
|
NL, " res[gid] = 1;"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
|||||||
Reference in New Issue
Block a user