x11/nvidia-driver-340 and OpenCL

Arto Pekkanen isoa at kapsi.fi
Wed Aug 30 20:29:54 UTC 2017


If the GPU driver is implemented properly there will be no stutter or
other problems even when running OpenCL jobs.

In Windows there is no problem running OpenCL jobs on the same device
that operates your display. Like running a crypto currency miner while
browsing the web. Playing games won't work well, but basic stuff you can do.

TL;DR when the FreeBSD GPU driver and all the userland bits are up to
date, I'd expect there to be no issues with stuttering.

On 28.8.2017 14:11, Scott Bennett wrote:
> Jan Beich <jbeich at vfemail.net> wrote:
> 
>> Scott Bennett <bennett at sdf.org> writes:
>>
>>>      Thank you very much for that information, Jan.  I will take a look at
>>> that, but if the situation is that chancy and would mean being stuck with
>>> 32-bit emulation, it probably wouldn't be my best option after all.
>>
>> lang/pocl may also be useful, mainly when debugging OpenCL in apps.
> 
>      Right now I'm still on 10.3-STABLE, so lang/pocl is not an option.  Soon,
> I hope, I will install 11.1-RELEASE, but because it will be a fresh
> installation into a ZFS pool, whereas my current 10.3-STABLE is on several UFS2
> partitions, I need to find the time to draw up a plan to do it without losing
> my existing configuration files and then to get it done.  Then I can install
> lang/pocl.
>>
>>>      Do you know whether a 64-bit driver (for later Nvidia cards, of course)
>>> is in the works with up-to-date features?
>>
>> No. Try pinging upstream on https://devtalk.nvidia.com/default/board/97/
> 
>      Thanks for the URL.  Hmm.  There seems to be a problem with it at the
> moment, so I'll try it again later.
>>
>>> Or would I do better by buying a more recent Radeon card?
>>
>> Did lang/clover not work on Radeon HD 3870 e.g., with radeonkms + r600g?
>> If so, try upgrading just the kernel to drm-next branch.
> 
>      No, and according to the AMD web sites, the GPUs on those cards are not
> capable of it.  Although they support the now abandoned ATI Streams software,
> they do not support OpenCL.  The Radeon HD 3870x2 cards were the last to
> be released that did not support at least OpenCL 1.0. :-(  IIRC, the GPUs on
> these cards are RS780 chips, but I may be misremembering the number because
> I haven't looked at those web pages for quite some time.
>>
>> Personally, I use lang/beignet on Intel Skylake GT2 (iGPU). The performance
>> is decent enough to accelerate some jobs e.g., waifu2x-convert-cpp,
>> ImageMagick, FFmpeg (a few filters but VAAPI encoding also works). X11 display
>> stutters if OpenCL is running on the same GPU, but neither setpriority(2)
>> nor rtprio(2) help. Switching X11 display to NVIDIA Kepler GK107 (dGPU)
>> eliminated the stutter. However, there's probably a better way to schedule
>> jobs on GPU.
> 
>      So the problem is not in the feeding of the GPU, but in its internal
> scheduling.  I'm not terribly surprised somehow.  The GPU may have to finish
> a work item or maybe its entire work queue before it can switch to another
> piece of work, e.g., an OpenGL command.  I've long suspected that OpenCL
> should probably only be done on GPUs that are not simultaneously supporting
> monitors to avoid such problems or contention for graphics device memory.
>      I only use one monitor, so I had thought that I could use three of the
> four GPUs for OpenCL stuff, but the dratted cards don't do OpenCL, so three of
> the four GPUs are of no help to me and just waste electricity.  The second
> card prevents use of a slot between the two cards, so removing it would
> potentially open both slots, depending upon what I decide to replace it with.
> I have an unused USB 3.0 card that would speed up a few things by separating
> devices across controllers, or I could buy a SATA 3 card somewhere or possibly
> do both.  The first option is the only one that I could do for free at this
> point, but that wouldn't get me OpenCL support, although, as you point out,
> I should be able to use lang/pocl for development/testing (once I get 11.1
> installed), just not for performance.
>      Thanks again for the suggestions.
> 
> 
>                                   Scott Bennett, Comm. ASMELG, CFIAG
> **********************************************************************
> * Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
> *--------------------------------------------------------------------*
> * "A well regulated and disciplined militia, is at all times a good  *
> * objection to the introduction of that bane of all free governments *
> * -- a standing army."                                               *
> *    -- Gov. John Hancock, New York Journal, 28 January 1790         *
> **********************************************************************
> _______________________________________________
> freebsd-x11 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to "freebsd-x11-unsubscribe at freebsd.org"
> 

-- 
Arto Pekkanen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20170830/bcbf7d92/attachment.sig>


More information about the freebsd-x11 mailing list