Log in

View Full Version : hUMA/HSA support for x264


Racer
8th January 2014, 20:41
Hello,

are there actually already any plans to support HSA for x264. Or is it the same situation like for OpenCL, that it only could be used for offloading of the lookahead function, what means not a real performance improvement.

Thanks!

LoRd_MuldeR
8th January 2014, 21:55
Isn't OpenCL the way to leverage HSA?

HSA is just a fancy name for a fast interconnect between the CPU and the GPU. That and a unified address space. But if you want to offload calculations to the GPU, you'd still need to use OpenCL for that purpose.

Racer
8th January 2014, 21:59
You are right, but maybe there are some additional HSA features what could be used by x264 to offload some functions to the GPU.

Edit: Ok, so that means not worth to give OpenCL another try to speed up x264

LoRd_MuldeR
8th January 2014, 22:12
You are right, but maybe there are some additional HSA features what could be used by x264 to offload some functions to the GPU.

Again: AFAIK, hUMA/HSA is not a new GPU programming interface (unlike MANTLE). It's just a fancy name for AMD's hardware platform that combines a CPU and a GPU on one die/chip.

It's pretty much the same thing that Intel is doing with the integrated Core-i graphics, though the details may differ, of course!

While integrating the CPU and the GPU in one chip promises some advantages for GPGPU programming, "offloading" calculations to the GPU is still done via OpenCL - at least as far as AMD is concerned. CUDA is still strong on the NVidia side.

So, from the programmers point of view, not much is changing. The part of the program that is supposed to run on the GPU is still written in OpenCL, regardless of whether we are running on a system that AMD calls "HSA" or, e.g., an Intel CPU.

In other words: x264's existing OpenCL implementation shouldn't need any modifications to run on a "HSA enabled" system. The differences between HSA and other GPU's probably are "hidden" by the OpenCL compiler and the GPU driver.

(Whether x264's OpenCL code runs more efficient on HSA systems, I don't know. On the one hand, not having to copy the data between CPU and GPU memory is an advantage. On the other hand, those "integrated" GPU's are relatively weak!)

CoreDuo
25th January 2014, 18:17
I'm guessing that x264's OpenCL implementation might need to be updated in order to take advantage of the majority of AMD's architecture since from some cursory digging it appears to be written for OpenCL 1.1. It will be a while before this can be done though, as the final OpenCL 2.0 spec only came out in November last year and driver support for the Kaveri APUs won't be out until Q1 2015 according to Anandtech (http://anandtech.com/show/7677/amd-kaveri-review-a8-7600-a10-7850k/6). Whether or not there will be interest in doing it by that stage is anyone's guess.

mandarinka
25th January 2014, 20:42
For x264 the OpenCL lookahead doesn't really bring much to the table though, so you don't need to worry about it too much. Essentially x264 is a CPU application.

GhostKilla
20th February 2014, 00:35
(Whether x264's OpenCL code runs more efficient on HSA systems, I don't know. On the one hand, not having to copy the data between CPU and GPU memory is an advantage. On the other hand, those "integrated" GPU's are relatively weak!)

Some tests are promising :

http://wccftech.com/amd-kaveri-i54670k-benchmarks-showdown-continued-hsa-features-test/

mzso
22nd February 2014, 19:35
Isn't OpenCL the way to leverage HSA?

HSA is just a fancy name for a fast interconnect between the CPU and the GPU. That and a unified address space. But if you want to offload calculations to the GPU, you'd still need to use OpenCL for that purpose.

Well I guess you could code HSAIL instructions directly. :devil: