well done. I am sorry but for the moment I have absolutely no time to
work on the sorting. I am not able to compile too. Would it be possible
to rename the kernel sources as .cl, as usual ? It would simplify
greatly my SConstruct file for mac or linux. And I would be able to test
on my AMD card.
bests
PH
Le 20/06/2011 09:58, Viewon01 a �crit :
All the kernel sources are ".cl" !!!!
What is the problem ?
-----Original Message-----
From: "philipp...@gmail.com" <philipp...@gmail.com>
Sent: Tuesday, June 21, 2011 4:42am
To: cl...@googlegroups.com
Subject: Re: Help requested : Satish sort on GPU
Hi Krys,
well done. I am sorry but for the moment I have absolutely no time to
work on the sorting. I am not able to compile too. Would it be possible
to rename the kernel sources as .cl, as usual ? It would simplify
greatly my SConstruct file for mac or linux. And I would be able to test
on my AMD card.
bests
PH
Le 03/07/11 00:26, crb002 a �crit :
> Here is my naive compile under OSX using the example on the main page.
> Guess I will be tracking down these issues.
> Using the version clpp_v1_beta2.zip.
>
> crb002$ g++ test.cpp -framework OpenCL -I./ -Wall
> test.cpp: In function �int main()�:
> test.cpp:12: error: no matching function for call to
> �clpp::createBestSort(clppContext&, int)�
> ./clpp/clpp.h:16: note: candidates are: static clppSort*
> clpp::createBestSort(clppContext*, unsigned int, unsigned int)
> test.cpp:12: error: cannot declare variable �sort� to be of abstract
> type �clppSort�
> ./clpp/clppSort.h:13: note: because the following virtual functions
> are pure within �clppSort�:
> ./clpp/clppSort.h:16: note: virtual std::string clppSort::getName()
> ./clpp/clppSort.h:19: note: virtual void clppSort::sort()
> ./clpp/clppSort.h:31: note: virtual void
> clppSort::pushCLDatas(_cl_mem*, size_t)
> ./clpp/clppSort.h:34: note: virtual void clppSort::popDatas()
> test.cpp:14: error: expected primary-expression before �...� token
> test.cpp:14: error: expected �,� or �;� before �...� token
> test.cpp:17: error: base operand of �->� has non-pointer type
> �clppSort�
> test.cpp:18: error: base operand of �->� has non-pointer type
> �clppSort�
> test.cpp:20: error: base operand of �->� has non-pointer type
> �clppSort�
> test.cpp:22: error: no match for call to �(clppSort) ()�
> test.cpp:14: warning: unused variable �dataToSort�
I just would like to notify that it remain a bug and that the architecture has to be improved too. So, maybe it is better if you directly use the last SVN version.
Feel free to contact us for help
Krys
-----Original Message-----
From: "philipp...@gmail.com" <philipp...@gmail.com>
Sent: Sunday, July 3, 2011 4:47am
To: cl...@googlegroups.com
Subject: Re: Help requested : Satish sort on GPU
I have written a scons script (SConstruct) for compiling clpp. You
should rather install scons ( http://www.scons.org/ ), open a terminal,
cd to the clpp folder and just type "scons". It works !
ph
Le 03/07/11 00:26, crb002 a écrit :
> Here is my naive compile under OSX using the example on the main page.
> Guess I will be tracking down these issues.
> Using the version clpp_v1_beta2.zip.
>
> crb002$ g++ test.cpp -framework OpenCL -I./ -Wall
> test.cpp: In function ‘int main()’:
> test.cpp:12: error: no matching function for call to
> ‘clpp::createBestSort(clppContext&, int)’
> ./clpp/clpp.h:16: note: candidates are: static clppSort*
> clpp::createBestSort(clppContext*, unsigned int, unsigned int)
> test.cpp:12: error: cannot declare variable ‘sort’ to be of abstract
> type ‘clppSort’
> ./clpp/clppSort.h:13: note: because the following virtual functions
> are pure within ‘clppSort’:
> ./clpp/clppSort.h:16: note: virtual std::string clppSort::getName()
> ./clpp/clppSort.h:19: note: virtual void clppSort::sort()
> ./clpp/clppSort.h:31: note: virtual void
> clppSort::pushCLDatas(_cl_mem*, size_t)
> ./clpp/clppSort.h:34: note: virtual void clppSort::popDatas()
> test.cpp:14: error: expected primary-expression before ‘...’ token
> test.cpp:14: error: expected ‘,’ or ‘;’ before ‘...’ token
> test.cpp:17: error: base operand of ‘->’ has non-pointer type
> ‘clppSort’
> test.cpp:18: error: base operand of ‘->’ has non-pointer type
> ‘clppSort’
> test.cpp:20: error: base operand of ‘->’ has non-pointer type
> ‘clppSort’
> test.cpp:22: error: no match for call to ‘(clppSort) ()’
> test.cpp:14: warning: unused variable ‘dataToSort’
__local uint localBuffer[64];
by
uint localBuffer[64];
and the same at other places
ph
Le 08/07/2011 04:06, crb002 a �crit :
> __local uint localBuffer[64];
But it is incorrect, this way it will not work, why ?
Because __local memory is shared between all the 'items' in a workgroup.
If you don't use __local it will not be shared between the items.
In the following case, we need to share them because each work-item will compute
values, and just after another work-item will use this value. Then, it can
be done only because the memory is shared.
So, finally there are 2 solutions :
1) Declare this array in the kernel and pass it as a parameter to the functions.
It is the way I propose to do the correction.
2) Declare the __local array in C++ and pass it as a kernel parameter.
On NVidia card I have try both, but strangely the second version give me a 'slower' sort !
I expect to do the correction today.
Krys
-----Original Message-----
From: "philipp...@gmail.com" <philipp...@gmail.com>
Sent: Friday, July 8, 2011 2:25am
To: cl...@googlegroups.com
Subject: Re: Help requested : Satish sort on GPU
you have to replace
__local uint localBuffer[64];
by
uint localBuffer[64];
and the same at other places
ph
Le 08/07/2011 04:06, crb002 a écrit :
> __local uint localBuffer[64];
ph
In the first version (1) you declare the local parameter into your kernel like this :
__local int localBuffer[64];
In the second, the localBuffer is a kernel parameter. You create it in C++ with the following command :
clSetKernelArg(kernel, 0, 64, NULL);
I was expecting the same behaviour, but it sounds that in some case the first version is faster. I don't know why !
It is a problem that I have also with the AMD GPU !
Thanks for your help
It is a problem that I have also with the AMD GPU !
Thanks for your help
Thx
128 * 4 = 512 , where 4 is an int4.
you can try with 256 but maybe you will have to adapt the algorithm.
Krys
ph
Le 12/07/11 17:31, kr...@polarlights.net a écrit :
> Salut Philippe,
>
> Si tu as un peu de temps pour cette question. J'ai un bug dans la fonction 'pow' de OpenCL sur le SDK d'intel.
>
> Du coup j'essaie de l'implémenter autrement et je crois que :
>
> pow(x,exponent) = exp(exponent*ln(x))
>
> avec x et y étant des flottants !
>
> Est ce bien correcte ?
>
> Hors je ne vois pas de fonction 'ln' en OpenCL ! Je n'ai que log, log2, log10, log1p et logb ! Comment puis je la remplacer ?
>
> Merci d'avance
>
> Krys
>
Un grand merci, encore une fois.
Bonne soirée
Krys
-----Original Message-----
From: "philipp...@gmail.com" <philipp...@gmail.com>
Sent: Tuesday, July 12, 2011 11:59am
To: cl...@googlegroups.com