From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 100105] Make Theano OpenCL support work on Clover and RadeonSI
Date: Tue, 07 Mar 2017 18:35:38 +0000
Message-ID:
Bug ID
100105
Summary
Make Theano OpenCL support work on Clover and RadeonSI
Product
Mesa
Version
git
Hardware
Other
OS
All
Status
NEW
Severity
major
Priority
medium
Component
Drivers/Gallium/radeonsi
Assignee
dri-devel@lists.freedesktop.org
Reporter
vedran@miletic.net
QA Contact
dri-devel@lists.freedesktop.org
$ DEVICE=3D"opencl0:0" python -c "import pygpu;=
pygpu.test()"
pygpu is installed in
/usr/lib64/python2.7/site-packages/pygpu-0.6.2-py2.7-linux-x86_64.egg/pygpu
NumPy version 1.11.2
NumPy relaxed strides checking option: False
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy
Python version 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 =
(Red
Hat 6.3.1-1)]
nose version 1.3.7
*** Testing for AMD FIJI (DRM 3.8.0 / 4.9.13-200.fc25.x86_64, LLVM 5.0.0)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
AN INTERNAL KERNEL BUILD ERROR OCCURRED!
device name =3D AMD FIJI (DRM 3.8.0 / 4.9.13-200.fc25.x86_64, LLVM 5.0.0)
error =3D -43
memory pattern =3D Register accumulation based swap, computing kernel gener=
ator
Subproblem dimensions: dims[0].itemY =3D 32, dims[0].itemX =3D 32, dims[0].=
y =3D 32,
dims[0].x =3D 32, dims[0].bwidth =3D 64; ; dims[1].itemY =3D 4, dims[1].ite=
mX =3D 4,
dims[1].y =3D 4, dims[1].x =3D 4, dims[1].bwidth =3D 8; ;=20
Parallelism granularity: pgran->wgDim =3D 1, pgran->wgSize[0] =3D 64,
pgran->wgSize[1] =3D 1, pgran->wfSize =3D 64
Kernel extra flags: 369130144
Source:
#ifdef DOUBLE_PRECISION
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#else
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
#endif
#endif
__kernel void Sdot_kernel( __global float *_X, __global float *_Y, __global
float *scratchBuff,
uint N, uint offx, int incx, uint o=
ffy,
int incy, int doConj )
{
__global float *X =3D _X + offx;
__global float *Y =3D _Y + offy;
float dotP =3D (float) 0.0;
if ( incx < 0 ) {
X =3D X + (N - 1) * abs(incx);
}
if ( incy < 0 ) {
Y =3D Y + (N - 1) * abs(incy);
}
int gOffset;
for( gOffset=3D(get_global_id(0) * 4); (gOffset + 4 - 1)<N; gOffset+=
=3D(
get_global_size(0) * 4 ) )
{
float4 vReg1, vReg2, res;
#ifdef INCX_NONUNITY
vReg1 =3D (float4)( (X + (gOffset*incx))[0 + ( incx * 0)], (=
X +
(gOffset*incx))[0 + ( incx * 1)], (X + (gOffset*incx))[0 + ( incx * 2)], =
(X +
(gOffset*incx))[0 + ( incx * 3)]);
#else
vReg1 =3D vload4( 0, (__global float *) (X + gOffset) );
#endif
#ifdef INCY_NONUNITY
vReg2 =3D (float4)( (Y + (gOffset*incy))[0 + ( incy * 0)], (=
Y +
(gOffset*incy))[0 + ( incy * 1)], (Y + (gOffset*incy))[0 + ( incy * 2)], =
(Y +
(gOffset*incy))[0 + ( incy * 3)]);
#else
vReg2 =3D vload4( 0, (__global float *) (Y + gOffset) );
#endif
;
res =3D vReg1 * vReg2 ;
dotP +=3D res .S0 + res .S1 + res .S2 + res .S3;
; // Add-up elements in the vector to give a scalar
}
// Loop for the last thread to handle the tail part of the vector
// Using the same gOffset used above
for( ; gOffset<N; gOffset++ )
{
float sReg1, sReg2, res;
sReg1 =3D X[gOffset * incx];
sReg2 =3D Y[gOffset * incy];
;
res =3D sReg1 * sReg2 ;
dotP =3D dotP + res ;
}
// Note: this has to be called outside any if-conditions- because REDUC=
TION
uses barrier
// dotP of work-item 0 will have the final reduced item of the work-gro=
up
__local float viraW [ 64 ];
uint kFbwL =3D get_local_id(0);
viraW [ kFbwL ] =3D dotP ;
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL < 32 ) {
viraW [ kFbwL ] =3D viraW [ kFbwL ] + viraW [ kFbwL + 32 ];
}
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL < 16 ) {
viraW [ kFbwL ] =3D viraW [ kFbwL ] + viraW [ kFbwL + 16 ];
}
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL < 8 ) {
viraW [ kFbwL ] =3D viraW [ kFbwL ] + viraW [ kFbwL + 8 ];
}
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL < 4 ) {
viraW [ kFbwL ] =3D viraW [ kFbwL ] + viraW [ kFbwL + 4 ];
}
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL < 2 ) {
viraW [ kFbwL ] =3D viraW [ kFbwL ] + viraW [ kFbwL + 2 ];
}
barrier(CLK_LOCAL_MEM_FENCE);
if( kFbwL =3D=3D 0 ) {
dotP =3D viraW [0] + viraW [1];
}
if( (get_local_id(0)) =3D=3D 0 ) {
scratchBuff[ get_group_id(0) ] =3D dotP;
}
}
--------------------------------------------------------
Build log:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
Segmentation fault (core dumped)