助けてください... opencl プログラムで、これらのエラーが発生します。「oclUtils.h」ヘッダー ファイルがありません。S0 プログラムに含めていません。これが私がこの問題を抱えている理由ですか?私もカーネルを送ります。これが理由である場合、oclUtils.h を使用せずにアトミック関数を使用するにはどうすればよいですか?
*"__kernel void BLAS_susdot_kernel(__global float *x,__global int *index,__global float *y,const int n,__global float* dot_p) \n" \
"{ \n" \
" int block_x = get_group_id(0); \n" \
" int thread_x = get_local_id(0); \n" \
" int i = get_global_id(0); \n" \
" float dot_value, old = *dot_p; \n" \
" int warp_thread_id = i & (32-1); \n" \
" __local float tmp[512]; \n" \
" __local float share_dot_p; \n" \
" if(thread_x == 0) \n" \
" share_dot_p = 0.0; \n" \
" if (i < n) \n" \
" { \n" \
" tmp[i]= x[i]*y[index[i]]; \n" \
" if(warp_thread_id <16 && (i+16)< n) \n" \
" tmp[i]+=tmp[i+16]; \n" \
" if(warp_thread_id <8 && (i+8)< n ) \n" \
" tmp[i]+=tmp[i+8]; \n" \
" if(warp_thread_id <4 && (i+4)< n ) \n" \
" tmp[i]+=tmp[i+4]; \n" \
" if(warp_thread_id <2 && (i+2)< n) \n" \
" tmp[i]+=tmp[i+2]; \n" \
" if(warp_thread_id==0 && (i+1)< n) \n" \
" { \n" \
" tmp[i]+=tmp[i+1]; \n" \
" do \n" \
" { \n" \
" dot_value = old; \n" \
" old = convert_int( atomic_cmpxchg((volatile __global unsigned int*)&share_dot_p, convert_int(dot_value), convert_int(tmp[i] + dot_value))); \n" \
" } while (dot_value != old); \n" \
" //share_dot_p +=tmp[i]; \n" \
" } \n" \
" if(thread_x==0) \n" \
" { \n" \
" \n" \
" do \n" \
" { \n" \
" dot_value = old; \n" \
" old = convert_int(atomic_cmpxchg((volatile __global unsigned int *) dot_p, convert_int(dot_value), convert_int(share_dot_p+dot_value))); \n" \
" } while(dot_value != old); \n" \
" // *dot_p += share_dot_p; \n" \
" \n" \
" } \n" \
" } \n" \
"} \n" \
"\n";*
私が得ているエラー:
Build Program Info: ptxas application ptx input, line 160; error : Label expected for argument 0 of instruction 'call'
ptxas application ptx input, line 160; error : Call target not recognized
ptxas application ptx input, line 160; error : Function 'atomic_cmpxchg' not declared in this scope
ptxas application ptx input, line 160; error : Call target not recognized
ptxas application ptx input, line 185; error : Label expected for argument 0 of instruction 'call'
ptxas application ptx input, line 185; error : Call target not recognized
ptxas application ptx input, line 185; error : Function 'atomic_cmpxchg' not declared in this scope
ptxas application ptx input, line 185; error : Call target not recognized
ptxas application ptx input, line 161; error : Unknown symbol 'atomic_cmpxchg'
ptxas application ptx input, line 186; error : Unknown symbol 'atomic_cmpxchg'
ptxas fatal : Ptx assembly aborted due to errors
error : Ptx compilation failed: gpu='sm_13', device code='cuModuleLoadDataEx_4'
: Considering profile 'compute_13' for gpu='sm_13' in 'cuModuleLoadDataEx_4'
: Retrieving binary for 'cuModuleLoadDataEx_4', for gpu='sm_13', usage mode=' '
: Considering profile 'compute_13' for gpu='sm_13' in 'cuModuleLoadDataEx_4'
: Control flags for 'cuModuleLoadDataEx_4' disable search path
: Ptx binary found for 'cuModuleLoadDataEx_4', architecture='compute_13'
: Ptx compilation for 'cuModuleLoadDataEx_4', for gpu='sm_13', ocg options=' '