[Beignet] [PATCH OpenCL 2.0] Backend: Update the workgroup instructions for llvm backend to gen.

Zhigang Gong zhigang.gong at linux.intel.com
Wed Apr 29 22:49:36 PDT 2015


Junyan,

I haven't found any new response to address this comment from Rong and me.
Do you miss this comment or do I miss your new patch?

Thanks,
Zhigang Gong.

On Thu, Apr 02, 2015 at 12:53:30PM +0800, Zhigang Gong wrote:
> Right, especially for those builtin function which don't care about the sign.
> Junyan, could you refine your patch accordingly?
> Thanks.
> 
> On Tue, Mar 24, 2015 at 07:39:03AM +0000, Yang, Rong R wrote:
> > Zhigang have add function OCLIntrinsicMap.find to handle override function name, only need one DECL_LLVM_GEN_FUNCTION for one group  override functions, and in the GenWriter::emitCallInst to get the corresponding argument type. It reduce the DECL_LLVM_GEN_FUNCTION significant. Can you also use this method?
> > 
> > > -----Original Message-----
> > > From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> > > junyan.he at inbox.com
> > > Sent: Tuesday, March 24, 2015 14:40
> > > To: beignet at lists.freedesktop.org
> > > Cc: Junyan He
> > > Subject: [Beignet] [PATCH OpenCL 2.0] Backend: Update the workgroup
> > > instructions for llvm backend to gen.
> > > 
> > > From: Junyan He <junyan.he at linux.intel.com>
> > > 
> > > Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> > > ---
> > >  backend/src/llvm/llvm_gen_ocl_function.hxx |   87
> > > ++++++++++++++++++++++++++++
> > >  1 file changed, 87 insertions(+)
> > > 
> > > diff --git a/backend/src/llvm/llvm_gen_ocl_function.hxx
> > > b/backend/src/llvm/llvm_gen_ocl_function.hxx
> > > index 9536a3c..947fadc 100644
> > > --- a/backend/src/llvm/llvm_gen_ocl_function.hxx
> > > +++ b/backend/src/llvm/llvm_gen_ocl_function.hxx
> > > @@ -160,3 +160,90 @@ DECL_LLVM_GEN_FUNCTION(REGION,
> > > __gen_ocl_region)
> > > 
> > >  // printf function
> > >  DECL_LLVM_GEN_FUNCTION(PRINTF, __gen_ocl_printf)
> > > +
> > > +// work group function
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_INT_1D,
> > > +_Z30__gen_ocl_work_group_broadcastij)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_INT_2D,
> > > +_Z30__gen_ocl_work_group_broadcastijj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_INT_3D,
> > > +_Z30__gen_ocl_work_group_broadcastijjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_UINT_1D,
> > > +_Z30__gen_ocl_work_group_broadcastjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_UINT_2D,
> > > +_Z30__gen_ocl_work_group_broadcastjjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_UINT_3D,
> > > +_Z30__gen_ocl_work_group_broadcastjjjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_LONG_1D,
> > > +_Z30__gen_ocl_work_group_broadcastlj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_LONG_2D,
> > > +_Z30__gen_ocl_work_group_broadcastljj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_lONG_3D,
> > > +_Z30__gen_ocl_work_group_broadcastljjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_ULONG_1D,
> > > +_Z30__gen_ocl_work_group_broadcastmj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_ULONG_2D,
> > > +_Z30__gen_ocl_work_group_broadcastmjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_ULONG_3D,
> > > +_Z30__gen_ocl_work_group_broadcastmjjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_FLOAT_1D,
> > > +_Z30__gen_ocl_work_group_broadcastfj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_FLOAT_2D,
> > > +_Z30__gen_ocl_work_group_broadcastfjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_FLOAT_3D,
> > > +_Z30__gen_ocl_work_group_broadcastfjjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_DOUBLE_1D,
> > > +_Z30__gen_ocl_work_group_broadcastdj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_DOUBLE_2D,
> > > +_Z30__gen_ocl_work_group_broadcastdjj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_BROADCAST_DOUBLE_3D,
> > > +_Z30__gen_ocl_work_group_broadcastdjjj)
> > > +
> > > +// work group reduce
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_DOUBLE,
> > > +_Z31__gen_ocl_work_group_reduce_addd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_FLOAT,
> > > +_Z31__gen_ocl_work_group_reduce_addf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_INT,
> > > +_Z31__gen_ocl_work_group_reduce_addi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_UINT,
> > > +_Z31__gen_ocl_work_group_reduce_addj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_LONG,
> > > +_Z31__gen_ocl_work_group_reduce_addl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_ADD_ULONG,
> > > +_Z31__gen_ocl_work_group_reduce_addm)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXD,
> > > +_Z31__gen_ocl_work_group_reduce_maxd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXF,
> > > +_Z31__gen_ocl_work_group_reduce_maxf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXI,
> > > +_Z31__gen_ocl_work_group_reduce_maxi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXJ,
> > > +_Z31__gen_ocl_work_group_reduce_maxj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXL,
> > > +_Z31__gen_ocl_work_group_reduce_maxl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MAXM,
> > > +_Z31__gen_ocl_work_group_reduce_maxm)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MIND,
> > > +_Z31__gen_ocl_work_group_reduce_mind)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MINF,
> > > +_Z31__gen_ocl_work_group_reduce_minf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MINI,
> > > +_Z31__gen_ocl_work_group_reduce_mini)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MINJ,
> > > +_Z31__gen_ocl_work_group_reduce_minj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MINL,
> > > +_Z31__gen_ocl_work_group_reduce_minl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_REDUCE_MINM,
> > > +_Z31__gen_ocl_work_group_reduce_minm)
> > > +
> > > +// work group scan_exclusive
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_FLO
> > > AT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_INT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_UIN
> > > T,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_ADD_UL
> > > ONG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_addm)
> > > +
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAX_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAX_FL
> > > OAT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAX_INT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAX_UI
> > > NT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAX_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MAXM_
> > > ULONG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_maxm)
> > > +
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_mind)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_FLO
> > > AT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_minf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_INT,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_mini)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_UIN
> > > T,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_minj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_minl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_EXCLUSIVE_MIN_UL
> > > ONG,
> > > +_Z39__gen_ocl_work_group_scan_exclusive_minm)
> > > +
> > > +// work group scan_inclusive
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_FLO
> > > AT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_INT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_UIN
> > > T,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_ADD_UL
> > > ONG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_addm)
> > > +
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxd)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_FL
> > > OAT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_INT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxi)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_UI
> > > NT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MAX_UL
> > > ONG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_maxm)
> > > +
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_DO
> > > UBLE,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_mind)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_FLO
> > > AT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_minf)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_INT,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_mini)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_UIN
> > > T,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_minj)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_LO
> > > NG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_minl)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_SCAN_INCLUSIVE_MIN_UL
> > > ONG,
> > > +_Z39__gen_ocl_work_group_scan_inclusive_minm)
> > > +
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_ALL,
> > > __gen_ocl_work_group_all)
> > > +DECL_LLVM_GEN_FUNCTION(WORK_GROUP_ANY,
> > > __gen_ocl_work_group_any)
> > > --
> > > 1.7.9.5
> > > 
> > > _______________________________________________
> > > Beignet mailing list
> > > Beignet at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/beignet
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list