@@ -0,0 +1,1269 @@
+import unittest%0A%0Aimport mock%0A%0Aimport chainer%0Afrom chainer import testing%0Afrom chainer.testing import attr%0Afrom chainer.functions.pooling import pooling_nd_kernel%0A%0A%0A@testing.parameterize(*testing.product(%7B%0A    'ndim': %5B2, 3, 4%5D,%0A%7D))%0A@attr.gpu%0Aclass TestPoolingNDKernelMemo(unittest.TestCase):%0A%0A    def setUp(self):%0A        chainer.cuda.clear_memo()%0A%0A    def test_pooling_nd_kernel_forward_memo(self):%0A        ndim = self.ndim%0A        with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'%0A                        'PoolingNDKernelForward._generate') as m:%0A            pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)%0A            m.assert_called_once_with(ndim)%0A            pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)%0A            m.assert_called_once_with(ndim)%0A%0A    def test_pooling_nd_kernel_backward_memo(self):%0A        ndim = self.ndim%0A        with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'%0A                        'PoolingNDKernelBackward._generate') as m:%0A            pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)%0A            m.assert_called_once_with(ndim)%0A            pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)%0A            m.assert_called_once_with(ndim)%0A%0A%0Atesting.run_module(__name__, __file__)%0A

Add test for memoization in N-dimensional pooling kernel generator.