Skip to content

Commit

Permalink
lib: various fixes to cmdbuf ndrange kernel launches
Browse files Browse the repository at this point in the history
  • Loading branch information
jansol committed Mar 11, 2024
1 parent f81985d commit d09cb7c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/CL/clCommandFillImageKHR.c
Expand Up @@ -24,7 +24,6 @@
#include <CL/cl_ext.h>

#include "pocl_cl.h"
#include "pocl_image_util.h"
#include "pocl_mem_management.h"
#include "pocl_shared.h"
#include "pocl_util.h"
Expand Down
1 change: 0 additions & 1 deletion lib/CL/clEnqueueCommandBufferKHR.c
Expand Up @@ -25,7 +25,6 @@

#include "pocl_cl.h"
#include "pocl_mem_management.h"
#include "pocl_shared.h"
#include "pocl_util.h"

static void CL_CALLBACK
Expand Down
4 changes: 2 additions & 2 deletions lib/CL/clRemapCommandBufferKHR.c
Expand Up @@ -147,8 +147,8 @@ POname (clRemapCommandBufferKHR) (cl_command_buffer_khr command_buffer,
ulong *groups = cmd->command.run.pc.num_groups;
size_t global_size[3]
= { local_size[0] * groups[0],
work_dim > 1 ? (local_size[1] * groups[1]) : 0,
work_dim > 2 ? (local_size[2] * groups[2]) : 0 };
work_dim > 1 ? (local_size[1] * groups[1]) : 1,
work_dim > 2 ? (local_size[2] * groups[2]) : 1 };

/* Re-record cmd using the original command's kernel arguments.
*
Expand Down
3 changes: 1 addition & 2 deletions lib/CL/pocl_ndrange_kernel.c
Expand Up @@ -498,8 +498,7 @@ pocl_ndrange_kernel_common (
if (errcode != CL_SUCCESS)
goto ERROR;

errcode
= pocl_kernel_copy_args (kernel, src_arguments, &(*cmd)->command.run);
errcode = pocl_kernel_copy_args (kernel, src_arguments, &c->command.run);
if (errcode != CL_SUCCESS)
goto ERROR;

Expand Down
1 change: 1 addition & 0 deletions lib/CL/pocl_util.c
Expand Up @@ -2344,6 +2344,7 @@ pocl_copy_event_node (_cl_command_node *dst_node, _cl_command_node *src_node)
&dst_node->command.run);
if (errcode != CL_SUCCESS)
return CL_OUT_OF_HOST_MEMORY;
dst_node->program_device_i = src_node->program_device_i;
break;

case CL_COMMAND_FILL_BUFFER:
Expand Down

0 comments on commit d09cb7c

Please sign in to comment.