# AOT ID: ['0_forward']
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_7/inductor_cache/6r/c6rfdy6izsz2tslytrisz5psvedpkynwe3tld46rk6lpx2t73run.py
# Topologically Sorted Source Nodes: [x], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   x => cat
# Graph fragment:
#   %cat : [num_users=3] = call_function[target=torch.ops.aten.cat.default](args = ([%primals_2, %repeat], 1), kwargs = {})
triton_poi_fused_cat_0 = async_compile.triton('triton_poi_fused_cat_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=[8388608], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 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, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 2, '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_cat_0(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 5242880
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 262144) % 5
    x0 = xindex % 262144
    x2 = (xindex // 1310720)
    x3 = xindex
    tmp0 = x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + (262144*x2)), tmp4, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 5, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tl.load(in_ptr1 + ((4*x2) + ((-1) + x1)), tmp6, eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + (x3), tmp10, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/c2/cc2qzerbvdwpg5vcu3ynjp6qyhhs5e4j4zaaatczbrb2bxxf2zcf.py
# Topologically Sorted Source Nodes: [x1, x1_1], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1 => convolution
#   x1_1 => var_mean
# Graph fragment:
#   %convolution : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%cat, %primals_3, %primals_4, [1, 1], [1, 4], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_1, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
triton_red_fused__native_batch_norm_legit_convolution_1 = async_compile.triton('triton_red_fused__native_batch_norm_legit_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.reduction(
    size_hints=[512, 65536],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_1', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, '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}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_1(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 512
    rnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = (xindex // 4) % 32
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + (65536*x4)), xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + (65536*x4)), tmp2, xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x4), tmp4, xmask)
    tl.store(out_ptr1 + (x4), tmp5, xmask)
    tl.store(out_ptr2 + (x4), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/gh/cghoeio6kchoqne6on4cvdeeoiq2ld3eyisxk6jgjodc25w4c4ga.py
# Topologically Sorted Source Nodes: [x1_1], Original ATen: [aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_1 => add, rsqrt, var_mean
# Graph fragment:
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_1, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem, 1e-05), kwargs = {})
#   %rsqrt : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add,), kwargs = {})
triton_per_fused__native_batch_norm_legit_2 = async_compile.triton('triton_per_fused__native_batch_norm_legit_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.persistent_reduction(
    size_hints=[128, 4],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_2', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 2, '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}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_2(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (4*x0)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (4*x0)), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (4*x0)), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tmp16 = 262144.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp20, xmask)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/or/corc3v6qud34vhyvu37a752zf4k37gh24fpqg6mli3urj2babdzy.py
# Topologically Sorted Source Nodes: [sigmoid, x3], Original ATen: [aten.sigmoid, aten.mul]
# Source node to ATen node mapping:
#   sigmoid => sigmoid
#   x3 => mul_2
# Graph fragment:
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_4,), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_2, %sigmoid), kwargs = {})
triton_poi_fused_mul_sigmoid_3 = async_compile.triton('triton_poi_fused_mul_sigmoid_3', '''
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=[33554432], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '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, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_sigmoid_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_sigmoid_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 33554432
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = (xindex // 262144)
    x2 = (xindex // 8388608)
    x5 = xindex % 8388608
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x4), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x3), None)
    tmp6 = tl.load(in_ptr4 + (x4), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + (x4), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + (9437184*x2)), tmp11, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/li/cliajbe2wgfzrkkyc5su6yreamw3oc7t2rbfatkuat25nzevwraf.py
# Topologically Sorted Source Nodes: [c1], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   c1 => repeat
# Graph fragment:
#   %repeat : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_1, [1, 1, 512, 512]), kwargs = {})
triton_poi_fused_repeat_4 = async_compile.triton('triton_poi_fused_repeat_4', '''
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=[4194304], 
    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_repeat_4', '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_repeat_4(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4194304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = (xindex // 262144)
    x2 = (xindex // 1048576)
    x4 = xindex % 1048576
    tmp0 = tl.load(in_ptr0 + (x3), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + (9437184*x2)), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/bd/cbdrqpyla2n4bzud7hemrx77dmlwd4oektul7763pveywzbsdl6m.py
# Topologically Sorted Source Nodes: [x1_2, x1_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_2 => convolution_2
#   x1_3 => var_mean_2
# Graph fragment:
#   %convolution_2 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_1, %primals_7, %primals_8, [1, 2], [1, 3], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_2 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_5, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
triton_red_fused__native_batch_norm_legit_convolution_5 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_5', '''
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.reduction(
    size_hints=[512, 32768],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, '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}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_5(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 512
    rnumel = 32768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = (xindex // 4) % 32
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + (32768*x4)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + (32768*x4)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x4), tmp4, xmask)
    tl.store(out_ptr1 + (x4), tmp5, xmask)
    tl.store(out_ptr2 + (x4), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/7u/c7ucjdvbxqt3foqlmg3jiifvw2j3475tlnr5aw5gzmkyh7dqiaew.py
# Topologically Sorted Source Nodes: [x1_3], Original ATen: [aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_3 => add_2, rsqrt_2, var_mean_2
# Graph fragment:
#   %var_mean_2 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_5, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_2 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_4, 1e-05), kwargs = {})
#   %rsqrt_2 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_2,), kwargs = {})
triton_per_fused__native_batch_norm_legit_6 = async_compile.triton('triton_per_fused__native_batch_norm_legit_6', '''
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.persistent_reduction(
    size_hints=[128, 4],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_6', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 2, '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}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_6(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (4*x0)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (4*x0)), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (4*x0)), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tmp16 = 131072.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp20, xmask)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/5d/c5d7vquv336v4qwnxfcyiqbqn3hsrk2lrcljhqzlvspubn5rf6m3.py
# Topologically Sorted Source Nodes: [sigmoid_1, x3_1], Original ATen: [aten.sigmoid, aten.mul]
# Source node to ATen node mapping:
#   sigmoid_1 => sigmoid_1
#   x3_1 => mul_5
# Graph fragment:
#   %sigmoid_1 : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_8,), kwargs = {})
#   %mul_5 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_6, %sigmoid_1), kwargs = {})
triton_poi_fused_mul_sigmoid_7 = async_compile.triton('triton_poi_fused_mul_sigmoid_7', '''
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=[16777216], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '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, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_sigmoid_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_sigmoid_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16777216
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = (xindex // 131072)
    x2 = (xindex // 4194304)
    x5 = xindex % 4194304
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x4), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x3), None)
    tmp6 = tl.load(in_ptr4 + (x4), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + (x4), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + (4718592*x2)), tmp11, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/q7/cq7mcyhh2n7bh775hqtuciqjltvvsbnlpgdro4nfse6qtyf4p6ir.py
# Topologically Sorted Source Nodes: [c3], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   c3 => repeat_2
# Graph fragment:
#   %repeat_2 : [num_users=1] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_1, [1, 1, 512, 256]), kwargs = {})
triton_poi_fused_repeat_8 = async_compile.triton('triton_poi_fused_repeat_8', '''
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=[2097152], 
    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_repeat_8', '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_repeat_8(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2097152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = (xindex // 131072)
    x2 = (xindex // 524288)
    x4 = xindex % 524288
    tmp0 = tl.load(in_ptr0 + (x3), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + (4718592*x2)), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/u6/cu62omvispflctwgz7juyiaqsam33kpgchfb5yhmcbardijywdhl.py
# Topologically Sorted Source Nodes: [x1_4, x1_5], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_4 => convolution_4
#   x1_5 => var_mean_4
# Graph fragment:
#   %convolution_4 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_2, %primals_11, %primals_12, [1, 2], [1, 3], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_4 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_9, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
triton_red_fused__native_batch_norm_legit_convolution_9 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_9', '''
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.reduction(
    size_hints=[512, 16384],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_9', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, '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}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_9(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 512
    rnumel = 16384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = (xindex // 4) % 32
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + (16384*x4)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + (16384*x4)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x4), tmp4, xmask)
    tl.store(out_ptr1 + (x4), tmp5, xmask)
    tl.store(out_ptr2 + (x4), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/4y/c4yveesrcsen7rytroeiigyeb65iuhrczqdujy2fkbp2j7ank72f.py
# Topologically Sorted Source Nodes: [x1_5], Original ATen: [aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_5 => add_4, rsqrt_4, var_mean_4
# Graph fragment:
#   %var_mean_4 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_9, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_4 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_8, 1e-05), kwargs = {})
#   %rsqrt_4 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_4,), kwargs = {})
triton_per_fused__native_batch_norm_legit_10 = async_compile.triton('triton_per_fused__native_batch_norm_legit_10', '''
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.persistent_reduction(
    size_hints=[128, 4],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_10', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 2, '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}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_10(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (4*x0)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (4*x0)), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (4*x0)), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tmp16 = 65536.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp20, xmask)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/oe/coesi2nnwedy7pd76uzb7p5y6fa7acgouzlzqhu63psxungsg3pa.py
# Topologically Sorted Source Nodes: [sigmoid_2, x3_2], Original ATen: [aten.sigmoid, aten.mul]
# Source node to ATen node mapping:
#   sigmoid_2 => sigmoid_2
#   x3_2 => mul_8
# Graph fragment:
#   %sigmoid_2 : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_12,), kwargs = {})
#   %mul_8 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_10, %sigmoid_2), kwargs = {})
triton_poi_fused_mul_sigmoid_11 = async_compile.triton('triton_poi_fused_mul_sigmoid_11', '''
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=[8388608], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '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, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_sigmoid_11', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_sigmoid_11(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8388608
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = (xindex // 65536)
    x2 = (xindex // 2097152)
    x5 = xindex % 2097152
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x4), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x3), None)
    tmp6 = tl.load(in_ptr4 + (x4), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + (x4), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + (2359296*x2)), tmp11, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zl/czlosahu37qu4rg4aieldb5b6pjoqwp4anwdjr7zmgfx3cusdhdr.py
# Topologically Sorted Source Nodes: [c4], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   c4 => repeat_3
# Graph fragment:
#   %repeat_3 : [num_users=1] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_1, [1, 1, 512, 128]), kwargs = {})
triton_poi_fused_repeat_12 = async_compile.triton('triton_poi_fused_repeat_12', '''
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=[1048576], 
    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_repeat_12', '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_repeat_12(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1048576
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = (xindex // 65536)
    x2 = (xindex // 262144)
    x4 = xindex % 262144
    tmp0 = tl.load(in_ptr0 + (x3), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + (2359296*x2)), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/3w/c3w6amj3nv5z2yjk5oqqjkfmnqquhqzsxsejbbbcag6vpz4pk23h.py
# Topologically Sorted Source Nodes: [x1_6, x1_7], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_6 => convolution_6
#   x1_7 => var_mean_6
# Graph fragment:
#   %convolution_6 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_3, %primals_15, %primals_16, [1, 2], [1, 2], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_6 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_13, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
triton_red_fused__native_batch_norm_legit_convolution_13 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_13', '''
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.reduction(
    size_hints=[512, 8192],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_13', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, '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}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_13(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 512
    rnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = (xindex // 4) % 32
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + (8192*x4)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + (8192*x4)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x4), tmp4, xmask)
    tl.store(out_ptr1 + (x4), tmp5, xmask)
    tl.store(out_ptr2 + (x4), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/vn/cvncgdh42zyiskwleectjd3tcfb7pm374ntnovecckct7t56e4om.py
# Topologically Sorted Source Nodes: [x1_7], Original ATen: [aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x1_7 => add_6, rsqrt_6, var_mean_6
# Graph fragment:
#   %var_mean_6 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_13, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_6 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_12, 1e-05), kwargs = {})
#   %rsqrt_6 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_6,), kwargs = {})
triton_per_fused__native_batch_norm_legit_14 = async_compile.triton('triton_per_fused__native_batch_norm_legit_14', '''
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.persistent_reduction(
    size_hints=[128, 4],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: '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, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_14', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 2, '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}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_14(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (4*x0)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (4*x0)), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (4*x0)), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tmp16 = 32768.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp20, xmask)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/7o/c7o3muryvh5a4lbvjxuklgungsaa5wphceisl5xpetp6wzonx5w5.py
# Topologically Sorted Source Nodes: [sigmoid_3, x3_3], Original ATen: [aten.sigmoid, aten.mul]
# Source node to ATen node mapping:
#   sigmoid_3 => sigmoid_3
#   x3_3 => mul_11
# Graph fragment:
#   %sigmoid_3 : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_16,), kwargs = {})
#   %mul_11 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_14, %sigmoid_3), kwargs = {})
triton_poi_fused_mul_sigmoid_15 = async_compile.triton('triton_poi_fused_mul_sigmoid_15', '''
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=[4194304], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '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, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_sigmoid_15', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, '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_mul_sigmoid_15(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4194304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = (xindex // 32768)
    x2 = (xindex // 1048576)
    x5 = xindex % 1048576
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x4), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x3), None)
    tmp6 = tl.load(in_ptr4 + (x4), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + (x4), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + (1179648*x2)), tmp11, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ed/ced27t6snnkonjx4ormcgny6cwvu4hxgj7qylcgcimqkga5zb52m.py
# Topologically Sorted Source Nodes: [c5], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   c5 => repeat_4
# Graph fragment:
#   %repeat_4 : [num_users=1] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_1, [1, 1, 512, 64]), kwargs = {})
triton_poi_fused_repeat_16 = async_compile.triton('triton_poi_fused_repeat_16', '''
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=[524288], 
    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_repeat_16', '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_repeat_16(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 524288
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = (xindex // 32768)
    x2 = (xindex // 131072)
    x4 = xindex % 131072
    tmp0 = tl.load(in_ptr0 + (x3), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + (1179648*x2)), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/2w/c2wyn6z2rmi3doz4x4yfaxt6hqndujbwyqgdlpbn6cougp26nxs3.py
# Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   x_5 => convolution_8
# Graph fragment:
#   %convolution_8 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_4, %primals_19, %primals_20, [36, 1], [0, 2], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_17 = async_compile.triton('triton_poi_fused_convolution_17', '''
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_convolution_17', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, '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_17(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 3584
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), xmask)
    tmp1 = tl.load(in_ptr0 + (0))
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tl.store(in_out_ptr0 + (x0), tmp3, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/4l/c4lxzcnmnnsskpzt2qbwdehcml6tphoedsmczw7j5rsqqamxkpqf.py
# Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.tanh]
# Source node to ATen node mapping:
#   x_8 => tanh
# Graph fragment:
#   %tanh : [num_users=1] = call_function[target=torch.ops.aten.tanh.default](args = (%squeeze_16,), kwargs = {})
triton_poi_fused_tanh_18 = async_compile.triton('triton_poi_fused_tanh_18', '''
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=[64], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '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,), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_tanh_18', 'mutated_arg_names': ['in_out_ptr0'], '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_tanh_18(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 56
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), xmask)
    tmp1 = libdevice.tanh(tmp0)
    tl.store(in_out_ptr0 + (x0), tmp1, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 1, 1), (4, 1, 1, 1))
    assert_size_stride(primals_2, (4, 1, 512, 512), (262144, 262144, 512, 1))
    assert_size_stride(primals_3, (32, 5, 3, 9), (135, 27, 9, 1))
    assert_size_stride(primals_4, (32, ), (1, ))
    assert_size_stride(primals_5, (32, 5, 3, 9), (135, 27, 9, 1))
    assert_size_stride(primals_6, (32, ), (1, ))
    assert_size_stride(primals_7, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_8, (32, ), (1, ))
    assert_size_stride(primals_9, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_10, (32, ), (1, ))
    assert_size_stride(primals_11, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_12, (32, ), (1, ))
    assert_size_stride(primals_13, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_14, (32, ), (1, ))
    assert_size_stride(primals_15, (32, 36, 3, 6), (648, 18, 6, 1))
    assert_size_stride(primals_16, (32, ), (1, ))
    assert_size_stride(primals_17, (32, 36, 3, 6), (648, 18, 6, 1))
    assert_size_stride(primals_18, (32, ), (1, ))
    assert_size_stride(primals_19, (1, 36, 36, 5), (6480, 180, 5, 1))
    assert_size_stride(primals_20, (1, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 5, 512, 512), (1310720, 262144, 512, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x], Original ATen: [aten.cat]
        stream0 = get_raw_stream(0)
        triton_poi_fused_cat_0.run(primals_2, primals_1, buf0, 5242880, grid=grid(5242880), stream=stream0)
        del primals_2
        # Topologically Sorted Source Nodes: [x1], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_3, stride=(1, 1), padding=(1, 4), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 32, 512, 512), (8388608, 262144, 512, 1))
        buf2 = buf1; del buf1  # reuse
        buf3 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1), torch.float32)
        buf4 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1), torch.float32)
        buf5 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x1, x1_1], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_1.run(buf2, primals_4, buf3, buf4, buf5, 512, 65536, grid=grid(512), stream=stream0)
        del primals_4
        buf6 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf7 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf9 = reinterpret_tensor(buf7, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf7  # reuse
        # Topologically Sorted Source Nodes: [x1_1], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_2.run(buf9, buf3, buf4, buf5, buf6, 128, 4, grid=grid(128), stream=stream0)
        # Topologically Sorted Source Nodes: [x2], Original ATen: [aten.convolution]
        buf10 = extern_kernels.convolution(buf0, primals_5, stride=(1, 1), padding=(1, 4), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 32, 512, 512), (8388608, 262144, 512, 1))
        buf11 = buf10; del buf10  # reuse
        buf12 = buf5; del buf5  # reuse
        buf13 = buf4; del buf4  # reuse
        buf14 = buf3; del buf3  # reuse
        # Topologically Sorted Source Nodes: [x2, x2_1], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_1.run(buf11, primals_6, buf12, buf13, buf14, 512, 65536, grid=grid(512), stream=stream0)
        del primals_6
        buf15 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf16 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf18 = reinterpret_tensor(buf16, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf16  # reuse
        # Topologically Sorted Source Nodes: [x2_1], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_2.run(buf18, buf12, buf13, buf14, buf15, 128, 4, grid=grid(128), stream=stream0)
        buf21 = empty_strided_cuda((4, 36, 512, 512), (9437184, 262144, 512, 1), torch.float32)
        buf19 = reinterpret_tensor(buf21, (4, 32, 512, 512), (9437184, 262144, 512, 1), 0)  # alias
        # Topologically Sorted Source Nodes: [sigmoid, x3], Original ATen: [aten.sigmoid, aten.mul]
        triton_poi_fused_mul_sigmoid_3.run(buf2, buf6, buf9, buf11, buf15, buf18, buf19, 33554432, grid=grid(33554432), stream=stream0)
        buf20 = reinterpret_tensor(buf21, (4, 4, 512, 512), (9437184, 262144, 512, 1), 8388608)  # alias
        # Topologically Sorted Source Nodes: [c1], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_4.run(primals_1, buf20, 4194304, grid=grid(4194304), stream=stream0)
        # Topologically Sorted Source Nodes: [x1_2], Original ATen: [aten.convolution]
        buf22 = extern_kernels.convolution(buf21, primals_7, stride=(1, 2), padding=(1, 3), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 32, 512, 256), (4194304, 131072, 256, 1))
        buf23 = buf22; del buf22  # reuse
        buf24 = buf14; del buf14  # reuse
        buf25 = buf13; del buf13  # reuse
        buf26 = buf12; del buf12  # reuse
        # Topologically Sorted Source Nodes: [x1_2, x1_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_5.run(buf23, primals_8, buf24, buf25, buf26, 512, 32768, grid=grid(512), stream=stream0)
        del primals_8
        buf27 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf28 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf30 = reinterpret_tensor(buf28, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf28  # reuse
        # Topologically Sorted Source Nodes: [x1_3], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_6.run(buf30, buf24, buf25, buf26, buf27, 128, 4, grid=grid(128), stream=stream0)
        # Topologically Sorted Source Nodes: [x2_2], Original ATen: [aten.convolution]
        buf31 = extern_kernels.convolution(buf21, primals_9, stride=(1, 2), padding=(1, 3), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 32, 512, 256), (4194304, 131072, 256, 1))
        buf32 = buf31; del buf31  # reuse
        buf33 = buf26; del buf26  # reuse
        buf34 = buf25; del buf25  # reuse
        buf35 = buf24; del buf24  # reuse
        # Topologically Sorted Source Nodes: [x2_2, x2_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_5.run(buf32, primals_10, buf33, buf34, buf35, 512, 32768, grid=grid(512), stream=stream0)
        del primals_10
        buf36 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf37 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf39 = reinterpret_tensor(buf37, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf37  # reuse
        # Topologically Sorted Source Nodes: [x2_3], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_6.run(buf39, buf33, buf34, buf35, buf36, 128, 4, grid=grid(128), stream=stream0)
        buf42 = empty_strided_cuda((4, 36, 512, 256), (4718592, 131072, 256, 1), torch.float32)
        buf40 = reinterpret_tensor(buf42, (4, 32, 512, 256), (4718592, 131072, 256, 1), 0)  # alias
        # Topologically Sorted Source Nodes: [sigmoid_1, x3_1], Original ATen: [aten.sigmoid, aten.mul]
        triton_poi_fused_mul_sigmoid_7.run(buf23, buf27, buf30, buf32, buf36, buf39, buf40, 16777216, grid=grid(16777216), stream=stream0)
        buf41 = reinterpret_tensor(buf42, (4, 4, 512, 256), (4718592, 131072, 256, 1), 4194304)  # alias
        # Topologically Sorted Source Nodes: [c3], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_1, buf41, 2097152, grid=grid(2097152), stream=stream0)
        # Topologically Sorted Source Nodes: [x1_4], Original ATen: [aten.convolution]
        buf43 = extern_kernels.convolution(buf42, primals_11, stride=(1, 2), padding=(1, 3), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf43, (4, 32, 512, 128), (2097152, 65536, 128, 1))
        buf44 = buf43; del buf43  # reuse
        buf45 = buf35; del buf35  # reuse
        buf46 = buf34; del buf34  # reuse
        buf47 = buf33; del buf33  # reuse
        # Topologically Sorted Source Nodes: [x1_4, x1_5], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_9.run(buf44, primals_12, buf45, buf46, buf47, 512, 16384, grid=grid(512), stream=stream0)
        del primals_12
        buf48 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf49 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf51 = reinterpret_tensor(buf49, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf49  # reuse
        # Topologically Sorted Source Nodes: [x1_5], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_10.run(buf51, buf45, buf46, buf47, buf48, 128, 4, grid=grid(128), stream=stream0)
        # Topologically Sorted Source Nodes: [x2_4], Original ATen: [aten.convolution]
        buf52 = extern_kernels.convolution(buf42, primals_13, stride=(1, 2), padding=(1, 3), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf52, (4, 32, 512, 128), (2097152, 65536, 128, 1))
        buf53 = buf52; del buf52  # reuse
        buf54 = buf47; del buf47  # reuse
        buf55 = buf46; del buf46  # reuse
        buf56 = buf45; del buf45  # reuse
        # Topologically Sorted Source Nodes: [x2_4, x2_5], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_9.run(buf53, primals_14, buf54, buf55, buf56, 512, 16384, grid=grid(512), stream=stream0)
        del primals_14
        buf57 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf58 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf60 = reinterpret_tensor(buf58, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf58  # reuse
        # Topologically Sorted Source Nodes: [x2_5], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_10.run(buf60, buf54, buf55, buf56, buf57, 128, 4, grid=grid(128), stream=stream0)
        buf63 = empty_strided_cuda((4, 36, 512, 128), (2359296, 65536, 128, 1), torch.float32)
        buf61 = reinterpret_tensor(buf63, (4, 32, 512, 128), (2359296, 65536, 128, 1), 0)  # alias
        # Topologically Sorted Source Nodes: [sigmoid_2, x3_2], Original ATen: [aten.sigmoid, aten.mul]
        triton_poi_fused_mul_sigmoid_11.run(buf44, buf48, buf51, buf53, buf57, buf60, buf61, 8388608, grid=grid(8388608), stream=stream0)
        buf62 = reinterpret_tensor(buf63, (4, 4, 512, 128), (2359296, 65536, 128, 1), 2097152)  # alias
        # Topologically Sorted Source Nodes: [c4], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_12.run(primals_1, buf62, 1048576, grid=grid(1048576), stream=stream0)
        # Topologically Sorted Source Nodes: [x1_6], Original ATen: [aten.convolution]
        buf64 = extern_kernels.convolution(buf63, primals_15, stride=(1, 2), padding=(1, 2), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 32, 512, 64), (1048576, 32768, 64, 1))
        buf65 = buf64; del buf64  # reuse
        buf66 = buf56; del buf56  # reuse
        buf67 = buf55; del buf55  # reuse
        buf68 = buf54; del buf54  # reuse
        # Topologically Sorted Source Nodes: [x1_6, x1_7], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_13.run(buf65, primals_16, buf66, buf67, buf68, 512, 8192, grid=grid(512), stream=stream0)
        del primals_16
        buf69 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf70 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf72 = reinterpret_tensor(buf70, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf70  # reuse
        # Topologically Sorted Source Nodes: [x1_7], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_14.run(buf72, buf66, buf67, buf68, buf69, 128, 4, grid=grid(128), stream=stream0)
        # Topologically Sorted Source Nodes: [x2_6], Original ATen: [aten.convolution]
        buf73 = extern_kernels.convolution(buf63, primals_17, stride=(1, 2), padding=(1, 2), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf73, (4, 32, 512, 64), (1048576, 32768, 64, 1))
        buf74 = buf73; del buf73  # reuse
        buf75 = buf68; del buf68  # reuse
        buf76 = buf67; del buf67  # reuse
        buf77 = buf66; del buf66  # reuse
        # Topologically Sorted Source Nodes: [x2_6, x2_7], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_13.run(buf74, primals_18, buf75, buf76, buf77, 512, 8192, grid=grid(512), stream=stream0)
        del primals_18
        buf78 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf79 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf81 = reinterpret_tensor(buf79, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf79  # reuse
        # Topologically Sorted Source Nodes: [x2_7], Original ATen: [aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_14.run(buf81, buf75, buf76, buf77, buf78, 128, 4, grid=grid(128), stream=stream0)
        del buf75
        del buf76
        del buf77
        buf84 = empty_strided_cuda((4, 36, 512, 64), (1179648, 32768, 64, 1), torch.float32)
        buf82 = reinterpret_tensor(buf84, (4, 32, 512, 64), (1179648, 32768, 64, 1), 0)  # alias
        # Topologically Sorted Source Nodes: [sigmoid_3, x3_3], Original ATen: [aten.sigmoid, aten.mul]
        triton_poi_fused_mul_sigmoid_15.run(buf65, buf69, buf72, buf74, buf78, buf81, buf82, 4194304, grid=grid(4194304), stream=stream0)
        buf83 = reinterpret_tensor(buf84, (4, 4, 512, 64), (1179648, 32768, 64, 1), 1048576)  # alias
        # Topologically Sorted Source Nodes: [c5], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_16.run(primals_1, buf83, 524288, grid=grid(524288), stream=stream0)
        del primals_1
        # Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.convolution]
        buf85 = extern_kernels.convolution(buf84, primals_19, stride=(36, 1), padding=(0, 2), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf85, (4, 1, 14, 64), (896, 896, 64, 1))
        buf86 = buf85; del buf85  # reuse
        # Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_17.run(buf86, primals_20, 3584, grid=grid(3584), stream=stream0)
        del primals_20
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.avg_pool2d]
        buf87 = torch.ops.aten.avg_pool2d.default(buf86, [1, 64], [1, 64], [0, 0], False, True, None)
        buf88 = buf87
        del buf87
        buf89 = reinterpret_tensor(buf88, (4, 14), (14, 1), 0); del buf88  # reuse
        # Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.tanh]
        triton_poi_fused_tanh_18.run(buf89, 56, grid=grid(56), stream=stream0)
    return (buf89, primals_3, primals_5, primals_7, primals_9, primals_11, primals_13, primals_15, primals_17, primals_19, buf0, buf2, buf6, buf9, buf11, buf15, buf18, buf21, buf23, buf27, buf30, buf32, buf36, buf39, buf42, buf44, buf48, buf51, buf53, buf57, buf60, buf63, buf65, buf69, buf72, buf74, buf78, buf81, buf84, buf86, buf89, )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    primals_1 = rand_strided((4, 4, 1, 1), (4, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 1, 512, 512), (262144, 262144, 512, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((32, 5, 3, 9), (135, 27, 9, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((32, 5, 3, 9), (135, 27, 9, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((32, 36, 3, 8), (864, 24, 8, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((32, 36, 3, 8), (864, 24, 8, 1), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((32, 36, 3, 8), (864, 24, 8, 1), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((32, 36, 3, 8), (864, 24, 8, 1), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((32, 36, 3, 6), (648, 18, 6, 1), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((32, 36, 3, 6), (648, 18, 6, 1), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((1, 36, 36, 5), (6480, 180, 5, 1), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((1, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20])
    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)

import torch
import torch.nn as nn


class Down2d(nn.Module):
    """docstring for Down2d."""

    def __init__(self, in_channel, out_channel, kernel, stride, padding):
        super(Down2d, self).__init__()
        self.c1 = nn.Conv2d(in_channel, out_channel, kernel_size=kernel,
            stride=stride, padding=padding)
        self.n1 = nn.InstanceNorm2d(out_channel)
        self.c2 = nn.Conv2d(in_channel, out_channel, kernel_size=kernel,
            stride=stride, padding=padding)
        self.n2 = nn.InstanceNorm2d(out_channel)

    def forward(self, x):
        x1 = self.c1(x)
        x1 = self.n1(x1)
        x2 = self.c2(x)
        x2 = self.n2(x2)
        x3 = x1 * torch.sigmoid(x2)
        return x3


class Discriminator(nn.Module):
    """docstring for Discriminator."""

    def __init__(self):
        super(Discriminator, self).__init__()
        self.d1 = Down2d(5, 32, (3, 9), (1, 1), (1, 4))
        self.d2 = Down2d(36, 32, (3, 8), (1, 2), (1, 3))
        self.d3 = Down2d(36, 32, (3, 8), (1, 2), (1, 3))
        self.d4 = Down2d(36, 32, (3, 6), (1, 2), (1, 2))
        self.conv = nn.Conv2d(36, 1, (36, 5), (36, 1), (0, 2))
        self.pool = nn.AvgPool2d((1, 64))

    def forward(self, x, c):
        c = c.view(c.size(0), c.size(1), 1, 1)
        c1 = c.repeat(1, 1, x.size(2), x.size(3))
        x = torch.cat([x, c1], dim=1)
        x = self.d1(x)
        c2 = c.repeat(1, 1, x.size(2), x.size(3))
        x = torch.cat([x, c2], dim=1)
        x = self.d2(x)
        c3 = c.repeat(1, 1, x.size(2), x.size(3))
        x = torch.cat([x, c3], dim=1)
        x = self.d3(x)
        c4 = c.repeat(1, 1, x.size(2), x.size(3))
        x = torch.cat([x, c4], dim=1)
        x = self.d4(x)
        c5 = c.repeat(1, 1, x.size(2), x.size(3))
        x = torch.cat([x, c5], dim=1)
        x = self.conv(x)
        x = self.pool(x)
        x = torch.squeeze(x)
        x = torch.tanh(x)
        return x


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


def get_init_inputs():
    return [[], {}]

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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
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_cat_0(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 262144 % 5
    x0 = xindex % 262144
    x2 = xindex // 1310720
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 262144 * x2), tmp4, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 5, tl.int64)
    tmp9 = tl.load(in_ptr1 + (4 * x2 + (-1 + x1)), tmp6, eviction_policy=
        'evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_1(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.
    constexpr, RBLOCK: tl.constexpr):
    xnumel = 512
    rnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = xindex // 4 % 32
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        tl.full([XBLOCK, RBLOCK], True, tl.int1)
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + 65536 * x4), xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + 65536 * x4), tmp2, xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + x4, tmp4, xmask)
    tl.store(out_ptr1 + x4, tmp5, xmask)
    tl.store(out_ptr2 + x4, tmp6, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_2(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 4 * x0), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + 4 * x0), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + 4 * x0), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 262144.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp20, xmask)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused_mul_sigmoid_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = xindex // 262144
    x2 = xindex // 8388608
    x5 = xindex % 8388608
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x4, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x4, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x3, None)
    tmp6 = tl.load(in_ptr4 + x4, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + x4, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + 9437184 * x2), tmp11, None)


@triton.jit
def triton_poi_fused_repeat_4(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex // 262144
    x2 = xindex // 1048576
    x4 = xindex % 1048576
    tmp0 = tl.load(in_ptr0 + x3, None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + 9437184 * x2), tmp0, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_5(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.
    constexpr, RBLOCK: tl.constexpr):
    xnumel = 512
    rnumel = 32768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = xindex // 4 % 32
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + 32768 * x4), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + 32768 * x4), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + x4, tmp4, xmask)
    tl.store(out_ptr1 + x4, tmp5, xmask)
    tl.store(out_ptr2 + x4, tmp6, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_6(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 4 * x0), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + 4 * x0), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + 4 * x0), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 131072.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp20, xmask)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused_mul_sigmoid_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = xindex // 131072
    x2 = xindex // 4194304
    x5 = xindex % 4194304
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x4, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x4, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x3, None)
    tmp6 = tl.load(in_ptr4 + x4, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + x4, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + 4718592 * x2), tmp11, None)


@triton.jit
def triton_poi_fused_repeat_8(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex // 131072
    x2 = xindex // 524288
    x4 = xindex % 524288
    tmp0 = tl.load(in_ptr0 + x3, None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + 4718592 * x2), tmp0, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_9(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.
    constexpr, RBLOCK: tl.constexpr):
    xnumel = 512
    rnumel = 16384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = xindex // 4 % 32
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + 16384 * x4), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + 16384 * x4), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + x4, tmp4, xmask)
    tl.store(out_ptr1 + x4, tmp5, xmask)
    tl.store(out_ptr2 + x4, tmp6, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_10(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 4 * x0), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + 4 * x0), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + 4 * x0), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 65536.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp20, xmask)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused_mul_sigmoid_11(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = xindex // 65536
    x2 = xindex // 2097152
    x5 = xindex % 2097152
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x4, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x4, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x3, None)
    tmp6 = tl.load(in_ptr4 + x4, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + x4, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + 2359296 * x2), tmp11, None)


@triton.jit
def triton_poi_fused_repeat_12(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex // 65536
    x2 = xindex // 262144
    x4 = xindex % 262144
    tmp0 = tl.load(in_ptr0 + x3, None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + 2359296 * x2), tmp0, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_13(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.
    constexpr, RBLOCK: tl.constexpr):
    xnumel = 512
    rnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x4 = xindex
    x1 = xindex // 4 % 32
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r3 + 8192 * x4), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r3 + 8192 * x4), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + x4, tmp4, xmask)
    tl.store(out_ptr1 + x4, tmp5, xmask)
    tl.store(out_ptr2 + x4, tmp6, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_14(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 4 * x0), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + 4 * x0), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + 4 * x0), xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 32768.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp20, xmask)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused_mul_sigmoid_15(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = xindex // 32768
    x2 = xindex // 1048576
    x5 = xindex % 1048576
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x4, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x4, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x3, None)
    tmp6 = tl.load(in_ptr4 + x4, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + x4, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp7 = tmp5 - tmp6
    tmp9 = tmp7 * tmp8
    tmp10 = tl.sigmoid(tmp9)
    tmp11 = tmp4 * tmp10
    tl.store(out_ptr0 + (x5 + 1179648 * x2), tmp11, None)


@triton.jit
def triton_poi_fused_repeat_16(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex // 32768
    x2 = xindex // 131072
    x4 = xindex % 131072
    tmp0 = tl.load(in_ptr0 + x3, None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4 + 1179648 * x2), tmp0, None)


@triton.jit
def triton_poi_fused_convolution_17(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 3584
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = tl.load(in_ptr0 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tl.store(in_out_ptr0 + x0, tmp3, xmask)


@triton.jit
def triton_poi_fused_tanh_18(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 56
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = libdevice.tanh(tmp0)
    tl.store(in_out_ptr0 + x0, tmp1, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 1, 1), (4, 1, 1, 1))
    assert_size_stride(primals_2, (4, 1, 512, 512), (262144, 262144, 512, 1))
    assert_size_stride(primals_3, (32, 5, 3, 9), (135, 27, 9, 1))
    assert_size_stride(primals_4, (32,), (1,))
    assert_size_stride(primals_5, (32, 5, 3, 9), (135, 27, 9, 1))
    assert_size_stride(primals_6, (32,), (1,))
    assert_size_stride(primals_7, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_8, (32,), (1,))
    assert_size_stride(primals_9, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_10, (32,), (1,))
    assert_size_stride(primals_11, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_12, (32,), (1,))
    assert_size_stride(primals_13, (32, 36, 3, 8), (864, 24, 8, 1))
    assert_size_stride(primals_14, (32,), (1,))
    assert_size_stride(primals_15, (32, 36, 3, 6), (648, 18, 6, 1))
    assert_size_stride(primals_16, (32,), (1,))
    assert_size_stride(primals_17, (32, 36, 3, 6), (648, 18, 6, 1))
    assert_size_stride(primals_18, (32,), (1,))
    assert_size_stride(primals_19, (1, 36, 36, 5), (6480, 180, 5, 1))
    assert_size_stride(primals_20, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 5, 512, 512), (1310720, 262144, 512, 
            1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_cat_0[grid(5242880)](primals_2, primals_1, buf0, 
            5242880, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_2
        buf1 = extern_kernels.convolution(buf0, primals_3, stride=(1, 1),
            padding=(1, 4), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 32, 512, 512), (8388608, 262144, 512, 1))
        buf2 = buf1
        del buf1
        buf3 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1),
            torch.float32)
        buf4 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1),
            torch.float32)
        buf5 = empty_strided_cuda((1, 128, 1, 1, 4), (512, 4, 512, 512, 1),
            torch.float32)
        triton_red_fused__native_batch_norm_legit_convolution_1[grid(512)](buf2
            , primals_4, buf3, buf4, buf5, 512, 65536, XBLOCK=1, RBLOCK=
            2048, num_warps=16, num_stages=1)
        del primals_4
        buf6 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32
            )
        buf7 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch
            .float32)
        buf9 = reinterpret_tensor(buf7, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf7
        triton_per_fused__native_batch_norm_legit_2[grid(128)](buf9, buf3,
            buf4, buf5, buf6, 128, 4, XBLOCK=128, num_warps=4, num_stages=1)
        buf10 = extern_kernels.convolution(buf0, primals_5, stride=(1, 1),
            padding=(1, 4), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 32, 512, 512), (8388608, 262144, 512, 1))
        buf11 = buf10
        del buf10
        buf12 = buf5
        del buf5
        buf13 = buf4
        del buf4
        buf14 = buf3
        del buf3
        triton_red_fused__native_batch_norm_legit_convolution_1[grid(512)](
            buf11, primals_6, buf12, buf13, buf14, 512, 65536, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_6
        buf15 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf16 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf18 = reinterpret_tensor(buf16, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf16
        triton_per_fused__native_batch_norm_legit_2[grid(128)](buf18, buf12,
            buf13, buf14, buf15, 128, 4, XBLOCK=128, num_warps=4, num_stages=1)
        buf21 = empty_strided_cuda((4, 36, 512, 512), (9437184, 262144, 512,
            1), torch.float32)
        buf19 = reinterpret_tensor(buf21, (4, 32, 512, 512), (9437184, 
            262144, 512, 1), 0)
        triton_poi_fused_mul_sigmoid_3[grid(33554432)](buf2, buf6, buf9,
            buf11, buf15, buf18, buf19, 33554432, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf20 = reinterpret_tensor(buf21, (4, 4, 512, 512), (9437184, 
            262144, 512, 1), 8388608)
        triton_poi_fused_repeat_4[grid(4194304)](primals_1, buf20, 4194304,
            XBLOCK=512, num_warps=8, num_stages=1)
        buf22 = extern_kernels.convolution(buf21, primals_7, stride=(1, 2),
            padding=(1, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 32, 512, 256), (4194304, 131072, 256, 1))
        buf23 = buf22
        del buf22
        buf24 = buf14
        del buf14
        buf25 = buf13
        del buf13
        buf26 = buf12
        del buf12
        triton_red_fused__native_batch_norm_legit_convolution_5[grid(512)](
            buf23, primals_8, buf24, buf25, buf26, 512, 32768, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_8
        buf27 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf28 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf30 = reinterpret_tensor(buf28, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf28
        triton_per_fused__native_batch_norm_legit_6[grid(128)](buf30, buf24,
            buf25, buf26, buf27, 128, 4, XBLOCK=128, num_warps=4, num_stages=1)
        buf31 = extern_kernels.convolution(buf21, primals_9, stride=(1, 2),
            padding=(1, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 32, 512, 256), (4194304, 131072, 256, 1))
        buf32 = buf31
        del buf31
        buf33 = buf26
        del buf26
        buf34 = buf25
        del buf25
        buf35 = buf24
        del buf24
        triton_red_fused__native_batch_norm_legit_convolution_5[grid(512)](
            buf32, primals_10, buf33, buf34, buf35, 512, 32768, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_10
        buf36 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf37 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf39 = reinterpret_tensor(buf37, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf37
        triton_per_fused__native_batch_norm_legit_6[grid(128)](buf39, buf33,
            buf34, buf35, buf36, 128, 4, XBLOCK=128, num_warps=4, num_stages=1)
        buf42 = empty_strided_cuda((4, 36, 512, 256), (4718592, 131072, 256,
            1), torch.float32)
        buf40 = reinterpret_tensor(buf42, (4, 32, 512, 256), (4718592, 
            131072, 256, 1), 0)
        triton_poi_fused_mul_sigmoid_7[grid(16777216)](buf23, buf27, buf30,
            buf32, buf36, buf39, buf40, 16777216, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf41 = reinterpret_tensor(buf42, (4, 4, 512, 256), (4718592, 
            131072, 256, 1), 4194304)
        triton_poi_fused_repeat_8[grid(2097152)](primals_1, buf41, 2097152,
            XBLOCK=1024, num_warps=4, num_stages=1)
        buf43 = extern_kernels.convolution(buf42, primals_11, stride=(1, 2),
            padding=(1, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf43, (4, 32, 512, 128), (2097152, 65536, 128, 1))
        buf44 = buf43
        del buf43
        buf45 = buf35
        del buf35
        buf46 = buf34
        del buf34
        buf47 = buf33
        del buf33
        triton_red_fused__native_batch_norm_legit_convolution_9[grid(512)](
            buf44, primals_12, buf45, buf46, buf47, 512, 16384, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_12
        buf48 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf49 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf51 = reinterpret_tensor(buf49, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf49
        triton_per_fused__native_batch_norm_legit_10[grid(128)](buf51,
            buf45, buf46, buf47, buf48, 128, 4, XBLOCK=32, num_warps=2,
            num_stages=1)
        buf52 = extern_kernels.convolution(buf42, primals_13, stride=(1, 2),
            padding=(1, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf52, (4, 32, 512, 128), (2097152, 65536, 128, 1))
        buf53 = buf52
        del buf52
        buf54 = buf47
        del buf47
        buf55 = buf46
        del buf46
        buf56 = buf45
        del buf45
        triton_red_fused__native_batch_norm_legit_convolution_9[grid(512)](
            buf53, primals_14, buf54, buf55, buf56, 512, 16384, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_14
        buf57 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf58 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf60 = reinterpret_tensor(buf58, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf58
        triton_per_fused__native_batch_norm_legit_10[grid(128)](buf60,
            buf54, buf55, buf56, buf57, 128, 4, XBLOCK=32, num_warps=2,
            num_stages=1)
        buf63 = empty_strided_cuda((4, 36, 512, 128), (2359296, 65536, 128,
            1), torch.float32)
        buf61 = reinterpret_tensor(buf63, (4, 32, 512, 128), (2359296, 
            65536, 128, 1), 0)
        triton_poi_fused_mul_sigmoid_11[grid(8388608)](buf44, buf48, buf51,
            buf53, buf57, buf60, buf61, 8388608, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf62 = reinterpret_tensor(buf63, (4, 4, 512, 128), (2359296, 65536,
            128, 1), 2097152)
        triton_poi_fused_repeat_12[grid(1048576)](primals_1, buf62, 1048576,
            XBLOCK=1024, num_warps=4, num_stages=1)
        buf64 = extern_kernels.convolution(buf63, primals_15, stride=(1, 2),
            padding=(1, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 32, 512, 64), (1048576, 32768, 64, 1))
        buf65 = buf64
        del buf64
        buf66 = buf56
        del buf56
        buf67 = buf55
        del buf55
        buf68 = buf54
        del buf54
        triton_red_fused__native_batch_norm_legit_convolution_13[grid(512)](
            buf65, primals_16, buf66, buf67, buf68, 512, 8192, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_16
        buf69 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf70 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf72 = reinterpret_tensor(buf70, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf70
        triton_per_fused__native_batch_norm_legit_14[grid(128)](buf72,
            buf66, buf67, buf68, buf69, 128, 4, XBLOCK=8, num_warps=2,
            num_stages=1)
        buf73 = extern_kernels.convolution(buf63, primals_17, stride=(1, 2),
            padding=(1, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf73, (4, 32, 512, 64), (1048576, 32768, 64, 1))
        buf74 = buf73
        del buf73
        buf75 = buf68
        del buf68
        buf76 = buf67
        del buf67
        buf77 = buf66
        del buf66
        triton_red_fused__native_batch_norm_legit_convolution_13[grid(512)](
            buf74, primals_18, buf75, buf76, buf77, 512, 8192, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_18
        buf78 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf79 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf81 = reinterpret_tensor(buf79, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf79
        triton_per_fused__native_batch_norm_legit_14[grid(128)](buf81,
            buf75, buf76, buf77, buf78, 128, 4, XBLOCK=8, num_warps=2,
            num_stages=1)
        del buf75
        del buf76
        del buf77
        buf84 = empty_strided_cuda((4, 36, 512, 64), (1179648, 32768, 64, 1
            ), torch.float32)
        buf82 = reinterpret_tensor(buf84, (4, 32, 512, 64), (1179648, 32768,
            64, 1), 0)
        triton_poi_fused_mul_sigmoid_15[grid(4194304)](buf65, buf69, buf72,
            buf74, buf78, buf81, buf82, 4194304, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf83 = reinterpret_tensor(buf84, (4, 4, 512, 64), (1179648, 32768,
            64, 1), 1048576)
        triton_poi_fused_repeat_16[grid(524288)](primals_1, buf83, 524288,
            XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_1
        buf85 = extern_kernels.convolution(buf84, primals_19, stride=(36, 1
            ), padding=(0, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf85, (4, 1, 14, 64), (896, 896, 64, 1))
        buf86 = buf85
        del buf85
        triton_poi_fused_convolution_17[grid(3584)](buf86, primals_20, 3584,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_20
        buf87 = torch.ops.aten.avg_pool2d.default(buf86, [1, 64], [1, 64],
            [0, 0], False, True, None)
        buf88 = buf87
        del buf87
        buf89 = reinterpret_tensor(buf88, (4, 14), (14, 1), 0)
        del buf88
        triton_poi_fused_tanh_18[grid(56)](buf89, 56, XBLOCK=64, num_warps=
            1, num_stages=1)
    return (buf89, primals_3, primals_5, primals_7, primals_9, primals_11,
        primals_13, primals_15, primals_17, primals_19, buf0, buf2, buf6,
        buf9, buf11, buf15, buf18, buf21, buf23, buf27, buf30, buf32, buf36,
        buf39, buf42, buf44, buf48, buf51, buf53, buf57, buf60, buf63,
        buf65, buf69, buf72, buf74, buf78, buf81, buf84, buf86, buf89)


class Down2d(nn.Module):
    """docstring for Down2d."""

    def __init__(self, in_channel, out_channel, kernel, stride, padding):
        super(Down2d, self).__init__()
        self.c1 = nn.Conv2d(in_channel, out_channel, kernel_size=kernel,
            stride=stride, padding=padding)
        self.n1 = nn.InstanceNorm2d(out_channel)
        self.c2 = nn.Conv2d(in_channel, out_channel, kernel_size=kernel,
            stride=stride, padding=padding)
        self.n2 = nn.InstanceNorm2d(out_channel)

    def forward(self, x):
        x1 = self.c1(x)
        x1 = self.n1(x1)
        x2 = self.c2(x)
        x2 = self.n2(x2)
        x3 = x1 * torch.sigmoid(x2)
        return x3


class DiscriminatorNew(nn.Module):
    """docstring for Discriminator."""

    def __init__(self):
        super(DiscriminatorNew, self).__init__()
        self.d1 = Down2d(5, 32, (3, 9), (1, 1), (1, 4))
        self.d2 = Down2d(36, 32, (3, 8), (1, 2), (1, 3))
        self.d3 = Down2d(36, 32, (3, 8), (1, 2), (1, 3))
        self.d4 = Down2d(36, 32, (3, 6), (1, 2), (1, 2))
        self.conv = nn.Conv2d(36, 1, (36, 5), (36, 1), (0, 2))
        self.pool = nn.AvgPool2d((1, 64))

    def forward(self, input_0, input_1):
        primals_3 = self.d1.c1.weight
        primals_4 = self.d1.c1.bias
        primals_5 = self.d1.c2.weight
        primals_6 = self.d1.c2.bias
        primals_7 = self.d2.c1.weight
        primals_8 = self.d2.c1.bias
        primals_9 = self.d2.c2.weight
        primals_10 = self.d2.c2.bias
        primals_11 = self.d3.c1.weight
        primals_12 = self.d3.c1.bias
        primals_13 = self.d3.c2.weight
        primals_14 = self.d3.c2.bias
        primals_15 = self.d4.c1.weight
        primals_16 = self.d4.c1.bias
        primals_17 = self.d4.c2.weight
        primals_18 = self.d4.c2.bias
        primals_19 = self.conv.weight
        primals_20 = self.conv.bias
        primals_2 = input_0
        primals_1 = input_1
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20])
        return output[0]
