Accelerate

Ben Lever Ben.Lever at nicta.com.au
Sun Aug 22 19:14:46 EDT 2010


Hi Manuel,

> I just pushed two patches, adding stencil2 and support for 9-tuples, respectively.  (BTW, we currently can only have up to 3-dimensional stencils.  There is no fundamental reason for that and copy-pasting of some class instances is all that is needed to extend this.  I might be able to change the implementation to work for arbitrary dimensions, without extra instances, but didn't want to hold up giving you something to work with just for that.)

Thanks! As it turned out, to get things going I ended up putting this support in for 9-tuples myself. Whilst we've overlapped, it turned out to be a useful exercise for me as what I discovered, and what I hadn't realised, was that stencil patterns are hard-wired into Accelerate. That is, the 3x3, 5x5, 9x9, etc types are defined in Accelerate, and need to be due to defining typeclass instances, etc , and they are the only patterns available to the user. Is that correct?

Previously I had imagined that stencil patterns could be defined outside Accelerate  - 3x3, 5x5, etc were predefined to give the user a head-start. As a result, because Accelerate is a meta-programming framework, I had imagined it would be possible to write functions that build and return stencil functions. For example, the ability to write a convolution function that takes the convolution kernel as its input and calls stencil, creating the required stencil function based on the size and values of the kernel. Because Accelerate doesn't allow arbitrary stencil patterns, a convolution function wouldn't be able to support arbitrarily-sized kernels (unless it somehow rounded-up to the biggest pattern, but even that might not exist).

Is my understanding correct? Maybe there is a way too implement a function such as convolution ...

This is not an immediate problem, but maybe it can be discussed again when we investigate larger stencil patterns in the future. For example, in one of our use cases (36x36 stencil), it would be ideal if the stencil function could be generated, where the generation is driven by data specifying which coordinates within the stencil bounding box are to be analysed.


Regards,
Ben.

The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.



More information about the Accelerate mailing list