# 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_4/inductor_cache/e4/ce4ut4ww7buakyddawvmwd3rmw676rn5srdsnhgej6ymkbabmvjf.py
# Topologically Sorted Source Nodes: [x_1, x_2], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_1 => add, add_1, mul, mul_1, repeat, rsqrt, sub, var_mean
#   x_2 => gt, mul_2, where
# Graph fragment:
#   %repeat : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_3, [4]), kwargs = {})
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view, [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 = {})
#   %sub : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view, %getitem_1), kwargs = {})
#   %mul : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub, %rsqrt), kwargs = {})
#   %mul_1 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul, %unsqueeze_1), kwargs = {})
#   %add_1 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_1, %unsqueeze_3), kwargs = {})
#   %gt : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_1, 0), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_1, 0.2), kwargs = {})
#   %where : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt, %view_1, %mul_2), kwargs = {})
triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_0 = async_compile.triton('triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_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.persistent_reduction(
    size_hints=[256, 16],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_0', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 4, '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_leaky_relu_repeat_0(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    rnumel = 16
    RBLOCK: tl.constexpr = 16
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + (x0 % 64), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + (16*x0)), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + (x0 % 64), xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp4 = tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 16, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 16.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + (x0), tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + (16*x0)), tmp32, xmask)
    tl.store(out_ptr3 + (x0), tmp23, xmask)
    tl.store(out_ptr1 + (x0), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/jr/cjrkvgqsrkrzes3byvkb3awyeg2zhynh6a2iawul33larixsuldg.py
# Topologically Sorted Source Nodes: [x_4, x_5], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_4 => add_2, add_3, mul_3, mul_4, repeat_2, rsqrt_1, sub_1, var_mean_1
#   x_5 => gt_1, mul_5, where_1
# Graph fragment:
#   %repeat_2 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_6, [4]), kwargs = {})
#   %var_mean_1 : [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_2, 1e-05), kwargs = {})
#   %rsqrt_1 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_2,), kwargs = {})
#   %sub_1 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_5, %getitem_3), kwargs = {})
#   %mul_3 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_1, %rsqrt_1), kwargs = {})
#   %mul_4 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_3, %unsqueeze_5), kwargs = {})
#   %add_3 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_4, %unsqueeze_7), kwargs = {})
#   %gt_1 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_6, 0), kwargs = {})
#   %mul_5 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_6, 0.2), kwargs = {})
#   %where_1 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_1, %view_6, %mul_5), kwargs = {})
triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_1 = async_compile.triton('triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_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.persistent_reduction(
    size_hints=[512, 16],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_1', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 4, '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_leaky_relu_repeat_1(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 512
    rnumel = 16
    RBLOCK: tl.constexpr = 16
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + (x0 % 128), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + (16*x0)), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + (x0 % 128), xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp4 = tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 16, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 16.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + (x0), tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + (16*x0)), tmp32, xmask)
    tl.store(out_ptr3 + (x0), tmp23, xmask)
    tl.store(out_ptr1 + (x0), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/gv/cgvfdus7jwptj4n5skzvebfi3jfv4w7qsrr4jlwca3gfocsavk3y.py
# Topologically Sorted Source Nodes: [x_7, x_8], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_7 => add_4, add_5, mul_6, mul_7, repeat_4, rsqrt_2, sub_2, var_mean_2
#   x_8 => gt_2, mul_8, where_2
# Graph fragment:
#   %repeat_4 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_9, [4]), kwargs = {})
#   %var_mean_2 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_10, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_4 : [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_4,), kwargs = {})
#   %sub_2 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_10, %getitem_5), kwargs = {})
#   %mul_6 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_2, %rsqrt_2), kwargs = {})
#   %mul_7 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_6, %unsqueeze_9), kwargs = {})
#   %add_5 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_7, %unsqueeze_11), kwargs = {})
#   %gt_2 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_11, 0), kwargs = {})
#   %mul_8 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_11, 0.2), kwargs = {})
#   %where_2 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_2, %view_11, %mul_8), kwargs = {})
triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2 = async_compile.triton('triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_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=[256, 64],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 4, '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_leaky_relu_repeat_2(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    rnumel = 64
    RBLOCK: tl.constexpr = 64
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + (x0 % 64), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + (64*x0)), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + (x0 % 64), xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp4 = tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 64.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + (x0), tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + (64*x0)), tmp32, xmask)
    tl.store(out_ptr3 + (x0), tmp23, xmask)
    tl.store(out_ptr1 + (x0), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/2r/c2rgxkvktgswate5x7dgwmb5sjxwvmvzazgjuhvftuu4sgwmpwyu.py
# Topologically Sorted Source Nodes: [x_13, x_14], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_13 => add_8, add_9, mul_12, mul_13, repeat_8, rsqrt_4, sub_4, var_mean_4
#   x_14 => gt_4, mul_14, where_4
# Graph fragment:
#   %repeat_8 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_15, [4]), kwargs = {})
#   %var_mean_4 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_20, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_8 : [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_8,), kwargs = {})
#   %sub_4 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_20, %getitem_9), kwargs = {})
#   %mul_12 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_4, %rsqrt_4), kwargs = {})
#   %mul_13 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_12, %unsqueeze_17), kwargs = {})
#   %add_9 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_13, %unsqueeze_19), kwargs = {})
#   %gt_4 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_21, 0), kwargs = {})
#   %mul_14 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_21, 0.2), kwargs = {})
#   %where_4 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_4, %view_21, %mul_14), kwargs = {})
triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3 = async_compile.triton('triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_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.persistent_reduction(
    size_hints=[128, 256],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': True, 'num_load': 3, 'num_reduction': 4, '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_leaky_relu_repeat_3(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel):
    xnumel = 128
    XBLOCK: tl.constexpr = 1
    rnumel = 256
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    xmask = tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    roffset = 0
    rmask = tl.full([RBLOCK], True, tl.int1)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + (x0 % 32), None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + (256*x0)), None)
    tmp23 = tl.load(in_ptr2 + (x0 % 32), None, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp6 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp7 = tl.full([1], 256, tl.int32)
    tmp8 = tmp7.to(tl.float32)
    tmp9 = tmp6 / tmp8
    tmp10 = tmp2 - tmp9
    tmp11 = tmp10 * tmp10
    tmp12 = tl.broadcast_to(tmp11, [RBLOCK])
    tmp14 = triton_helpers.promote_to_tensor(tl.sum(tmp12, 0))
    tmp15 = tmp1 - tmp9
    tmp16 = 256.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tmp21 = tmp15 * tmp20
    tmp22 = tmp21 * tmp0
    tmp24 = tmp22 + tmp23
    tmp25 = 0.0
    tmp26 = tmp24 > tmp25
    tmp27 = 0.2
    tmp28 = tmp24 * tmp27
    tmp29 = tl.where(tmp26, tmp24, tmp28)
    tl.store(out_ptr0 + (x0), tmp0, None)
    tl.store(in_out_ptr0 + (r1 + (256*x0)), tmp29, None)
    tl.store(out_ptr3 + (x0), tmp20, None)
    tl.store(out_ptr1 + (x0), tmp9, None)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/vc/cvcyexgjzbawzvi6qrlbzazrqv5uuq4va3sn4vms6b6t2ach7rfn.py
# Topologically Sorted Source Nodes: [x_19, x_20], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_19 => add_12, add_13, mul_18, mul_19, repeat_12, rsqrt_6, sub_6, var_mean_6
#   x_20 => gt_6, mul_20, where_6
# Graph fragment:
#   %repeat_12 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_21, [4]), kwargs = {})
#   %var_mean_6 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_30, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_12 : [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_12,), kwargs = {})
#   %sub_6 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_30, %getitem_13), kwargs = {})
#   %mul_18 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_6, %rsqrt_6), kwargs = {})
#   %mul_19 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_18, %unsqueeze_25), kwargs = {})
#   %add_13 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_19, %unsqueeze_27), kwargs = {})
#   %gt_6 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_31, 0), kwargs = {})
#   %mul_20 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_31, 0.2), kwargs = {})
#   %where_6 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_6, %view_31, %mul_20), kwargs = {})
triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_4 = async_compile.triton('triton_per_fused__native_batch_norm_legit_leaky_relu_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.persistent_reduction(
    size_hints=[128, 1024],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_4', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': True, 'num_load': 3, 'num_reduction': 4, '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_leaky_relu_repeat_4(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel):
    xnumel = 128
    XBLOCK: tl.constexpr = 1
    rnumel = 1024
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    xmask = tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    roffset = 0
    rmask = tl.full([RBLOCK], True, tl.int1)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + (x0 % 32), None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + (1024*x0)), None)
    tmp23 = tl.load(in_ptr2 + (x0 % 32), None, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp6 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp7 = tl.full([1], 1024, tl.int32)
    tmp8 = tmp7.to(tl.float32)
    tmp9 = tmp6 / tmp8
    tmp10 = tmp2 - tmp9
    tmp11 = tmp10 * tmp10
    tmp12 = tl.broadcast_to(tmp11, [RBLOCK])
    tmp14 = triton_helpers.promote_to_tensor(tl.sum(tmp12, 0))
    tmp15 = tmp1 - tmp9
    tmp16 = 1024.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tmp21 = tmp15 * tmp20
    tmp22 = tmp21 * tmp0
    tmp24 = tmp22 + tmp23
    tmp25 = 0.0
    tmp26 = tmp24 > tmp25
    tmp27 = 0.2
    tmp28 = tmp24 * tmp27
    tmp29 = tl.where(tmp26, tmp24, tmp28)
    tl.store(out_ptr0 + (x0), tmp0, None)
    tl.store(in_out_ptr0 + (r1 + (1024*x0)), tmp29, None)
    tl.store(out_ptr3 + (x0), tmp20, None)
    tl.store(out_ptr1 + (x0), tmp9, None)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/hk/chkmgqrf2g7aokarbesbyfxruktunzt7g7tyyi6esdpawylkyglh.py
# Topologically Sorted Source Nodes: [x_22, x_23], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
# Source node to ATen node mapping:
#   x_22 => add_14, add_15, mul_21, mul_22, repeat_14, rsqrt_7, sub_7, var_mean_7
#   x_23 => gt_7, mul_23, where_7
# Graph fragment:
#   %repeat_14 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_24, [4]), kwargs = {})
#   %var_mean_7 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_35, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_14 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_14, 1e-05), kwargs = {})
#   %rsqrt_7 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_14,), kwargs = {})
#   %sub_7 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view_35, %getitem_15), kwargs = {})
#   %mul_21 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_7, %rsqrt_7), kwargs = {})
#   %mul_22 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_21, %unsqueeze_29), kwargs = {})
#   %add_15 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_22, %unsqueeze_31), kwargs = {})
#   %gt_7 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view_36, 0), kwargs = {})
#   %mul_23 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_36, 0.2), kwargs = {})
#   %where_7 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_7, %view_36, %mul_23), kwargs = {})
triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_5 = async_compile.triton('triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_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=[64, 4096],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: '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, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 4, '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_red_fused__native_batch_norm_legit_leaky_relu_repeat_5(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 64
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 % 16), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
    tmp3_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp3_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp3_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp1 = tl.load(in_ptr1 + (r1 + (4096*x0)), rmask & xmask, eviction_policy='evict_last', other=0.0)
        tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
        tmp3_mean_next, tmp3_m2_next, tmp3_weight_next = triton_helpers.welford_reduce(
            tmp2, tmp3_mean, tmp3_m2, tmp3_weight, roffset == 0
        )
        tmp3_mean = tl.where(rmask & xmask, tmp3_mean_next, tmp3_mean)
        tmp3_m2 = tl.where(rmask & xmask, tmp3_m2_next, tmp3_m2)
        tmp3_weight = tl.where(rmask & xmask, tmp3_weight_next, tmp3_weight)
    tmp3_tmp, tmp4_tmp, tmp5_tmp = triton_helpers.welford(
        tmp3_mean, tmp3_m2, tmp3_weight, 1
    )
    tmp3 = tmp3_tmp[:, None]
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tl.store(out_ptr1 + (x0), tmp3, xmask)
    tmp15 = tl.load(in_ptr2 + (x0 % 16), xmask, eviction_policy='evict_last')
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp6 = tl.load(in_ptr1 + (r1 + (4096*x0)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp7 = tmp6 - tmp3
        tmp8 = 4096.0
        tmp9 = tmp4 / tmp8
        tmp10 = 1e-05
        tmp11 = tmp9 + tmp10
        tmp12 = libdevice.rsqrt(tmp11)
        tmp13 = tmp7 * tmp12
        tmp14 = tmp13 * tmp0
        tmp16 = tmp14 + tmp15
        tmp17 = 0.0
        tmp18 = tmp16 > tmp17
        tmp19 = 0.2
        tmp20 = tmp16 * tmp19
        tmp21 = tl.where(tmp18, tmp16, tmp20)
        tl.store(in_out_ptr0 + (r1 + (4096*x0)), tmp21, rmask & xmask)
    tmp22 = 4096.0
    tmp23 = tmp4 / tmp22
    tmp24 = 1e-05
    tmp25 = tmp23 + tmp24
    tmp26 = libdevice.rsqrt(tmp25)
    tl.store(out_ptr3 + (x0), tmp26, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/to/ctopyqo3humni56cuwcrdh4cm3ly76mamnbambzyfhrxb36jpj37.py
# Topologically Sorted Source Nodes: [x_25], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   x_25 => sigmoid
# Graph fragment:
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%convolution_8,), kwargs = {})
triton_poi_fused_sigmoid_6 = async_compile.triton('triton_poi_fused_sigmoid_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.pointwise(
    size_hints=[65536], 
    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, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_6', '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_sigmoid_6(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = tl.sigmoid(tmp0)
    tl.store(in_out_ptr0 + (x0), tmp1, None)
''', 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, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26 = args
    args.clear()
    assert_size_stride(primals_1, (32, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_2, (4, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_3, (64, ), (1, ))
    assert_size_stride(primals_4, (64, ), (1, ))
    assert_size_stride(primals_5, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_6, (128, ), (1, ))
    assert_size_stride(primals_7, (128, ), (1, ))
    assert_size_stride(primals_8, (128, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_9, (64, ), (1, ))
    assert_size_stride(primals_10, (64, ), (1, ))
    assert_size_stride(primals_11, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_12, (64, ), (1, ))
    assert_size_stride(primals_13, (64, ), (1, ))
    assert_size_stride(primals_14, (64, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_15, (32, ), (1, ))
    assert_size_stride(primals_16, (32, ), (1, ))
    assert_size_stride(primals_17, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_18, (32, ), (1, ))
    assert_size_stride(primals_19, (32, ), (1, ))
    assert_size_stride(primals_20, (32, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_21, (32, ), (1, ))
    assert_size_stride(primals_22, (32, ), (1, ))
    assert_size_stride(primals_23, (32, 16, 4, 4), (256, 16, 4, 1))
    assert_size_stride(primals_24, (16, ), (1, ))
    assert_size_stride(primals_25, (16, ), (1, ))
    assert_size_stride(primals_26, (4, 16, 1, 1), (16, 1, 1, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        # Topologically Sorted Source Nodes: [x], Original ATen: [aten.convolution]
        buf0 = extern_kernels.convolution(primals_2, primals_1, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf1 = empty_strided_cuda((256, ), (1, ), torch.float32)
        buf2 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf6 = empty_strided_cuda((1, 256, 4, 4), (4096, 16, 4, 1), torch.float32)
        buf7 = reinterpret_tensor(buf6, (4, 64, 4, 4), (1024, 16, 4, 1), 0); del buf6  # reuse
        buf5 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_1, x_2], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        stream0 = get_raw_stream(0)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_0.run(buf7, primals_3, buf0, primals_4, buf1, buf2, buf5, 256, 16, grid=grid(256), stream=stream0)
        del primals_3
        del primals_4
        # Topologically Sorted Source Nodes: [x_3], Original ATen: [aten.convolution]
        buf8 = extern_kernels.convolution(buf7, primals_5, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 128, 4, 4), (2048, 16, 4, 1))
        buf9 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf10 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf14 = empty_strided_cuda((1, 512, 4, 4), (8192, 16, 4, 1), torch.float32)
        buf15 = reinterpret_tensor(buf14, (4, 128, 4, 4), (2048, 16, 4, 1), 0); del buf14  # reuse
        buf13 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        # Topologically Sorted Source Nodes: [x_4, x_5], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_1.run(buf15, primals_6, buf8, primals_7, buf9, buf10, buf13, 512, 16, grid=grid(512), stream=stream0)
        del primals_6
        del primals_7
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.convolution]
        buf16 = extern_kernels.convolution(buf15, primals_8, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf17 = empty_strided_cuda((256, ), (1, ), torch.float32)
        buf18 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf22 = empty_strided_cuda((1, 256, 8, 8), (16384, 64, 8, 1), torch.float32)
        buf23 = reinterpret_tensor(buf22, (4, 64, 8, 8), (4096, 64, 8, 1), 0); del buf22  # reuse
        buf21 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_7, x_8], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2.run(buf23, primals_9, buf16, primals_10, buf17, buf18, buf21, 256, 64, grid=grid(256), stream=stream0)
        del primals_10
        del primals_9
        # Topologically Sorted Source Nodes: [x_9], Original ATen: [aten.convolution]
        buf24 = extern_kernels.convolution(buf23, primals_11, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf25 = empty_strided_cuda((256, ), (1, ), torch.float32)
        buf26 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf30 = empty_strided_cuda((1, 256, 8, 8), (16384, 64, 8, 1), torch.float32)
        buf31 = reinterpret_tensor(buf30, (4, 64, 8, 8), (4096, 64, 8, 1), 0); del buf30  # reuse
        buf29 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_10, x_11], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2.run(buf31, primals_12, buf24, primals_13, buf25, buf26, buf29, 256, 64, grid=grid(256), stream=stream0)
        del primals_12
        del primals_13
        # Topologically Sorted Source Nodes: [x_12], Original ATen: [aten.convolution]
        buf32 = extern_kernels.convolution(buf31, primals_14, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf33 = empty_strided_cuda((128, ), (1, ), torch.float32)
        buf34 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf38 = empty_strided_cuda((1, 128, 16, 16), (32768, 256, 16, 1), torch.float32)
        buf39 = reinterpret_tensor(buf38, (4, 32, 16, 16), (8192, 256, 16, 1), 0); del buf38  # reuse
        buf37 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        # Topologically Sorted Source Nodes: [x_13, x_14], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3.run(buf39, primals_15, buf32, primals_16, buf33, buf34, buf37, 128, 256, grid=grid(128), stream=stream0)
        del primals_15
        del primals_16
        # Topologically Sorted Source Nodes: [x_15], Original ATen: [aten.convolution]
        buf40 = extern_kernels.convolution(buf39, primals_17, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf41 = empty_strided_cuda((128, ), (1, ), torch.float32)
        buf42 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf46 = empty_strided_cuda((1, 128, 16, 16), (32768, 256, 16, 1), torch.float32)
        buf47 = reinterpret_tensor(buf46, (4, 32, 16, 16), (8192, 256, 16, 1), 0); del buf46  # reuse
        buf45 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        # Topologically Sorted Source Nodes: [x_16, x_17], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3.run(buf47, primals_18, buf40, primals_19, buf41, buf42, buf45, 128, 256, grid=grid(128), stream=stream0)
        del primals_18
        del primals_19
        # Topologically Sorted Source Nodes: [x_18], Original ATen: [aten.convolution]
        buf48 = extern_kernels.convolution(buf47, primals_20, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf48, (4, 32, 32, 32), (32768, 1024, 32, 1))
        buf49 = empty_strided_cuda((128, ), (1, ), torch.float32)
        buf50 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf54 = empty_strided_cuda((1, 128, 32, 32), (131072, 1024, 32, 1), torch.float32)
        buf55 = reinterpret_tensor(buf54, (4, 32, 32, 32), (32768, 1024, 32, 1), 0); del buf54  # reuse
        buf53 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        # Topologically Sorted Source Nodes: [x_19, x_20], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_4.run(buf55, primals_21, buf48, primals_22, buf49, buf50, buf53, 128, 1024, grid=grid(128), stream=stream0)
        del primals_21
        del primals_22
        # Topologically Sorted Source Nodes: [x_21], Original ATen: [aten.convolution]
        buf56 = extern_kernels.convolution(buf55, primals_23, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=True, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf56, (4, 16, 64, 64), (65536, 4096, 64, 1))
        buf57 = empty_strided_cuda((64, ), (1, ), torch.float32)
        buf58 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.float32)
        buf62 = empty_strided_cuda((1, 64, 64, 64), (262144, 4096, 64, 1), torch.float32)
        buf63 = reinterpret_tensor(buf62, (4, 16, 64, 64), (65536, 4096, 64, 1), 0); del buf62  # reuse
        buf61 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.float32)
        # Topologically Sorted Source Nodes: [x_22, x_23], Original ATen: [aten.repeat, aten._native_batch_norm_legit, aten.leaky_relu]
        triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_5.run(buf63, primals_24, buf56, primals_25, buf57, buf58, buf61, 64, 4096, grid=grid(64), stream=stream0)
        del primals_24
        del primals_25
        # Topologically Sorted Source Nodes: [x_24], Original ATen: [aten.convolution]
        buf64 = extern_kernels.convolution(buf63, primals_26, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf65 = buf64; del buf64  # reuse
        # Topologically Sorted Source Nodes: [x_25], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_6.run(buf65, 65536, grid=grid(65536), stream=stream0)
    return (buf65, primals_1, primals_2, primals_5, primals_8, primals_11, primals_14, primals_17, primals_20, primals_23, primals_26, buf0, buf1, reinterpret_tensor(buf5, (256, ), (1, ), 0), buf7, buf8, buf9, reinterpret_tensor(buf13, (512, ), (1, ), 0), buf15, buf16, buf17, reinterpret_tensor(buf21, (256, ), (1, ), 0), buf23, buf24, buf25, reinterpret_tensor(buf29, (256, ), (1, ), 0), buf31, buf32, buf33, reinterpret_tensor(buf37, (128, ), (1, ), 0), buf39, buf40, buf41, reinterpret_tensor(buf45, (128, ), (1, ), 0), buf47, buf48, buf49, reinterpret_tensor(buf53, (128, ), (1, ), 0), buf55, buf56, buf57, reinterpret_tensor(buf61, (64, ), (1, ), 0), buf63, buf65, reinterpret_tensor(buf58, (1, 64, 1, 1), (64, 1, 1, 1), 0), reinterpret_tensor(buf50, (1, 128, 1, 1), (128, 1, 1, 1), 0), reinterpret_tensor(buf42, (1, 128, 1, 1), (128, 1, 1, 1), 0), reinterpret_tensor(buf34, (1, 128, 1, 1), (128, 1, 1, 1), 0), reinterpret_tensor(buf26, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf18, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf10, (1, 512, 1, 1), (512, 1, 1, 1), 0), reinterpret_tensor(buf2, (1, 256, 1, 1), (256, 1, 1, 1), 0), )


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((32, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 32, 4, 4), (512, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((64, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((128, 64, 4, 4), (1024, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((64, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((64, 32, 4, 4), (512, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((32, 32, 3, 3), (288, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((32, 32, 4, 4), (512, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_21 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_22 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_23 = rand_strided((32, 16, 4, 4), (256, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_24 = rand_strided((16, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_25 = rand_strided((16, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_26 = rand_strided((4, 16, 1, 1), (16, 1, 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, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26])
    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 INConv(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride=1,
        padding=0, dilation=1, groups=1, relu=True, ins_n=True, bias=False):
        super(INConv, self).__init__()
        self.out_channels = out_planes
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=
            kernel_size, stride=stride, padding=padding, dilation=dilation,
            groups=groups, bias=bias)
        self.ins_n = nn.InstanceNorm2d(out_planes, affine=True
            ) if ins_n else None
        self.relu = nn.ReLU(inplace=True) if relu else None

    def forward(self, x):
        x = self.conv(x)
        if self.ins_n is not None:
            x = self.ins_n(x)
        if self.relu is not None:
            x = self.relu(x)
        return x


class INDeConv(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride=1,
        padding=0, out_padding=0, dilation=1, groups=1, relu=True, ins_n=
        True, bias=False):
        super(INDeConv, self).__init__()
        self.out_channels = out_planes
        self.conv = nn.ConvTranspose2d(in_planes, out_planes, kernel_size=
            kernel_size, stride=stride, padding=padding, output_padding=
            out_padding, dilation=dilation, groups=groups, bias=bias)
        self.ins_n = nn.InstanceNorm2d(out_planes, affine=True
            ) if ins_n else None
        self.relu = nn.ReLU(inplace=True) if relu else None

    def forward(self, x):
        x = self.conv(x)
        if self.ins_n is not None:
            x = self.ins_n(x)
        if self.relu is not None:
            x = self.relu(x)
        return x


class Decoder(nn.Module):

    def __init__(self, img_channel):
        super(Decoder, self).__init__()
        self.deconv1 = INDeConv(in_planes=32, out_planes=64, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation1 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv2 = INDeConv(in_planes=64, out_planes=128, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation2 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv3 = INDeConv(in_planes=128, out_planes=64, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation3 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv4 = INDeConv(in_planes=64, out_planes=64, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation4 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv5 = INDeConv(in_planes=64, out_planes=32, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation5 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv6 = INDeConv(in_planes=32, out_planes=32, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation6 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv7 = INDeConv(in_planes=32, out_planes=32, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation7 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv8 = INDeConv(in_planes=32, out_planes=16, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation8 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.output = INConv(in_planes=16, out_planes=img_channel,
            kernel_size=1, stride=1, padding=0, ins_n=False, relu=False)
        self.activation9 = nn.Sigmoid()

    def forward(self, x):
        x = self.activation1(self.deconv1(x))
        x = self.activation2(self.deconv2(x))
        x = self.activation3(self.deconv3(x))
        x = self.activation4(self.deconv4(x))
        x = self.activation5(self.deconv5(x))
        x = self.activation6(self.deconv6(x))
        x = self.activation7(self.deconv7(x))
        x = self.activation8(self.deconv8(x))
        x = self.activation9(self.output(x))
        return x


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


def get_init_inputs():
    return [[], {'img_channel': 4}]

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_per_fused__native_batch_norm_legit_leaky_relu_repeat_0(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel,
    XBLOCK: tl.constexpr):
    xnumel = 256
    RBLOCK: tl.constexpr = 16
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + x0 % 64, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + 16 * x0), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + x0 % 64, xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 16, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 16.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + x0, tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + 16 * x0), tmp32, xmask)
    tl.store(out_ptr3 + x0, tmp23, xmask)
    tl.store(out_ptr1 + x0, tmp11, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_1(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel,
    XBLOCK: tl.constexpr):
    xnumel = 512
    RBLOCK: tl.constexpr = 16
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + x0 % 128, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + 16 * x0), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + x0 % 128, xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 16, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 16.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + x0, tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + 16 * x0), tmp32, xmask)
    tl.store(out_ptr3 + x0, tmp23, xmask)
    tl.store(out_ptr1 + x0, tmp11, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel,
    XBLOCK: tl.constexpr):
    xnumel = 256
    RBLOCK: tl.constexpr = 64
    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)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + x0 % 64, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + 64 * x0), xmask, other=0.0)
    tmp26 = tl.load(in_ptr2 + x0 % 64, xmask, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp2, 0)
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(xmask, tmp5, 0)
    tmp8 = tl.sum(tmp7, 1)[:, None]
    tmp9 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp10 = tmp9.to(tl.float32)
    tmp11 = tmp8 / tmp10
    tmp12 = tmp2 - tmp11
    tmp13 = tmp12 * tmp12
    tmp14 = tl.broadcast_to(tmp13, [XBLOCK, RBLOCK])
    tmp16 = tl.where(xmask, tmp14, 0)
    tmp17 = tl.sum(tmp16, 1)[:, None]
    tmp18 = tmp1 - tmp11
    tmp19 = 64.0
    tmp20 = tmp17 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp18 * tmp23
    tmp25 = tmp24 * tmp0
    tmp27 = tmp25 + tmp26
    tmp28 = 0.0
    tmp29 = tmp27 > tmp28
    tmp30 = 0.2
    tmp31 = tmp27 * tmp30
    tmp32 = tl.where(tmp29, tmp27, tmp31)
    tl.store(out_ptr0 + x0, tmp0, xmask)
    tl.store(in_out_ptr0 + (r1 + 64 * x0), tmp32, xmask)
    tl.store(out_ptr3 + x0, tmp23, xmask)
    tl.store(out_ptr1 + x0, tmp11, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + x0 % 32, None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + 256 * x0), None)
    tmp23 = tl.load(in_ptr2 + x0 % 32, None, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp6 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp7 = tl.full([1], 256, tl.int32)
    tmp8 = tmp7.to(tl.float32)
    tmp9 = tmp6 / tmp8
    tmp10 = tmp2 - tmp9
    tmp11 = tmp10 * tmp10
    tmp12 = tl.broadcast_to(tmp11, [RBLOCK])
    tmp14 = triton_helpers.promote_to_tensor(tl.sum(tmp12, 0))
    tmp15 = tmp1 - tmp9
    tmp16 = 256.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tmp21 = tmp15 * tmp20
    tmp22 = tmp21 * tmp0
    tmp24 = tmp22 + tmp23
    tmp25 = 0.0
    tmp26 = tmp24 > tmp25
    tmp27 = 0.2
    tmp28 = tmp24 * tmp27
    tmp29 = tl.where(tmp26, tmp24, tmp28)
    tl.store(out_ptr0 + x0, tmp0, None)
    tl.store(in_out_ptr0 + (r1 + 256 * x0), tmp29, None)
    tl.store(out_ptr3 + x0, tmp20, None)
    tl.store(out_ptr1 + x0, tmp9, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_4(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    x0 = xindex
    r1 = rindex
    tmp0 = tl.load(in_ptr0 + x0 % 32, None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (r1 + 1024 * x0), None)
    tmp23 = tl.load(in_ptr2 + x0 % 32, None, eviction_policy='evict_last')
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp6 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp7 = tl.full([1], 1024, tl.int32)
    tmp8 = tmp7.to(tl.float32)
    tmp9 = tmp6 / tmp8
    tmp10 = tmp2 - tmp9
    tmp11 = tmp10 * tmp10
    tmp12 = tl.broadcast_to(tmp11, [RBLOCK])
    tmp14 = triton_helpers.promote_to_tensor(tl.sum(tmp12, 0))
    tmp15 = tmp1 - tmp9
    tmp16 = 1024.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tmp21 = tmp15 * tmp20
    tmp22 = tmp21 * tmp0
    tmp24 = tmp22 + tmp23
    tmp25 = 0.0
    tmp26 = tmp24 > tmp25
    tmp27 = 0.2
    tmp28 = tmp24 * tmp27
    tmp29 = tl.where(tmp26, tmp24, tmp28)
    tl.store(out_ptr0 + x0, tmp0, None)
    tl.store(in_out_ptr0 + (r1 + 1024 * x0), tmp29, None)
    tl.store(out_ptr3 + x0, tmp20, None)
    tl.store(out_ptr1 + x0, tmp9, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_5(in_out_ptr0,
    in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, xnumel, rnumel,
    XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 64
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0 % 16, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)
    tmp3_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp3_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp3_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp1 = tl.load(in_ptr1 + (r1 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_last', other=0.0)
        tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
        tmp3_mean_next, tmp3_m2_next, tmp3_weight_next = (triton_helpers.
            welford_reduce(tmp2, tmp3_mean, tmp3_m2, tmp3_weight, roffset == 0)
            )
        tmp3_mean = tl.where(rmask & xmask, tmp3_mean_next, tmp3_mean)
        tmp3_m2 = tl.where(rmask & xmask, tmp3_m2_next, tmp3_m2)
        tmp3_weight = tl.where(rmask & xmask, tmp3_weight_next, tmp3_weight)
    tmp3_tmp, tmp4_tmp, tmp5_tmp = triton_helpers.welford(tmp3_mean,
        tmp3_m2, tmp3_weight, 1)
    tmp3 = tmp3_tmp[:, None]
    tmp4 = tmp4_tmp[:, None]
    tmp5_tmp[:, None]
    tl.store(out_ptr1 + x0, tmp3, xmask)
    tmp15 = tl.load(in_ptr2 + x0 % 16, xmask, eviction_policy='evict_last')
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp6 = tl.load(in_ptr1 + (r1 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp7 = tmp6 - tmp3
        tmp8 = 4096.0
        tmp9 = tmp4 / tmp8
        tmp10 = 1e-05
        tmp11 = tmp9 + tmp10
        tmp12 = libdevice.rsqrt(tmp11)
        tmp13 = tmp7 * tmp12
        tmp14 = tmp13 * tmp0
        tmp16 = tmp14 + tmp15
        tmp17 = 0.0
        tmp18 = tmp16 > tmp17
        tmp19 = 0.2
        tmp20 = tmp16 * tmp19
        tmp21 = tl.where(tmp18, tmp16, tmp20)
        tl.store(in_out_ptr0 + (r1 + 4096 * x0), tmp21, rmask & xmask)
    tmp22 = 4096.0
    tmp23 = tmp4 / tmp22
    tmp24 = 1e-05
    tmp25 = tmp23 + tmp24
    tmp26 = libdevice.rsqrt(tmp25)
    tl.store(out_ptr3 + x0, tmp26, xmask)


@triton.jit
def triton_poi_fused_sigmoid_6(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.sigmoid(tmp0)
    tl.store(in_out_ptr0 + x0, tmp1, None)


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, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26) = args
    args.clear()
    assert_size_stride(primals_1, (32, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_2, (4, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_3, (64,), (1,))
    assert_size_stride(primals_4, (64,), (1,))
    assert_size_stride(primals_5, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_6, (128,), (1,))
    assert_size_stride(primals_7, (128,), (1,))
    assert_size_stride(primals_8, (128, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_9, (64,), (1,))
    assert_size_stride(primals_10, (64,), (1,))
    assert_size_stride(primals_11, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_12, (64,), (1,))
    assert_size_stride(primals_13, (64,), (1,))
    assert_size_stride(primals_14, (64, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_15, (32,), (1,))
    assert_size_stride(primals_16, (32,), (1,))
    assert_size_stride(primals_17, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_18, (32,), (1,))
    assert_size_stride(primals_19, (32,), (1,))
    assert_size_stride(primals_20, (32, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_21, (32,), (1,))
    assert_size_stride(primals_22, (32,), (1,))
    assert_size_stride(primals_23, (32, 16, 4, 4), (256, 16, 4, 1))
    assert_size_stride(primals_24, (16,), (1,))
    assert_size_stride(primals_25, (16,), (1,))
    assert_size_stride(primals_26, (4, 16, 1, 1), (16, 1, 1, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_2, primals_1, stride=(1, 
            1), padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf1 = empty_strided_cuda((256,), (1,), torch.float32)
        buf2 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch
            .float32)
        buf6 = empty_strided_cuda((1, 256, 4, 4), (4096, 16, 4, 1), torch.
            float32)
        buf7 = reinterpret_tensor(buf6, (4, 64, 4, 4), (1024, 16, 4, 1), 0)
        del buf6
        buf5 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch
            .float32)
        get_raw_stream(0)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_0[grid(256)
            ](buf7, primals_3, buf0, primals_4, buf1, buf2, buf5, 256, 16,
            XBLOCK=32, num_warps=4, num_stages=1)
        del primals_3
        del primals_4
        buf8 = extern_kernels.convolution(buf7, primals_5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 128, 4, 4), (2048, 16, 4, 1))
        buf9 = empty_strided_cuda((512,), (1,), torch.float32)
        buf10 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf14 = empty_strided_cuda((1, 512, 4, 4), (8192, 16, 4, 1), torch.
            float32)
        buf15 = reinterpret_tensor(buf14, (4, 128, 4, 4), (2048, 16, 4, 1), 0)
        del buf14
        buf13 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_1[grid(512)
            ](buf15, primals_6, buf8, primals_7, buf9, buf10, buf13, 512, 
            16, XBLOCK=32, num_warps=4, num_stages=1)
        del primals_6
        del primals_7
        buf16 = extern_kernels.convolution(buf15, primals_8, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf17 = empty_strided_cuda((256,), (1,), torch.float32)
        buf18 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf22 = empty_strided_cuda((1, 256, 8, 8), (16384, 64, 8, 1), torch
            .float32)
        buf23 = reinterpret_tensor(buf22, (4, 64, 8, 8), (4096, 64, 8, 1), 0)
        del buf22
        buf21 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2[grid(256)
            ](buf23, primals_9, buf16, primals_10, buf17, buf18, buf21, 256,
            64, XBLOCK=8, num_warps=4, num_stages=1)
        del primals_10
        del primals_9
        buf24 = extern_kernels.convolution(buf23, primals_11, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf25 = empty_strided_cuda((256,), (1,), torch.float32)
        buf26 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf30 = empty_strided_cuda((1, 256, 8, 8), (16384, 64, 8, 1), torch
            .float32)
        buf31 = reinterpret_tensor(buf30, (4, 64, 8, 8), (4096, 64, 8, 1), 0)
        del buf30
        buf29 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_2[grid(256)
            ](buf31, primals_12, buf24, primals_13, buf25, buf26, buf29, 
            256, 64, XBLOCK=8, num_warps=4, num_stages=1)
        del primals_12
        del primals_13
        buf32 = extern_kernels.convolution(buf31, primals_14, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf33 = empty_strided_cuda((128,), (1,), torch.float32)
        buf34 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf38 = empty_strided_cuda((1, 128, 16, 16), (32768, 256, 16, 1),
            torch.float32)
        buf39 = reinterpret_tensor(buf38, (4, 32, 16, 16), (8192, 256, 16, 
            1), 0)
        del buf38
        buf37 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3[grid(128)
            ](buf39, primals_15, buf32, primals_16, buf33, buf34, buf37, 
            128, 256, num_warps=2, num_stages=1)
        del primals_15
        del primals_16
        buf40 = extern_kernels.convolution(buf39, primals_17, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf41 = empty_strided_cuda((128,), (1,), torch.float32)
        buf42 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf46 = empty_strided_cuda((1, 128, 16, 16), (32768, 256, 16, 1),
            torch.float32)
        buf47 = reinterpret_tensor(buf46, (4, 32, 16, 16), (8192, 256, 16, 
            1), 0)
        del buf46
        buf45 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_3[grid(128)
            ](buf47, primals_18, buf40, primals_19, buf41, buf42, buf45, 
            128, 256, num_warps=2, num_stages=1)
        del primals_18
        del primals_19
        buf48 = extern_kernels.convolution(buf47, primals_20, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf48, (4, 32, 32, 32), (32768, 1024, 32, 1))
        buf49 = empty_strided_cuda((128,), (1,), torch.float32)
        buf50 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf54 = empty_strided_cuda((1, 128, 32, 32), (131072, 1024, 32, 1),
            torch.float32)
        buf55 = reinterpret_tensor(buf54, (4, 32, 32, 32), (32768, 1024, 32,
            1), 0)
        del buf54
        buf53 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_leaky_relu_repeat_4[grid(128)
            ](buf55, primals_21, buf48, primals_22, buf49, buf50, buf53, 
            128, 1024, num_warps=8, num_stages=1)
        del primals_21
        del primals_22
        buf56 = extern_kernels.convolution(buf55, primals_23, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=True,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf56, (4, 16, 64, 64), (65536, 4096, 64, 1))
        buf57 = empty_strided_cuda((64,), (1,), torch.float32)
        buf58 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.
            float32)
        buf62 = empty_strided_cuda((1, 64, 64, 64), (262144, 4096, 64, 1),
            torch.float32)
        buf63 = reinterpret_tensor(buf62, (4, 16, 64, 64), (65536, 4096, 64,
            1), 0)
        del buf62
        buf61 = empty_strided_cuda((1, 64, 1, 1), (64, 1, 64, 64), torch.
            float32)
        triton_red_fused__native_batch_norm_legit_leaky_relu_repeat_5[grid(64)
            ](buf63, primals_24, buf56, primals_25, buf57, buf58, buf61, 64,
            4096, XBLOCK=1, RBLOCK=2048, num_warps=16, num_stages=1)
        del primals_24
        del primals_25
        buf64 = extern_kernels.convolution(buf63, primals_26, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf65 = buf64
        del buf64
        triton_poi_fused_sigmoid_6[grid(65536)](buf65, 65536, XBLOCK=512,
            num_warps=4, num_stages=1)
    return (buf65, primals_1, primals_2, primals_5, primals_8, primals_11,
        primals_14, primals_17, primals_20, primals_23, primals_26, buf0,
        buf1, reinterpret_tensor(buf5, (256,), (1,), 0), buf7, buf8, buf9,
        reinterpret_tensor(buf13, (512,), (1,), 0), buf15, buf16, buf17,
        reinterpret_tensor(buf21, (256,), (1,), 0), buf23, buf24, buf25,
        reinterpret_tensor(buf29, (256,), (1,), 0), buf31, buf32, buf33,
        reinterpret_tensor(buf37, (128,), (1,), 0), buf39, buf40, buf41,
        reinterpret_tensor(buf45, (128,), (1,), 0), buf47, buf48, buf49,
        reinterpret_tensor(buf53, (128,), (1,), 0), buf55, buf56, buf57,
        reinterpret_tensor(buf61, (64,), (1,), 0), buf63, buf65,
        reinterpret_tensor(buf58, (1, 64, 1, 1), (64, 1, 1, 1), 0),
        reinterpret_tensor(buf50, (1, 128, 1, 1), (128, 1, 1, 1), 0),
        reinterpret_tensor(buf42, (1, 128, 1, 1), (128, 1, 1, 1), 0),
        reinterpret_tensor(buf34, (1, 128, 1, 1), (128, 1, 1, 1), 0),
        reinterpret_tensor(buf26, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf18, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf10, (1, 512, 1, 1), (512, 1, 1, 1), 0),
        reinterpret_tensor(buf2, (1, 256, 1, 1), (256, 1, 1, 1), 0))


class INConv(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride=1,
        padding=0, dilation=1, groups=1, relu=True, ins_n=True, bias=False):
        super(INConv, self).__init__()
        self.out_channels = out_planes
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=
            kernel_size, stride=stride, padding=padding, dilation=dilation,
            groups=groups, bias=bias)
        self.ins_n = nn.InstanceNorm2d(out_planes, affine=True
            ) if ins_n else None
        self.relu = nn.ReLU(inplace=True) if relu else None

    def forward(self, x):
        x = self.conv(x)
        if self.ins_n is not None:
            x = self.ins_n(x)
        if self.relu is not None:
            x = self.relu(x)
        return x


class INDeConv(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride=1,
        padding=0, out_padding=0, dilation=1, groups=1, relu=True, ins_n=
        True, bias=False):
        super(INDeConv, self).__init__()
        self.out_channels = out_planes
        self.conv = nn.ConvTranspose2d(in_planes, out_planes, kernel_size=
            kernel_size, stride=stride, padding=padding, output_padding=
            out_padding, dilation=dilation, groups=groups, bias=bias)
        self.ins_n = nn.InstanceNorm2d(out_planes, affine=True
            ) if ins_n else None
        self.relu = nn.ReLU(inplace=True) if relu else None

    def forward(self, x):
        x = self.conv(x)
        if self.ins_n is not None:
            x = self.ins_n(x)
        if self.relu is not None:
            x = self.relu(x)
        return x


class DecoderNew(nn.Module):

    def __init__(self, img_channel):
        super(DecoderNew, self).__init__()
        self.deconv1 = INDeConv(in_planes=32, out_planes=64, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation1 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv2 = INDeConv(in_planes=64, out_planes=128, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation2 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv3 = INDeConv(in_planes=128, out_planes=64, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation3 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv4 = INDeConv(in_planes=64, out_planes=64, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation4 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv5 = INDeConv(in_planes=64, out_planes=32, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation5 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv6 = INDeConv(in_planes=32, out_planes=32, kernel_size=3,
            stride=1, padding=1, relu=False)
        self.activation6 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv7 = INDeConv(in_planes=32, out_planes=32, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation7 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.deconv8 = INDeConv(in_planes=32, out_planes=16, kernel_size=4,
            stride=2, padding=1, relu=False)
        self.activation8 = nn.LeakyReLU(inplace=True, negative_slope=0.2)
        self.output = INConv(in_planes=16, out_planes=img_channel,
            kernel_size=1, stride=1, padding=0, ins_n=False, relu=False)
        self.activation9 = nn.Sigmoid()

    def forward(self, input_0):
        primals_1 = self.deconv1.conv.weight
        primals_3 = self.deconv1.ins_n.weight
        primals_4 = self.deconv1.ins_n.bias
        primals_5 = self.deconv2.conv.weight
        primals_6 = self.deconv2.ins_n.weight
        primals_7 = self.deconv2.ins_n.bias
        primals_8 = self.deconv3.conv.weight
        primals_9 = self.deconv3.ins_n.weight
        primals_10 = self.deconv3.ins_n.bias
        primals_11 = self.deconv4.conv.weight
        primals_12 = self.deconv4.ins_n.weight
        primals_13 = self.deconv4.ins_n.bias
        primals_14 = self.deconv5.conv.weight
        primals_15 = self.deconv5.ins_n.weight
        primals_16 = self.deconv5.ins_n.bias
        primals_17 = self.deconv6.conv.weight
        primals_18 = self.deconv6.ins_n.weight
        primals_19 = self.deconv6.ins_n.bias
        primals_20 = self.deconv7.conv.weight
        primals_21 = self.deconv7.ins_n.weight
        primals_22 = self.deconv7.ins_n.bias
        primals_23 = self.deconv8.conv.weight
        primals_24 = self.deconv8.ins_n.weight
        primals_25 = self.deconv8.ins_n.bias
        primals_26 = self.output.conv.weight
        primals_2 = input_0
        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, primals_21, primals_22, primals_23, primals_24,
            primals_25, primals_26])
        return output[0]
