Giter Site home page Giter Site logo

ocl-radix-sort's People

Stargazers

 avatar

Watchers

 avatar

Forkers

5l1v3r1

ocl-radix-sort's Issues

Not enough local memory

Dear Philippe Helluy.

Congrats for your amazing work!

I'm Jose Luis Cercós Pita (another time) with a small bug.

If you select _BITS = 8 (CLRadixSortParam.hpp), local memory is not enough into 
some NVidia cards, but any OUT OF MEMORY is reported. In this this case the 
kernels simply pass without any operations, with a broken result.

To solve it (or test it), you can add something like this:

    cl_ulong localMem;
    clGetDeviceInfo(device, CL_DEVICE_LOCAL_MEM_SIZE, sizeof(localMem), &localMem, NULL);
    if(localMem < sizeof(cl_uint)*_RADIX*_ITEMS){
        ERROR
    }
    unsigned int maxmemcache=max(_HISTOSPLIT,_ITEMS * __RADIX_GROUPS__ * _RADIX / _HISTOSPLIT);
    if(localMem < sizeof(cl_uint)*maxmemcache){
    ERROR
    }

Regards,
Jose Luis Cercós Pita

Original issue reported on code.google.com by [email protected] on 30 May 2011 at 2:09

Not working on OSX Radeon HD 4850

SVN revision 52 after compiling:

crb002$ ./go

Test CLRadixSort class...

Available platforms:
Platform 1:
Apple
Apple
OpenCL 1.0 (Dec 23 2010 17:30:26)
We choose Device 1/2 of Platform 1/1:
Radeon HD 4850
OpenCL Extensions for that device: cl_APPLE_gl_sharing

Sort on GPU
GPU cache=16384
Needed cache=8192
Compute units=10
Create the context
Create the command queue
OpenCL initializations OK !

Cache size=16384 Bytes
Needed cache=8192 Bytes
Construct the random list
Send to the GPU
Resize to  1048576
Radix=32
Max Int=536870912
sorting 1048576 keys

Start storting 1048576 keys
Transpose
pass 0
Build histograms 
Scan histograms 
[CL_INVALID_WORK_GROUP_SIZE] : OpenCL Error : clEnqueueNDRangeKernel failed: 
total work group size (256) is greater than the device can support (64)
Break on OpenCLErrorBreak to debug.
Assertion failed: (err== CL_SUCCESS), function ScanHistogram, file 
CLRadixSort.cpp, line 789.
Abort trap

Original issue reported on code.google.com by [email protected] on 25 Jul 2011 at 3:57

Variable start never referenced

If you define TRANSPOSE, variable start is created and evaluated, but never 
used.

I suggest something like this:

#ifndef TRANSPOSE
  unsigned int start= ig *(n/groups/items);
#endif

Regards,
Jose Luis Cercós Pita

Original issue reported on code.google.com by [email protected] on 21 Jun 2011 at 9:08

License on source codes

CLRadixSort.cl hasn't license. It is a little bit dangeorus.

Regards,
Jose Luis Cercós Pita

Original issue reported on code.google.com by [email protected] on 16 Jun 2011 at 1:42

Max unsigned integer trouble

Hi! My name is Jose Luis Cercós Pita, and i will implement your radix sort 
implementation in my code.

I'm using 0-2 version.

The problem is associated to _MAXINT defined variable (CLRadixSortParam.hpp). 
If the unsigned integer type selected has 32 bits (#define _TOTALBITS 32) 
_MAXINT overflows the maximum capability of the unsigned int type (because 2^0 
has not taken into account).

In order to solve it, I suggest you 3 changes:

CLRadixSortParam.hpp (line 31):
[-] #define _MAXINT (1 << _TOTALBITS)
[+] #define _MAXINT (1 << (_TOTALBITS-1))

CLRadixSort.cpp (line 225):
[-] int pad[_GROUPS * _ITEMS];
[+] unsigned int pad[_GROUPS * _ITEMS];

CLRadixSort.cpp (line 227):
[-] pad[ii]=_MAXINT - 1;
[+] pad[ii]=_MAXINT - (unsigned int)1;

I tested it, and runs OK!
I hope can help!

Regards,
Jose Luis Cercós Pita

Original issue reported on code.google.com by [email protected] on 19 May 2011 at 8:23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.