boostorg / boostorg/ublas

returnn an errors after run this function: T norm2_opencl = opencl::norm_2(v, queue);

Open
#197 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
122
Forks
151
PR merge metrics
No merged PRs in 30d

Description

[asus@localhost build]$ ./boost_ublas_sample
AN INTERNAL KERNEL BUILD ERROR OCCURRED!
device name = 12th Gen Intel(R) Core(TM) i5-1235U
error = -11
memory pattern = Register accumulation based Nrm2, computing kernel generator
Subproblem dimensions: dims[0].itemY = 32, dims[0].itemX = 32, dims[0].y = 32, dims[0].x = 32, dims[0].bwidth = 64; ; dims[1].itemY = 4, dims[1].itemX = 4, dims[1].y = 4, dims[1].x = 4, dims[1].bwidth = 8; ;
Parallelism granularity: pgran->wgDim = 1, pgran->wgSize[0] = 64, pgran->wgSize[1] = 1, pgran->wfSize = 64
Kernel extra flags: 268446368
Source:

#ifdef DOUBLE_PRECISION
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#else
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
#endif
#define MAX 0x1.fffffffffffffp1023 // Max in case of d/z (values from khronos site)
#else
#define MAX 0x1.fffffep127f // Max in case of s/c
#endif

#define PZERO (float)0.0
#define ZERO (float)0.0
#define VZERO (float4)0.0

//
// Same scratch buffer will be used both scale and ssq.
// So a scratch buffer of size 2*N is needed.
// scale will be stored in scratch-buffer from [0] to [get_num_groups(0) - 1]
// ssq will be stored from [get_num_groups(0)] to [2*get_num_groups(0) - 1]
//

__kernel void Snrm2_ssq_kernel( __global float *_X, __global float *scratchBuff,
uint N, uint offx, int incx )
{
__global float *X = _X + offx;
uint numWGs = get_num_groups(0);

#ifdef RETURN_ON_INVALID
// Incase of incx<1, NRM2 will be zero
if( get_global_id(0) == 0 ) {
scratchBuff[0] = PZERO;
scratchBuff[numWGs] = PZERO;
}
return;
#endif

// First we find the max element in the whole work-group
// i.e calculating scale
float maxFound = (float) -MAX;

int gOffset;
for( gOffset=(get_global_id(0) * 4); (gOffset + 4 - 1)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.