AccelerateHS / accelerate

Embedded language for high-performance array computations
https://www.acceleratehs.org
Other
903 stars 118 forks source link

Internal error with radix sort example #33

Closed acfoltzer closed 12 years ago

acfoltzer commented 12 years ago

A gist of the code I'm running, and the result is here.

I can duplicate this with GHCs 7.2.1 and 7.4.1. My device info is as follows:

Prelude Foreign.CUDA.Driver> initialise []
Prelude Foreign.CUDA.Driver> props =<< device 0
DeviceProperties {deviceName = "Quadro 5000", computeCapability = 2.0, totalGlobalMem = 2683502592, totalConstMem = 65536, sharedMemPerBlock = 49152, regsPerBlock = 32768, warpSize = 32, maxThreadsPerBlock = 1024, maxThreadsPerMultiProcessor = 1536, maxBlockSize = (1024,1024,64), maxGridSize = (65535,65535,65535), maxTextureDim1D = 65536, maxTextureDim2D = (65536,65535), maxTextureDim3D = (2048,2048,2048), clockRate = 1026000, multiProcessorCount = 11, memPitch = 2147483647, memBusWidth = 320, memClockRate = 1500000, textureAlignment = 512, computeMode = Default, deviceOverlap = True, concurrentKernels = True, eccEnabled = False, asyncEngineCount = 2, cacheMemL2 = 655360, tccDriverEnabled = False, pciInfo = PCI {busID = 2, deviceID = 0, domainID = 0}, kernelExecTimeoutEnabled = False, integrated = False, canMapHostMemory = True, unifiedAddressing = True}
tmcdonell commented 12 years ago

sadly, "lost device memory reference" was a common problem with the old reference counting system, which has been completely replaced now with finalisers. This is available on my branch, but give me chance to track down any other bugs it may hit in the new code generator...

mchakravarty commented 12 years ago

@tmcdonell Did you try the code in the Gist on your branch? Does it work?

tmcdonell commented 12 years ago

it does, but for large vectors hits a bug in (I think) scan, which causes the program to segfault.

mchakravarty commented 12 years ago

Weren't there some scan fixes recently? Is the problem reported here still happening in 0.12?

mchakravarty commented 12 years ago

The radix sort example in accelerate-examples fails for me with:

radixsort: Failed: Prelude.(!!): index too large

in the recent version of Accelerate.

tmcdonell commented 12 years ago

radix sort in the examples package now works correctly. thanks for reporting!