Repository: cupy/cupy

Issue:
ROCm 3.5.0 test: ndimage filter failures
Below is a list of failing tests after #4271 is applied. All tests produced outcomes (rather than, say, erroring out during compilation) which mismatch with the expected results.
```
$ pytest tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py

(... omitted ...)

======================================================================= short test summary info =======================================================================
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2756_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2762_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2763_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2765_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2771_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2772_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2774_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2780_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2781_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2783_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2789_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=0, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2792_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2798_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=1, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2801_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2807_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2810_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2811_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2813_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2814_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=0, output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2819_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2820_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2822_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2823_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=1, output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2828_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2829_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2831_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2832_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2837_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2840_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=0, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2846_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2849_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=1, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2855_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2858_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2864_{cval=-1.0, dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2867_{cval=-1.0, dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2870_{cval=-1.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2871_{cval=-1.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2873_{cval=-1.0, dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2876_{cval=0.0, dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2879_{cval=0.0, dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2882_{cval=0.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2883_{cval=0.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2885_{cval=0.0, dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2888_{cval=1.0, dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2891_{cval=1.0, dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2894_{cval=1.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2895_{cval=1.0, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2897_{cval=1.0, dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2912_{cval=inf, dtype=float32, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2913_{cval=inf, dtype=float32, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2915_{cval=inf, dtype=float32, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2918_{cval=inf, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2919_{cval=inf, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2921_{cval=inf, dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2924_{cval=-inf, dtype=float32, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2925_{cval=-inf, dtype=float32, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2927_{cval=-inf, dtype=float32, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2930_{cval=-inf, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2931_{cval=-inf, dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2933_{cval=-inf, dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2936_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2939_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2942_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2945_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2948_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2949_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='nearest', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2951_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2952_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='wrap', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2954_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2957_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2960_{dtype=uint8, filter='median_filter', footprint=False, ksize=3, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2962_{dtype=uint8, filter='median_filter', footprint=False, ksize=4, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2964_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2965_{dtype=float64, filter='median_filter', footprint=False, ksize=3, mode='mirror', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2966_{dtype=float64, filter='median_filter', footprint=False, ksize=4, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2968_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2969_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2970_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=None, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2974_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2975_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2976_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=float64, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2977_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2978_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2979_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=None, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2983_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2984_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2985_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=float64, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2986_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2987_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2988_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2992_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2993_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2994_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_2995_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3001_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=0, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3002_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=0, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3004_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3010_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=1, output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3011_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=1, output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3013_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3019_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3020_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=float64, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3022_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3023_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3025_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3026_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=0, output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3031_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3032_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3034_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3035_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=1, output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3040_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3041_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3043_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3044_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3049_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=0, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3052_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=0, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3058_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=1, output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3061_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=1, output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3067_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=None, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3070_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='reflect', origin=(-1, 1, -1, 1), output=uint8, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3076_{cval=-1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3077_{cval=-1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3079_{cval=-1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3082_{cval=-1.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3083_{cval=-1.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3085_{cval=-1.0, dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3088_{cval=0.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3089_{cval=0.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3091_{cval=0.0, dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3094_{cval=0.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3095_{cval=0.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3097_{cval=0.0, dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3100_{cval=1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3101_{cval=1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3103_{cval=1.0, dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3106_{cval=1.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3107_{cval=1.0, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3109_{cval=1.0, dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3124_{cval=inf, dtype=float32, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3125_{cval=inf, dtype=float32, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3127_{cval=inf, dtype=float32, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3130_{cval=inf, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3131_{cval=inf, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3133_{cval=inf, dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3136_{cval=-inf, dtype=float32, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3137_{cval=-inf, dtype=float32, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3139_{cval=-inf, dtype=float32, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3142_{cval=-inf, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3143_{cval=-inf, dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='constant', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3145_{cval=-inf, dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='constant', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3148_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3149_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='nearest', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3150_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='nearest', shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3151_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3152_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='wrap', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3153_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='wrap', shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3154_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3157_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3160_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3161_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='nearest', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3163_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3164_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='wrap', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3166_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='nearest', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3169_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='wrap', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3172_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3173_{dtype=uint8, filter='median_filter', footprint=True, ksize=3, mode='mirror', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3174_{dtype=uint8, filter='median_filter', footprint=True, ksize=4, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3176_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3177_{dtype=float64, filter='median_filter', footprint=True, ksize=3, mode='mirror', shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilter_param_3178_{dtype=float64, filter='median_filter', footprint=True, ksize=4, mode='mirror', shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_36_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_37_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_39_{dtype=uint8, filter='percentile_filter', ksize=4, percentile=25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_40_{dtype=uint8, filter='percentile_filter', ksize=4, percentile=25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_42_{dtype=float64, filter='percentile_filter', ksize=3, percentile=25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_43_{dtype=float64, filter='percentile_filter', ksize=3, percentile=25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_44_{dtype=float64, filter='percentile_filter', ksize=3, percentile=25, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_45_{dtype=float64, filter='percentile_filter', ksize=4, percentile=25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_46_{dtype=float64, filter='percentile_filter', ksize=4, percentile=25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_48_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=50, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_49_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=50, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_50_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=50, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_51_{dtype=uint8, filter='percentile_filter', ksize=4, percentile=50, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_54_{dtype=float64, filter='percentile_filter', ksize=3, percentile=50, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_55_{dtype=float64, filter='percentile_filter', ksize=3, percentile=50, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_57_{dtype=float64, filter='percentile_filter', ksize=4, percentile=50, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_60_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=-25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_61_{dtype=uint8, filter='percentile_filter', ksize=3, percentile=-25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_63_{dtype=uint8, filter='percentile_filter', ksize=4, percentile=-25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_64_{dtype=uint8, filter='percentile_filter', ksize=4, percentile=-25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_66_{dtype=float64, filter='percentile_filter', ksize=3, percentile=-25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_67_{dtype=float64, filter='percentile_filter', ksize=3, percentile=-25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_68_{dtype=float64, filter='percentile_filter', ksize=3, percentile=-25, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_69_{dtype=float64, filter='percentile_filter', ksize=4, percentile=-25, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_70_{dtype=float64, filter='percentile_filter', ksize=4, percentile=-25, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_96_{dtype=uint8, filter='rank_filter', ksize=3, rank=1, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_97_{dtype=uint8, filter='rank_filter', ksize=3, rank=1, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_98_{dtype=uint8, filter='rank_filter', ksize=3, rank=1, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_99_{dtype=uint8, filter='rank_filter', ksize=4, rank=1, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_100_{dtype=uint8, filter='rank_filter', ksize=4, rank=1, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_101_{dtype=uint8, filter='rank_filter', ksize=4, rank=1, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_102_{dtype=float64, filter='rank_filter', ksize=3, rank=1, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_103_{dtype=float64, filter='rank_filter', ksize=3, rank=1, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_104_{dtype=float64, filter='rank_filter', ksize=3, rank=1, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_105_{dtype=float64, filter='rank_filter', ksize=4, rank=1, shape=(4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_106_{dtype=float64, filter='rank_filter', ksize=4, rank=1, shape=(3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestFilterFast_param_107_{dtype=float64, filter='rank_filter', ksize=4, rank=1, shape=(1, 3, 4, 5)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestShellSort_param_12_{filter='rank_filter', fooprint=False, ksize=16, rank=1, shape=(20, 21)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestShellSort_param_13_{filter='rank_filter', fooprint=False, ksize=17, rank=1, shape=(20, 21)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestShellSort_param_14_{filter='rank_filter', fooprint=True, ksize=16, rank=1, shape=(20, 21)}::test_filter
FAILED tests/cupyx_tests/scipy_tests/ndimage_tests/test_filters.py::TestShellSort_param_15_{filter='rank_filter', fooprint=True, ksize=17, rank=1, shape=(20, 21)}::test_filter
===================================================== 211 failed, 5459 passed, 828 skipped in 1198.77s (0:19:58) ======================================================
```


Discussion:
All of these filters (median, rank, percentile) are ones that involve sorting elements, so at least it is probably a single common issue in the sorting that needs to be fixed for HIP/ROCm.
For reference, [this is the sorting code](https://github.com/cupy/cupy/blob/b4a296f68bb78f57048c2c3288d13c46482e9034/cupyx/scipy/ndimage/filters.py#L1030-L1104).

There are two different paths that can be taken depending on the number of elements to sort (in that code `filter_size` are the number of elements in the n-d filter footprint and `rank` is which element out of the `filter_size` elements is desired)
> All of these filters (median, rank, percentile) are ones that involve sorting elements, so at least it is probably a single common issue in the sorting that needs to be fixed for HIP/ROCm.

Thanks a lot, @grlee77! Fixing one issue to fix them all would be the best scenario indeed. 

Any chance this sorting would involve comparisons with NaN, Inf, etc? I took a quick look and didn't spot any immediate issues there, so was wondering if it's due to different architecture handling floating point exceptions differently.
I don't think any of those test cases use either NaNs or Inf values. In general, `scipy.ndimage` doesn't have any special NaN handling, but there have occasionally been issues requesting it (or masked array support).
I think the only tests involving NaN in the whole `cupyx.scipy.ndimage` test suite are a few cases where `cval=np.nan` was used as the background pixel choice.
> In general, `scipy.ndimage` doesn't have any special NaN handling

Ah, right, I forgot you brought this up just recently (#4090) 😅
All failing tests happen in `_get_rank_kernel` and do *not* use shell sort, i.e. errors are from this code path:
https://github.com/cupy/cupy/blob/01d8d0f37e573cf55732e78cddc94fd302d900a8/cupyx/scipy/ndimage/filters.py#L1060

Resolving patch:
diff --git a/cupyx/scipy/ndimage/filters.py b/cupyx/scipy/ndimage/filters.py
--- a/cupyx/scipy/ndimage/filters.py
+++ b/cupyx/scipy/ndimage/filters.py
@@ -1057,6 +1057,10 @@ def _get_shell_gap(filter_size):
 def _get_rank_kernel(filter_size, rank, mode, w_shape, offsets, cval,
                      int_type):
     s_rank = min(rank, filter_size - rank - 1)
+    # The threshold was set based on the measurements on a V100
+    # TODO(leofang, anaruse): Use Optuna to automatically tune the threshold,
+    # as it may vary depending on the GPU in use, compiler version, dtype,
+    # filter size, etc.
     if s_rank <= 80:
         # When s_rank is small and register usage is low, this partial
         # selection sort approach is faster than general sorting approach
@@ -1065,7 +1069,7 @@ def _get_rank_kernel(filter_size, rank, mode, w_shape, offsets, cval,
             comp_op = '<'
         else:
             comp_op = '>'
-        array_size = s_rank + 1
+        array_size = s_rank + 2
         found_post = '''
             if (iv > {rank} + 1) {{{{
                 int target_iv = 0;


Test patch: