Interpreter and CUDA backend intermittently fail on scan-segsum #44

Closed
mchakravarty opened this Issue May 5, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Owner

mchakravarty commented May 5, 2012

Is this a backend or frontend problem?

Owner

mchakravarty commented May 8, 2012

This may very well just be a problem with the segmented scan code in Prelude.hs. It is not that important; hence, ignore it for 0.12.

Member

tmcdonell commented May 8, 2012

will do.

tmcdonell added a commit to tmcdonell/accelerate that referenced this issue Aug 7, 2012

fix segmented scan family
The key missing feature here was support for zero-length segments. As soon as one of these was encountered, the rest of the data would be thrown out of whack. To counter this, the flag arrays that mark the start (or end) of each segment can now contain not just zero or one, but non-unity values that mark the start (end) of several empty segments. The remainder is fairly standard, although still required a rewrite.

fixes AccelerateHS/accelerate#44

tmcdonell added a commit to tmcdonell/accelerate-cuda that referenced this issue Aug 8, 2012

codegen: flip the names of the scalar variables used for scan
because the method of segmented scans uses a non-commutative function to propagate segment boundary flags.

required for issue AccelerateHS/accelerate#44

tmcdonell added a commit to tmcdonell/accelerate-cuda that referenced this issue Aug 8, 2012

add special kernel for the upsweep phase of multi-block scan
This kernel calculates the final reduction value for each interval in a multi-block scan. Previously, a standard fold1 was used for this purpose, but that requires a commutative operator which we don't have for the case of segmented scans.

Introduces some mess in the compilation phase, because this falls outside the standard set of AST nodes.

required for AccelerateHS/accelerate#44

@tmcdonell tmcdonell closed this Aug 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment