def __init__(self, lib, dtype, N, C, K, H, W, P, Q, pad_h, pad_w):

        # Support N = 1,2 and multiples of 4 for now
        assert N in (1,2) or N % 4 == 0

        super(UpdateWinograd, self).__init__(lib, dtype)

        SMs = _get_sm_count()

        self.autotune_key = [str(x) for x in ("update_3x3_2x2",
           SMs, 0, dtype.itemsize, N, C, K, H, W, P, Q)]
        self.autotune_db_file = os.path.join(lib.cache_dir, "autotune.db")

        self.params = (N, C, K, H, W, P, Q, pad_h, pad_w)
        self.init(self.params)

        self.output_size = (self.determ_size or (dtype.type != np.float32 and 9*C*K)) * 4

        lib.set_scratch_size(self.output_size, self.trans_size)

        # allow for .5 seconds worth of warmup when autotuning
        # assume 10 Tflops on 24 SMs
        self.warmup = min(max(int(5e12 / (P*Q*K*N*C*9*2.0) * (SMs / 24.0)), 1), 1000)
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/winograd_conv.py/UpdateWinograd.__init__/original