# AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _align as align
from torch import device, empty_strided
from torch._inductor.async_compile import AsyncCompile
from torch._inductor.select_algorithm import extern_kernels
from torch._inductor.codegen.multi_kernel import MultiKernelCall
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid, split_scan_grid, grid_combo_kernels, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_raw_stream

aten = torch.ops.aten
inductor_ops = torch.ops.inductor
_quantized = torch.ops._quantized
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor
alloc_from_pool = torch.ops.inductor._alloc_from_pool
async_compile = AsyncCompile()


# kernel path: runs/run_shard_4/inductor_cache/s5/cs53ve6ff5smmuu5zxn6uwnvgsi32uuuvewmis3iy7oejdcvopvs.py
# Topologically Sorted Source Nodes: [y_5], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   y_5 => constant_pad_nd_1
# Graph fragment:
#   %constant_pad_nd_1 : [num_users=1] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%view_2, [0, 0, 1, 0, 1, 0, 0, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_0 = async_compile.triton('triton_poi_fused_constant_pad_nd_0', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = (xindex // 72) % 2
    x1 = (xindex // 8) % 9
    x0 = xindex % 8
    x3 = (xindex // 144)
    x7 = xindex
    tmp0 = (-1) + x2
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = (-1) + x1
    tmp4 = tmp3 >= tmp1
    tmp5 = tmp2 & tmp4
    tmp6 = (-1) + (((-1) + x1) % 2)
    tmp7 = tmp6 >= tmp1
    tmp8 = (-1) + (x0 % 2)
    tmp9 = tmp8 >= tmp1
    tmp10 = tmp7 & tmp9
    tmp11 = tmp10 & tmp5
    tmp12 = tl.load(in_ptr0 + ((4*((((-1) + x1) // 2) % 4)) + (16*x3) + (x0 // 2)), tmp11 & xmask, eviction_policy='evict_last', other=0.0)
    tmp13 = tl.full(tmp12.shape, 0.0, tmp12.dtype)
    tmp14 = tl.where(tmp5, tmp12, tmp13)
    tl.store(out_ptr0 + (x7), tmp14, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/qb/cqbibvks2cjhauc3nur2g3ih7ql3ix5qhuh7srxpiit2lwdgiiiw.py
# Topologically Sorted Source Nodes: [y_9], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   y_9 => convolution
# Graph fragment:
#   %convolution : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%view_3, %arg1_1, None, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_1 = async_compile.triton('triton_poi_fused_convolution_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[128, 8], tile_hint=TileHint.SQUARE,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_1(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 128
    xnumel = 8
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 8
    y1 = (yindex // 8)
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + (8*x2) + (144*y1)), xmask & ymask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + (8*y3)), tmp0, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/zh/czh33meqtkkfeqw325p6bix3tuaq4yza5hjchatomlwpg3z2e2yu.py
# Topologically Sorted Source Nodes: [y_11], Original ATen: [aten._unsafe_index]
# Source node to ATen node mapping:
#   y_11 => _unsafe_index
# Graph fragment:
#   %_unsafe_index : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%view_4, [None, None, %unsqueeze, %convert_element_type_3]), kwargs = {})
triton_poi_fused__unsafe_index_2 = async_compile.triton('triton_poi_fused__unsafe_index_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[1024], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__unsafe_index_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__unsafe_index_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 8) % 8
    x0 = xindex % 8
    x2 = (xindex // 64)
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.625
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tmp5 = x0
    tmp6 = tmp5.to(tl.float32)
    tmp7 = tmp6 * tmp2
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.load(in_ptr0 + (tmp8 + (5*tmp4) + (25*x2)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4), tmp9, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    arg0_1, arg1_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(arg1_1, (1, 1, 4, 4), (16, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((16, 2, 9, 8), (144, 72, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [y_5], Original ATen: [aten.constant_pad_nd]
        stream0 = get_raw_stream(0)
        triton_poi_fused_constant_pad_nd_0.run(arg0_1, buf0, 2304, grid=grid(2304), stream=stream0)
        del arg0_1
        buf1 = empty_strided_cuda((16, 1, 8, 8), (64, 1, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [y_9], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_1.run(buf0, buf1, 128, 8, grid=grid(128, 8), stream=stream0)
        del buf0
        # Topologically Sorted Source Nodes: [y_9], Original ATen: [aten.convolution]
        buf2 = extern_kernels.convolution(buf1, arg1_1, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (16, 1, 5, 5), (25, 1, 5, 1))
        del arg1_1
        buf3 = buf1; del buf1  # reuse
        # Topologically Sorted Source Nodes: [y_11], Original ATen: [aten._unsafe_index]
        triton_poi_fused__unsafe_index_2.run(buf2, buf3, 1024, grid=grid(1024), stream=stream0)
        del buf2
    return (reinterpret_tensor(buf3, (4, 4, 8, 8), (256, 64, 8, 1), 0), )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    arg0_1 = rand_strided((4, 4, 4, 4), (64, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    arg1_1 = rand_strided((1, 1, 4, 4), (16, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([arg0_1, arg1_1])
    return print_performance(fn, times=times, repeat=repeat)


if __name__ == "__main__":
    from torch._inductor.wrapper_benchmark import compiled_module_main
    compiled_module_main('None', benchmark_compiled_module)

from _paritybench_helpers import _mock_config
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F


def _setup_kernel(k):
    k = np.asarray(k, dtype=np.float32)
    if k.ndim == 1:
        k = np.outer(k, k)
    k /= np.sum(k)
    assert k.ndim == 2
    assert k.shape[0] == k.shape[1]
    return k


class Upsample2d(nn.Module):

    def __init__(self, opts, k=[1, 3, 3, 1], factor=2, down=1, gain=1):
        """
            Upsample2d method in G_synthesis_stylegan2.
        :param k: FIR filter of the shape `[firH, firW]` or `[firN]` (separable).
                  The default is `[1] * factor`, which corresponds to average pooling.
        :param factor: Integer downsampling factor (default: 2).
        :param gain:   Scaling factor for signal magnitude (default: 1.0).

            Returns: Tensor of the shape `[N, C, H // factor, W // factor]`
        """
        super().__init__()
        assert isinstance(factor, int
            ) and factor >= 1, 'factor must be larger than 1! (default: 2)'
        self.gain = gain
        self.factor = factor
        self.opts = opts
        self.k = _setup_kernel(k) * (self.gain * factor ** 2)
        self.k = torch.FloatTensor(self.k).unsqueeze(0).unsqueeze(0)
        self.k = nn.Parameter(self.k, requires_grad=False)
        self.p = self.k.shape[0] - self.factor
        self.padx0, self.pady0 = (self.p + 1) // 2 + factor - 1, (self.p + 1
            ) // 2 + factor - 1
        self.padx1, self.pady1 = self.p // 2, self.p // 2
        self.kernelH, self.kernelW = self.k.shape[2:]
        self.down = down

    def forward(self, x):
        y = x.clone()
        y = y.reshape([-1, x.shape[2], x.shape[3], 1])
        inC, inH, inW = x.shape[1:]
        y = torch.reshape(y, (-1, inH, 1, inW, 1, 1))
        y = F.pad(y, (0, 0, self.factor - 1, 0, 0, 0, self.factor - 1, 0, 0,
            0, 0, 0))
        y = torch.reshape(y, (-1, 1, inH * self.factor, inW * self.factor))
        y = F.pad(y, (0, 0, max(self.pady0, 0), max(self.pady1, 0), max(
            self.padx0, 0), max(self.padx1, 0), 0, 0))
        y = y[:, max(-self.pady0, 0):y.shape[1] - max(-self.pady1, 0), max(
            -self.padx0, 0):y.shape[2] - max(-self.padx1, 0), :]
        y = y.permute(0, 3, 1, 2)
        y = y.reshape(-1, 1, inH * self.factor + self.pady0 + self.pady1, 
            inW * self.factor + self.padx0 + self.padx1)
        y = F.conv2d(y, self.k)
        y = y.view(-1, 1, inH * self.factor + self.pady0 + self.pady1 -
            self.kernelH + 1, inW * self.factor + self.padx0 + self.padx1 -
            self.kernelW + 1)
        if inH * self.factor != y.shape[1]:
            y = F.interpolate(y, size=(inH * self.factor, inW * self.factor))
        y = y.permute(0, 2, 3, 1)
        y = y.reshape(-1, inC, inH * self.factor, inW * self.factor)
        return y


def get_inputs():
    return [torch.rand([4, 4, 4, 4])]


def get_init_inputs():
    return [[], {'opts': _mock_config()}]

import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_constant_pad_nd_0(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex // 72 % 2
    x1 = xindex // 8 % 9
    x0 = xindex % 8
    x3 = xindex // 144
    x7 = xindex
    tmp0 = -1 + x2
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = -1 + x1
    tmp4 = tmp3 >= tmp1
    tmp5 = tmp2 & tmp4
    tmp6 = -1 + (-1 + x1) % 2
    tmp7 = tmp6 >= tmp1
    tmp8 = -1 + x0 % 2
    tmp9 = tmp8 >= tmp1
    tmp10 = tmp7 & tmp9
    tmp11 = tmp10 & tmp5
    tmp12 = tl.load(in_ptr0 + (4 * ((-1 + x1) // 2 % 4) + 16 * x3 + x0 // 2
        ), tmp11 & xmask, eviction_policy='evict_last', other=0.0)
    tmp13 = tl.full(tmp12.shape, 0.0, tmp12.dtype)
    tmp14 = tl.where(tmp5, tmp12, tmp13)
    tl.store(out_ptr0 + x7, tmp14, xmask)


@triton.jit
def triton_poi_fused_convolution_1(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 128
    xnumel = 8
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 8
    y1 = yindex // 8
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 8 * x2 + 144 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 8 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused__unsafe_index_2(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x2 = xindex // 64
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.625
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tmp5 = x0
    tmp6 = tmp5.to(tl.float32)
    tmp7 = tmp6 * tmp2
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.load(in_ptr0 + (tmp8 + 5 * tmp4 + 25 * x2), xmask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + x4, tmp9, xmask)


def call(args):
    arg0_1, arg1_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(arg1_1, (1, 1, 4, 4), (16, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((16, 2, 9, 8), (144, 72, 8, 1), torch.float32
            )
        get_raw_stream(0)
        triton_poi_fused_constant_pad_nd_0[grid(2304)](arg0_1, buf0, 2304,
            XBLOCK=256, num_warps=4, num_stages=1)
        del arg0_1
        buf1 = empty_strided_cuda((16, 1, 8, 8), (64, 1, 8, 1), torch.float32)
        triton_poi_fused_convolution_1[grid(128, 8)](buf0, buf1, 128, 8,
            XBLOCK=8, YBLOCK=128, num_warps=4, num_stages=1)
        del buf0
        buf2 = extern_kernels.convolution(buf1, arg1_1, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (16, 1, 5, 5), (25, 1, 5, 1))
        del arg1_1
        buf3 = buf1
        del buf1
        triton_poi_fused__unsafe_index_2[grid(1024)](buf2, buf3, 1024,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf2
    return reinterpret_tensor(buf3, (4, 4, 8, 8), (256, 64, 8, 1), 0),


def _setup_kernel(k):
    k = np.asarray(k, dtype=np.float32)
    if k.ndim == 1:
        k = np.outer(k, k)
    k /= np.sum(k)
    assert k.ndim == 2
    assert k.shape[0] == k.shape[1]
    return k


class Upsample2dNew(nn.Module):

    def __init__(self, opts, k=[1, 3, 3, 1], factor=2, down=1, gain=1):
        """
            Upsample2d method in G_synthesis_stylegan2.
        :param k: FIR filter of the shape `[firH, firW]` or `[firN]` (separable).
                  The default is `[1] * factor`, which corresponds to average pooling.
        :param factor: Integer downsampling factor (default: 2).
        :param gain:   Scaling factor for signal magnitude (default: 1.0).

            Returns: Tensor of the shape `[N, C, H // factor, W // factor]`
        """
        super().__init__()
        assert isinstance(factor, int
            ) and factor >= 1, 'factor must be larger than 1! (default: 2)'
        self.gain = gain
        self.factor = factor
        self.opts = opts
        self.k = _setup_kernel(k) * (self.gain * factor ** 2)
        self.k = torch.FloatTensor(self.k).unsqueeze(0).unsqueeze(0)
        self.k = nn.Parameter(self.k, requires_grad=False)
        self.p = self.k.shape[0] - self.factor
        self.padx0, self.pady0 = (self.p + 1) // 2 + factor - 1, (self.p + 1
            ) // 2 + factor - 1
        self.padx1, self.pady1 = self.p // 2, self.p // 2
        self.kernelH, self.kernelW = self.k.shape[2:]
        self.down = down

    def forward(self, input_0):
        arg1_1 = self.k
        arg0_1 = input_0
        output = call([arg0_1, arg1_1])
        return output[0]
