Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix profiling execute_multipass failure with segmentation fault #2256

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test_conformance/profiling/execute_multipass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int run_kernel( cl_device_id device, cl_context context, cl_command_queue
// allocate an array memory object to load the filter weights
memobjs[1] =
clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * w * h * d * nChannels, NULL, &err);
sizeof(cl_uchar) * w * h * d * nChannels, NULL, &err);
if( memobjs[1] == (cl_mem)0 ){
log_error( " unable to create array using clCreateBuffer\n" );
clReleaseMemObject( memobjs[0] );
Expand Down Expand Up @@ -237,7 +237,9 @@ static int run_kernel( cl_device_id device, cl_context context, cl_command_queue
}

// read output image
err = clEnqueueReadBuffer(queue, memobjs[1], CL_TRUE, 0, w*h*d*nChannels*4, outptr, 0, NULL, NULL);
err = clEnqueueReadBuffer(queue, memobjs[1], CL_TRUE, 0,
sizeof(cl_uchar) * w * h * d * nChannels, outptr,
0, NULL, NULL);
if( err != CL_SUCCESS ){
print_error( err, "clReadImage failed\n" );
clReleaseKernel( kernel[0] );
Expand Down
Loading