[FFmpeg-devel] OpenCL: convert meaningless "device id" output to "device name"

Michael Niedermayer michaelni at gmx.at
Sat Sep 14 20:23:03 CEST 2013


On Thu, Sep 12, 2013 at 12:38:23AM -0500, Lenny Wang wrote:
> Any chance to have this patch accepted?

The maintainer of opencl in ffmpeg is Wei gao, see the MAINTEINERS
file.
If Wei asks me to merge a patch or git branch with opencl changes
then ill do it.
Maybe ive misinterpreted the mails but ive not been asked
to merge it.
And this applies to all developers actually, if you want me to merge,
or apply something be explicit about it.


> 
> I also want to point out that currently users can choose OpenCL
> devices by using this option "-opencl_options device_idx=0".  I have
> done extensive tests on many Intel/AMD platforms, on Intel, the CPU
> OpenCL device is usually device 0 and on AMD, device 0 is the GPU
> device.  With this patch, users can tell which device is actually
> being used without confusion.

> 
> On Tue, Sep 10, 2013 at 3:08 AM, highgod0401 <highgod0401 at gmail.com> wrote:
> >
> >
> >
> >
> >
> > highgod0401
> >
> > From: Lenny Wang
> > Date: 2013-09-10 15:57
> > To: ffmpeg-devel
> > Subject: [FFmpeg-devel] OpenCL: convert meaningless "device id" output to "device name"
> > Greetings all,
> >
> > The current verbose output from ffmpeg-opencl is like this "[OPENCLUTILS @
> > 00bf4060] Platform Name: NVIDIA Corporation, device id: 0x35f1518".  The
> > "device id" is formatted to a hexadecimal integer from *cl_device_id* type.
> >  In OpenCL world, the *cl_device_id* value is used to identify a specific
> > OpenCL device, this value is dynamic and it gives no information about
> > which device is being used.  I argue that it should be changed to a
> > meaningful device name.  See patch attached.
> >
> > diff --git a/libavutil/opencl.c b/libavutil/opencl.c
> > index 5887b50..e0b28c3 100644
> > --- a/libavutil/opencl.c
> > +++ b/libavutil/opencl.c
> > @@ -516,9 +516,9 @@ static int init_opencl_env(OpenclContext *opencl_ctx, AVOpenCLExternalEnv *ext_o
> >              /*
> >               * Use available platform.
> >               */
> > -            av_log(opencl_ctx, AV_LOG_VERBOSE, "Platform Name: %s, device id: 0x%x\n",
> > +            av_log(opencl_ctx, AV_LOG_VERBOSE, "Platform Name: %s, Device Name: %s\n",
> >                     opencl_ctx->device_list.platform_node[opencl_ctx->platform_idx]->platform_name,
> > -                   (unsigned int)opencl_ctx->device_id);
> > +                   device_node->device_name);
> >              cps[0] = CL_CONTEXT_PLATFORM;
> >              cps[1] = (cl_context_properties)opencl_ctx->platform_id;
> >              cps[2] = 0;
> >
> > Shouldn't the "Device Name" be written as "device name"?
> >
> > Looks good to me, it make the print information meaningful.
> >
> > Thanks
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130914/7302c21e/attachment.asc>


More information about the ffmpeg-devel mailing list