def init(self, params, autotune=False):

        N, C, K, H, W, P, Q, pad_h, pad_w = self.params
        R, S    = 3, 3
        loopN   = 4 if N >= 4 else N
        blkN    = 4 if N >= 3 else N
        superI  = UpdateWinograd.external_superblock.get(blkN) # I = image
        superE  = UpdateWinograd.internal_superblock.get(blkN) # E = error
        blkXI   = 1 << superI[1]
        blkY    = 1 << superE[0]
        blkX    = 1 << superE[1]
        GY      = _ceil_div(P, 2)
        GX      = _ceil_div(Q, 2)
        GYS     = self.GYS = _ceil_div(P, blkY)
        GXS     = self.GXS = _ceil_div(Q, blkX)

        if autotune:
            strideY, strideX, external = autotune
        else:
            autotune_db  = shelve.open(self.autotune_db_file)
            autotune_key = " ".join(self.autotune_key)

            if autotune_db in autotune_key:
                strideY, strideX, external = autotune_db[autotune_key]
                #print strideY, strideX, external, autotune_key
                self.initialized = True
            else:
                if GYS * GXS > 768:
                    strideY  = 768
                    strideX  = 1
                else:
                    strideY  = GYS
                    strideX  = GXS
                external = True
                self.initialized = False

            autotune_db.close()

        loopXI  = N * (strideX*blkXI - 1)
        loopXE  = N * (strideX*blkX  - 1)
        Np      = N     * self.dtype.itemsize
        XNp     = W*N   * self.dtype.itemsize
        XN2p    = W*N*2 * self.dtype.itemsize
        QNp     = Q*N   * self.dtype.itemsize

        gridK  = _ceil_div(K, 32)
        gridC  = _ceil_div(C, 32)
        # find even grid divisors closest to 4 (priorize larger values of equal distance)
        k_size = _closest_divisor(gridK, 4)
        c_size = _closest_divisor(gridC, 4)
        C_size = gridC // c_size

        kc          = k_size  * c_size
        Qkc         = strideX * kc
        PQkc        = strideY * Qkc
        CPQkc       = C_size  * PQkc
        gridPQKC    = strideY * strideX * gridK * gridC
        magic_CPQkc = _magic64(CPQkc)
        magic_PQkc  = _magic64(PQkc)
        magic_Qkc   = _magic64(Qkc)
        magic_kc    = _magic32(Qkc, kc)
        magic_c     = _magic32(kc, c_size)

        self.blocksCK = gridK * gridC

        if external:
            # External Image transform
            IX  = "_IX"
            WN  = GX*N
            HWN = GY*WN

            self.image_transform(N, C, K, H, W, P, Q, pad_h, pad_w)
        else:
            # Internal Image transform
            IX     = ""
            WN     = W*N
            HWN    = H*WN
            superI = superE

            self.trans_size = 0

        # If output grid is 1, don't use atomics.  Kernel is deterministic by default
        if strideY*strideX == 1:
            determ = "D"
            self.determ_size  = 0
            self.determ_shape = False
            self.zero         = False
        elif self.lib.deterministic:
            determ = "D"
            self.determ_size  = strideY*strideX * C*R*S*K
            self.determ_shape = (strideY*strideX, C*R*S*K)
            self.zero         = False
        else:
            determ = ""
            self.determ_size  = 0
            self.determ_shape = False
            self.zero         = True

        kernel_name = "%s_winograd%s_3x3_2x2_32x32%s" % (self.clss, determ, IX)

        # print "blks/sm:%.2f blks:%d gridKC:(%d,%d) gridYX:(%d,%d) stride:(%d,%d)" % (
        #    gridPQKC/24.0, gridPQKC, gridK, gridC, GYS, GXS, strideY, strideX)

        self.kernel = [ kernel_name, (gridPQKC,1,1), (256,1,1), None, None, None, None, None ]
        self.kernel.extend(_flatten([
            H, W, P, Q, C, K, N, pad_h, pad_w,
            GY, GX, GYS, GXS, superI, superE, loopXI, loopXE, loopN, strideY, strideX,
            WN, HWN, Q*N, P*Q*N, S*K, R*S*K, Np, XNp, XN2p, QNp,
            CPQkc, PQkc, Qkc, kc, c_size, k_size,
            magic_CPQkc, magic_PQkc, magic_Qkc, magic_kc, magic_c, C*R*S*K ]))
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/winograd_conv.py/UpdateWinograd.init/swapped operands of `in`