Closed stuartarchibald closed 7 years ago
@DrTodd13 @ehsantn Please could this be reviewed for suitability to merge into https://github.com/numba/numba/pull/2457? I've manually tested on Python 2.7, 3.5 and 3.6. The only failure at present is test_basic73
where the parfors
output does not match the other implementations. Thanks.
@stuartarchibald The problem with test73 is the semantics of neighborhood. The documentation says it specifies the minimum and maximum index offsets used in a dimension. So, there's nothing wrong with (5,10) but that doesn't preclude being able to generate element 0 in the output array. So, the parfor test is correct and the others are wrong. Testing a fix at the moment.
@DrTodd13 thanks for the clarification. I think I understand the problem and where to fix it in pyStencil. Essentially the loop bound computation needs to be run when in neighborhood
mode and loop ranges subsequently adjusted, whereas at present the code simply pushes the kernel into the inner loop and adds induction variables. Will fix.
This adds pyStencil, a function that provides functionality similar to @stencil but in a much more reduced sense. It is used for testing the StencilFunc implementation and to aid reasoning about kernels and behaviours.
Some 80+ tests are written that compare: