# 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_1/inductor_cache/mb/cmbojyq672q6azyet3zlhlikzyc4ptoqkybahsdk76pmj5qljz4n.py
# Topologically Sorted Source Nodes: [cat], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat => cat
# Graph fragment:
#   %cat : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%primals_3, %where], 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=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 16) % 36
    x0 = xindex % 16
    x2 = (xindex // 576)
    x3 = xindex
    tmp0 = x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + (16*x1) + (64*x2)), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tl.load(in_ptr1 + (x0 + (16*((-4) + x1)) + (512*x2)), tmp6 & xmask, other=0.0)
    tmp10 = tl.load(in_ptr2 + ((-4) + x1), tmp6 & xmask, eviction_policy='evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = 0.0
    tmp13 = tmp11 > tmp12
    tmp14 = 0.2
    tmp15 = tmp11 * tmp14
    tmp16 = tl.where(tmp13, tmp11, tmp15)
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp6, tmp16, tmp17)
    tmp19 = tl.where(tmp4, tmp5, tmp18)
    tl.store(out_ptr0 + (x3), tmp19, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/gc/cgcjnpvqduihzm57rfdaoxikl5vcmgt2sy7q7y666mevlzdqttlz.py
# Topologically Sorted Source Nodes: [cat_1], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat_1 => cat_1
# Graph fragment:
#   %cat_1 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%primals_3, %where, %where_1], 1), kwargs = {})
triton_poi_fused_cat_1 = async_compile.triton('triton_poi_fused_cat_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_1(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4352
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 16) % 68
    x0 = xindex % 16
    x2 = (xindex // 1088)
    x3 = xindex
    tmp0 = x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + (16*x1) + (64*x2)), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + (16*((-4) + x1)) + (512*x2)), tmp9 & xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + ((-4) + x1), tmp9 & xmask, eviction_policy='evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tmp21 = tl.full([1], 68, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tl.load(in_ptr3 + (x0 + (16*((-36) + x1)) + (512*x2)), tmp20 & xmask, other=0.0)
    tmp24 = tl.load(in_ptr4 + ((-36) + x1), tmp20 & xmask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tmp25 > tmp13
    tmp27 = tmp25 * tmp15
    tmp28 = tl.where(tmp26, tmp25, tmp27)
    tmp29 = tl.full(tmp28.shape, 0.0, tmp28.dtype)
    tmp30 = tl.where(tmp20, tmp28, tmp29)
    tmp31 = tl.where(tmp9, tmp19, tmp30)
    tmp32 = tl.where(tmp4, tmp5, tmp31)
    tl.store(out_ptr0 + (x3), tmp32, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/xj/cxjondky22j333xa5ah5xr5txd3rbewfdcgsofom2gjd2sy6c54x.py
# Topologically Sorted Source Nodes: [cat_2], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat_2 => cat_2
# Graph fragment:
#   %cat_2 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%primals_3, %where, %where_1, %where_2], 1), kwargs = {})
triton_poi_fused_cat_2 = async_compile.triton('triton_poi_fused_cat_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), '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_poi_fused_cat_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 7, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_2(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 6400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 16) % 100
    x0 = xindex % 16
    x2 = (xindex // 1600)
    x3 = xindex
    tmp0 = x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + (16*x1) + (64*x2)), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + (16*((-4) + x1)) + (512*x2)), tmp9 & xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + ((-4) + x1), tmp9 & xmask, eviction_policy='evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tmp21 = tl.full([1], 68, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tmp20 & tmp22
    tmp24 = tl.load(in_ptr3 + (x0 + (16*((-36) + x1)) + (512*x2)), tmp23 & xmask, other=0.0)
    tmp25 = tl.load(in_ptr4 + ((-36) + x1), tmp23 & xmask, eviction_policy='evict_last', other=0.0)
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp13
    tmp28 = tmp26 * tmp15
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp30 = tl.full(tmp29.shape, 0.0, tmp29.dtype)
    tmp31 = tl.where(tmp23, tmp29, tmp30)
    tmp32 = tmp0 >= tmp21
    tmp33 = tl.full([1], 100, tl.int64)
    tmp34 = tmp0 < tmp33
    tmp35 = tl.load(in_ptr5 + (x0 + (16*((-68) + x1)) + (512*x2)), tmp32 & xmask, other=0.0)
    tmp36 = tl.load(in_ptr6 + ((-68) + x1), tmp32 & xmask, eviction_policy='evict_last', other=0.0)
    tmp37 = tmp35 + tmp36
    tmp38 = tmp37 > tmp13
    tmp39 = tmp37 * tmp15
    tmp40 = tl.where(tmp38, tmp37, tmp39)
    tmp41 = tl.full(tmp40.shape, 0.0, tmp40.dtype)
    tmp42 = tl.where(tmp32, tmp40, tmp41)
    tmp43 = tl.where(tmp23, tmp31, tmp42)
    tmp44 = tl.where(tmp9, tmp19, tmp43)
    tmp45 = tl.where(tmp4, tmp5, tmp44)
    tl.store(out_ptr0 + (x3), tmp45, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/gq/cgqy6n6iplpix6bd5zrklvka6x3imtmj6kqyplgfksznh7s57dpb.py
# Topologically Sorted Source Nodes: [cat_3], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat_3 => cat_3
# Graph fragment:
#   %cat_3 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%primals_3, %where, %where_1, %where_2, %where_3], 1), kwargs = {})
triton_poi_fused_cat_3 = async_compile.triton('triton_poi_fused_cat_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=[16384], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: '*fp32', 10: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8448
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 16) % 132
    x0 = xindex % 16
    x2 = (xindex // 2112)
    x3 = xindex
    tmp0 = x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + (16*x1) + (64*x2)), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + (16*((-4) + x1)) + (512*x2)), tmp9 & xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + ((-4) + x1), tmp9 & xmask, eviction_policy='evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tmp21 = tl.full([1], 68, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tmp20 & tmp22
    tmp24 = tl.load(in_ptr3 + (x0 + (16*((-36) + x1)) + (512*x2)), tmp23 & xmask, other=0.0)
    tmp25 = tl.load(in_ptr4 + ((-36) + x1), tmp23 & xmask, eviction_policy='evict_last', other=0.0)
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp13
    tmp28 = tmp26 * tmp15
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp30 = tl.full(tmp29.shape, 0.0, tmp29.dtype)
    tmp31 = tl.where(tmp23, tmp29, tmp30)
    tmp32 = tmp0 >= tmp21
    tmp33 = tl.full([1], 100, tl.int64)
    tmp34 = tmp0 < tmp33
    tmp35 = tmp32 & tmp34
    tmp36 = tl.load(in_ptr5 + (x0 + (16*((-68) + x1)) + (512*x2)), tmp35 & xmask, other=0.0)
    tmp37 = tl.load(in_ptr6 + ((-68) + x1), tmp35 & xmask, eviction_policy='evict_last', other=0.0)
    tmp38 = tmp36 + tmp37
    tmp39 = tmp38 > tmp13
    tmp40 = tmp38 * tmp15
    tmp41 = tl.where(tmp39, tmp38, tmp40)
    tmp42 = tl.full(tmp41.shape, 0.0, tmp41.dtype)
    tmp43 = tl.where(tmp35, tmp41, tmp42)
    tmp44 = tmp0 >= tmp33
    tmp45 = tl.full([1], 132, tl.int64)
    tmp46 = tmp0 < tmp45
    tmp47 = tl.load(in_ptr7 + (x0 + (16*((-100) + x1)) + (512*x2)), tmp44 & xmask, other=0.0)
    tmp48 = tl.load(in_ptr8 + ((-100) + x1), tmp44 & xmask, eviction_policy='evict_last', other=0.0)
    tmp49 = tmp47 + tmp48
    tmp50 = tmp49 > tmp13
    tmp51 = tmp49 * tmp15
    tmp52 = tl.where(tmp50, tmp49, tmp51)
    tmp53 = tl.full(tmp52.shape, 0.0, tmp52.dtype)
    tmp54 = tl.where(tmp44, tmp52, tmp53)
    tmp55 = tl.where(tmp35, tmp43, tmp54)
    tmp56 = tl.where(tmp23, tmp31, tmp55)
    tmp57 = tl.where(tmp9, tmp19, tmp56)
    tmp58 = tl.where(tmp4, tmp5, tmp57)
    tl.store(out_ptr0 + (x3), tmp58, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/h7/ch7sh2cdou4nxvdoxq3axaxa26zqy7k46oogec7rhlobuxvees5e.py
# Topologically Sorted Source Nodes: [x5, mul, out], Original ATen: [aten.convolution, aten.mul, aten.add]
# Source node to ATen node mapping:
#   mul => mul_4
#   out => add
#   x5 => convolution_4
# Graph fragment:
#   %convolution_4 : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_3, %primals_10, %primals_11, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %mul_4 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_4, 0.2), kwargs = {})
#   %add : [num_users=7] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_4, %primals_3), kwargs = {})
triton_poi_fused_add_convolution_mul_4 = async_compile.triton('triton_poi_fused_add_convolution_mul_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=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_convolution_mul_4', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_add_convolution_mul_4(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 16) % 4
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (x3), xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.2
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 + tmp5
    tl.store(in_out_ptr0 + (x3), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/ec/ceccrz4wxoygm52iievslzcfslxqbdwkef4olj3fqqr4wo7knkek.py
# Topologically Sorted Source Nodes: [x5_2, mul_2, out_2, mul_3, add_3], Original ATen: [aten.convolution, aten.mul, aten.add]
# Source node to ATen node mapping:
#   add_3 => add_3
#   mul_2 => mul_14
#   mul_3 => mul_15
#   out_2 => add_2
#   x5_2 => convolution_14
# Graph fragment:
#   %convolution_14 : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_11, %primals_30, %primals_31, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %mul_14 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_14, 0.2), kwargs = {})
#   %add_2 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_14, %add_1), kwargs = {})
#   %mul_15 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_2, 0.2), kwargs = {})
#   %add_3 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_15, %primals_3), kwargs = {})
triton_poi_fused_add_convolution_mul_5 = async_compile.triton('triton_poi_fused_add_convolution_mul_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.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_convolution_mul_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_add_convolution_mul_5(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 16) % 4
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (x3), xmask)
    tmp8 = tl.load(in_ptr2 + (x3), xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.2
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 + tmp5
    tmp7 = tmp6 * tmp3
    tmp9 = tmp7 + tmp8
    tl.store(in_out_ptr0 + (x3), tmp9, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_1/inductor_cache/do/cdobohkqj4j4foru3eiz3y25d36l2jhmbgope5icgsecb6yfesls.py
# Topologically Sorted Source Nodes: [conv2d_13, x4_2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   conv2d_13 => convolution_13
#   x4_2 => gt_11, mul_13, where_11
# Graph fragment:
#   %convolution_13 : [num_users=3] = call_function[target=torch.ops.aten.convolution.default](args = (%cat_10, %primals_28, %primals_29, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %gt_11 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_13, 0), kwargs = {})
#   %mul_13 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_13, 0.2), kwargs = {})
#   %where_11 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_11, %convolution_13, %mul_13), kwargs = {})
#   %gt_12 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_11, 0), kwargs = {})
triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6 = async_compile.triton('triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_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=[2048], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*i1', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'B098E03CDA7B8ADC90DAFFDF24A2956451D1B13F297756A5DCC209498AA53705', '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_leaky_relu_leaky_relu_backward_6(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2048
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = (xindex // 16) % 32
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x1), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + (x3), tmp8, 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, primals_27, primals_28, primals_29, primals_30, primals_31 = args
    args.clear()
    assert_size_stride(primals_1, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_2, (32, ), (1, ))
    assert_size_stride(primals_3, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_4, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_5, (32, ), (1, ))
    assert_size_stride(primals_6, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_7, (32, ), (1, ))
    assert_size_stride(primals_8, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_9, (32, ), (1, ))
    assert_size_stride(primals_10, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_11, (4, ), (1, ))
    assert_size_stride(primals_12, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_13, (32, ), (1, ))
    assert_size_stride(primals_14, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_15, (32, ), (1, ))
    assert_size_stride(primals_16, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_17, (32, ), (1, ))
    assert_size_stride(primals_18, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_19, (32, ), (1, ))
    assert_size_stride(primals_20, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_21, (4, ), (1, ))
    assert_size_stride(primals_22, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_23, (32, ), (1, ))
    assert_size_stride(primals_24, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_25, (32, ), (1, ))
    assert_size_stride(primals_26, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_27, (32, ), (1, ))
    assert_size_stride(primals_28, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_29, (32, ), (1, ))
    assert_size_stride(primals_30, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_31, (4, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        # Topologically Sorted Source Nodes: [conv2d], Original ATen: [aten.convolution]
        buf0 = extern_kernels.convolution(primals_3, primals_1, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 32, 4, 4), (512, 16, 4, 1))
        buf1 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat], Original ATen: [aten.cat]
        stream0 = get_raw_stream(0)
        triton_poi_fused_cat_0.run(primals_3, buf0, primals_2, buf1, 2304, grid=grid(2304), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_1], Original ATen: [aten.convolution]
        buf2 = extern_kernels.convolution(buf1, primals_4, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 32, 4, 4), (512, 16, 4, 1))
        buf3 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_1], Original ATen: [aten.cat]
        triton_poi_fused_cat_1.run(primals_3, buf0, primals_2, buf2, primals_5, buf3, 4352, grid=grid(4352), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_2], Original ATen: [aten.convolution]
        buf4 = extern_kernels.convolution(buf3, primals_6, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 32, 4, 4), (512, 16, 4, 1))
        buf5 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_2], Original ATen: [aten.cat]
        triton_poi_fused_cat_2.run(primals_3, buf0, primals_2, buf2, primals_5, buf4, primals_7, buf5, 6400, grid=grid(6400), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_3], Original ATen: [aten.convolution]
        buf6 = extern_kernels.convolution(buf5, primals_8, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 32, 4, 4), (512, 16, 4, 1))
        buf7 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_3], Original ATen: [aten.cat]
        triton_poi_fused_cat_3.run(primals_3, buf0, primals_2, buf2, primals_5, buf4, primals_7, buf6, primals_9, buf7, 8448, grid=grid(8448), stream=stream0)
        # Topologically Sorted Source Nodes: [x5], Original ATen: [aten.convolution]
        buf8 = extern_kernels.convolution(buf7, primals_10, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 4, 4, 4), (64, 16, 4, 1))
        buf9 = buf8; del buf8  # reuse
        # Topologically Sorted Source Nodes: [x5, mul, out], Original ATen: [aten.convolution, aten.mul, aten.add]
        triton_poi_fused_add_convolution_mul_4.run(buf9, primals_11, primals_3, 256, grid=grid(256), stream=stream0)
        del primals_11
        # Topologically Sorted Source Nodes: [conv2d_5], Original ATen: [aten.convolution]
        buf10 = extern_kernels.convolution(buf9, primals_12, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 32, 4, 4), (512, 16, 4, 1))
        buf11 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_4], Original ATen: [aten.cat]
        triton_poi_fused_cat_0.run(buf9, buf10, primals_13, buf11, 2304, grid=grid(2304), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_6], Original ATen: [aten.convolution]
        buf12 = extern_kernels.convolution(buf11, primals_14, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 32, 4, 4), (512, 16, 4, 1))
        buf13 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_5], Original ATen: [aten.cat]
        triton_poi_fused_cat_1.run(buf9, buf10, primals_13, buf12, primals_15, buf13, 4352, grid=grid(4352), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_7], Original ATen: [aten.convolution]
        buf14 = extern_kernels.convolution(buf13, primals_16, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 32, 4, 4), (512, 16, 4, 1))
        buf15 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_6], Original ATen: [aten.cat]
        triton_poi_fused_cat_2.run(buf9, buf10, primals_13, buf12, primals_15, buf14, primals_17, buf15, 6400, grid=grid(6400), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_8], Original ATen: [aten.convolution]
        buf16 = extern_kernels.convolution(buf15, primals_18, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 32, 4, 4), (512, 16, 4, 1))
        buf17 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_7], Original ATen: [aten.cat]
        triton_poi_fused_cat_3.run(buf9, buf10, primals_13, buf12, primals_15, buf14, primals_17, buf16, primals_19, buf17, 8448, grid=grid(8448), stream=stream0)
        # Topologically Sorted Source Nodes: [x5_1], Original ATen: [aten.convolution]
        buf18 = extern_kernels.convolution(buf17, primals_20, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 4, 4, 4), (64, 16, 4, 1))
        buf19 = buf18; del buf18  # reuse
        # Topologically Sorted Source Nodes: [x5_1, mul_1, out_1], Original ATen: [aten.convolution, aten.mul, aten.add]
        triton_poi_fused_add_convolution_mul_4.run(buf19, primals_21, buf9, 256, grid=grid(256), stream=stream0)
        del primals_21
        # Topologically Sorted Source Nodes: [conv2d_10], Original ATen: [aten.convolution]
        buf20 = extern_kernels.convolution(buf19, primals_22, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 32, 4, 4), (512, 16, 4, 1))
        buf21 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_8], Original ATen: [aten.cat]
        triton_poi_fused_cat_0.run(buf19, buf20, primals_23, buf21, 2304, grid=grid(2304), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_11], Original ATen: [aten.convolution]
        buf22 = extern_kernels.convolution(buf21, primals_24, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 32, 4, 4), (512, 16, 4, 1))
        buf23 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_9], Original ATen: [aten.cat]
        triton_poi_fused_cat_1.run(buf19, buf20, primals_23, buf22, primals_25, buf23, 4352, grid=grid(4352), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_12], Original ATen: [aten.convolution]
        buf24 = extern_kernels.convolution(buf23, primals_26, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 32, 4, 4), (512, 16, 4, 1))
        buf25 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_10], Original ATen: [aten.cat]
        triton_poi_fused_cat_2.run(buf19, buf20, primals_23, buf22, primals_25, buf24, primals_27, buf25, 6400, grid=grid(6400), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_13], Original ATen: [aten.convolution]
        buf26 = extern_kernels.convolution(buf25, primals_28, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 32, 4, 4), (512, 16, 4, 1))
        buf27 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_11], Original ATen: [aten.cat]
        triton_poi_fused_cat_3.run(buf19, buf20, primals_23, buf22, primals_25, buf24, primals_27, buf26, primals_29, buf27, 8448, grid=grid(8448), stream=stream0)
        # Topologically Sorted Source Nodes: [x5_2], Original ATen: [aten.convolution]
        buf28 = extern_kernels.convolution(buf27, primals_30, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 4, 4, 4), (64, 16, 4, 1))
        buf29 = buf28; del buf28  # reuse
        # Topologically Sorted Source Nodes: [x5_2, mul_2, out_2, mul_3, add_3], Original ATen: [aten.convolution, aten.mul, aten.add]
        triton_poi_fused_add_convolution_mul_5.run(buf29, primals_31, buf19, primals_3, 256, grid=grid(256), stream=stream0)
        del primals_31
        buf30 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_13, x4_2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf26, primals_29, buf30, 2048, grid=grid(2048), stream=stream0)
        del buf26
        del primals_29
        buf31 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_12, x3_2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf24, primals_27, buf31, 2048, grid=grid(2048), stream=stream0)
        del buf24
        del primals_27
        buf32 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_11, x2_2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf22, primals_25, buf32, 2048, grid=grid(2048), stream=stream0)
        del buf22
        del primals_25
        buf33 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_10, x1_2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf20, primals_23, buf33, 2048, grid=grid(2048), stream=stream0)
        del buf20
        del primals_23
        buf34 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_8, x4_1], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf16, primals_19, buf34, 2048, grid=grid(2048), stream=stream0)
        del buf16
        del primals_19
        buf35 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_7, x3_1], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf14, primals_17, buf35, 2048, grid=grid(2048), stream=stream0)
        del buf14
        del primals_17
        buf36 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_6, x2_1], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf12, primals_15, buf36, 2048, grid=grid(2048), stream=stream0)
        del buf12
        del primals_15
        buf37 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_5, x1_1], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf10, primals_13, buf37, 2048, grid=grid(2048), stream=stream0)
        del buf10
        del primals_13
        buf38 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_3, x4], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf6, primals_9, buf38, 2048, grid=grid(2048), stream=stream0)
        del buf6
        del primals_9
        buf39 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_2, x3], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf4, primals_7, buf39, 2048, grid=grid(2048), stream=stream0)
        del buf4
        del primals_7
        buf40 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d_1, x2], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf2, primals_5, buf40, 2048, grid=grid(2048), stream=stream0)
        del buf2
        del primals_5
        buf41 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv2d, x1], Original ATen: [aten.convolution, aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6.run(buf0, primals_2, buf41, 2048, grid=grid(2048), stream=stream0)
        del buf0
        del primals_2
    return (buf29, primals_1, primals_3, primals_4, primals_6, primals_8, primals_10, primals_12, primals_14, primals_16, primals_18, primals_20, primals_22, primals_24, primals_26, primals_28, primals_30, buf1, buf3, buf5, buf7, buf9, buf11, buf13, buf15, buf17, buf19, buf21, buf23, buf25, buf27, buf30, buf31, buf32, buf33, buf34, buf35, buf36, buf37, buf38, buf39, buf40, buf41, )


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, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((4, 4, 4, 4), (64, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((32, 36, 3, 3), (324, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((32, 68, 3, 3), (612, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((32, 100, 3, 3), (900, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((4, 132, 3, 3), (1188, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((32, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((32, 36, 3, 3), (324, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((32, 68, 3, 3), (612, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((32, 100, 3, 3), (900, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((4, 132, 3, 3), (1188, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_21 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_22 = rand_strided((32, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_23 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_24 = rand_strided((32, 36, 3, 3), (324, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_25 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_26 = rand_strided((32, 68, 3, 3), (612, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_27 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_28 = rand_strided((32, 100, 3, 3), (900, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_29 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_30 = rand_strided((4, 132, 3, 3), (1188, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_31 = rand_strided((4, ), (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, primals_27, primals_28, primals_29, primals_30, primals_31])
    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
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch.utils import data as data
import torch.nn as nn
from torch.nn import init as init
from torch.nn.modules.batchnorm import _BatchNorm
from torchvision.models import vgg as vgg
from torch import autograd as autograd
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused_cat_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 36
    x0 = xindex % 16
    x2 = xindex // 576
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 64 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 36, tl.int64)
    tmp9 = tl.load(in_ptr1 + (x0 + 16 * (-4 + x1) + 512 * x2), tmp6 & xmask,
        other=0.0)
    tmp10 = tl.load(in_ptr2 + (-4 + x1), tmp6 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp9 + tmp10
    tmp12 = 0.0
    tmp13 = tmp11 > tmp12
    tmp14 = 0.2
    tmp15 = tmp11 * tmp14
    tmp16 = tl.where(tmp13, tmp11, tmp15)
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp6, tmp16, tmp17)
    tmp19 = tl.where(tmp4, tmp5, tmp18)
    tl.store(out_ptr0 + x3, tmp19, xmask)


@triton.jit
def triton_poi_fused_cat_1(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 4352
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 68
    x0 = xindex % 16
    x2 = xindex // 1088
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 64 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-4 + x1) + 512 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-4 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tl.full([1], 68, tl.int64)
    tmp23 = tl.load(in_ptr3 + (x0 + 16 * (-36 + x1) + 512 * x2), tmp20 &
        xmask, other=0.0)
    tmp24 = tl.load(in_ptr4 + (-36 + x1), tmp20 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tmp25 > tmp13
    tmp27 = tmp25 * tmp15
    tmp28 = tl.where(tmp26, tmp25, tmp27)
    tmp29 = tl.full(tmp28.shape, 0.0, tmp28.dtype)
    tmp30 = tl.where(tmp20, tmp28, tmp29)
    tmp31 = tl.where(tmp9, tmp19, tmp30)
    tmp32 = tl.where(tmp4, tmp5, tmp31)
    tl.store(out_ptr0 + x3, tmp32, xmask)


@triton.jit
def triton_poi_fused_cat_2(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 6400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 100
    x0 = xindex % 16
    x2 = xindex // 1600
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 64 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-4 + x1) + 512 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-4 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tmp21 = tl.full([1], 68, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tmp20 & tmp22
    tmp24 = tl.load(in_ptr3 + (x0 + 16 * (-36 + x1) + 512 * x2), tmp23 &
        xmask, other=0.0)
    tmp25 = tl.load(in_ptr4 + (-36 + x1), tmp23 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp13
    tmp28 = tmp26 * tmp15
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp30 = tl.full(tmp29.shape, 0.0, tmp29.dtype)
    tmp31 = tl.where(tmp23, tmp29, tmp30)
    tmp32 = tmp0 >= tmp21
    tl.full([1], 100, tl.int64)
    tmp35 = tl.load(in_ptr5 + (x0 + 16 * (-68 + x1) + 512 * x2), tmp32 &
        xmask, other=0.0)
    tmp36 = tl.load(in_ptr6 + (-68 + x1), tmp32 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp37 = tmp35 + tmp36
    tmp38 = tmp37 > tmp13
    tmp39 = tmp37 * tmp15
    tmp40 = tl.where(tmp38, tmp37, tmp39)
    tmp41 = tl.full(tmp40.shape, 0.0, tmp40.dtype)
    tmp42 = tl.where(tmp32, tmp40, tmp41)
    tmp43 = tl.where(tmp23, tmp31, tmp42)
    tmp44 = tl.where(tmp9, tmp19, tmp43)
    tmp45 = tl.where(tmp4, tmp5, tmp44)
    tl.store(out_ptr0 + x3, tmp45, xmask)


@triton.jit
def triton_poi_fused_cat_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 8448
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 16 % 132
    x0 = xindex % 16
    x2 = xindex // 2112
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 16 * x1 + 64 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 36, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 16 * (-4 + x1) + 512 * x2), tmp9 &
        xmask, other=0.0)
    tmp11 = tl.load(in_ptr2 + (-4 + x1), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp12 = tmp10 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.2
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tl.full(tmp17.shape, 0.0, tmp17.dtype)
    tmp19 = tl.where(tmp9, tmp17, tmp18)
    tmp20 = tmp0 >= tmp7
    tmp21 = tl.full([1], 68, tl.int64)
    tmp22 = tmp0 < tmp21
    tmp23 = tmp20 & tmp22
    tmp24 = tl.load(in_ptr3 + (x0 + 16 * (-36 + x1) + 512 * x2), tmp23 &
        xmask, other=0.0)
    tmp25 = tl.load(in_ptr4 + (-36 + x1), tmp23 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp13
    tmp28 = tmp26 * tmp15
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp30 = tl.full(tmp29.shape, 0.0, tmp29.dtype)
    tmp31 = tl.where(tmp23, tmp29, tmp30)
    tmp32 = tmp0 >= tmp21
    tmp33 = tl.full([1], 100, tl.int64)
    tmp34 = tmp0 < tmp33
    tmp35 = tmp32 & tmp34
    tmp36 = tl.load(in_ptr5 + (x0 + 16 * (-68 + x1) + 512 * x2), tmp35 &
        xmask, other=0.0)
    tmp37 = tl.load(in_ptr6 + (-68 + x1), tmp35 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp38 = tmp36 + tmp37
    tmp39 = tmp38 > tmp13
    tmp40 = tmp38 * tmp15
    tmp41 = tl.where(tmp39, tmp38, tmp40)
    tmp42 = tl.full(tmp41.shape, 0.0, tmp41.dtype)
    tmp43 = tl.where(tmp35, tmp41, tmp42)
    tmp44 = tmp0 >= tmp33
    tl.full([1], 132, tl.int64)
    tmp47 = tl.load(in_ptr7 + (x0 + 16 * (-100 + x1) + 512 * x2), tmp44 &
        xmask, other=0.0)
    tmp48 = tl.load(in_ptr8 + (-100 + x1), tmp44 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp49 = tmp47 + tmp48
    tmp50 = tmp49 > tmp13
    tmp51 = tmp49 * tmp15
    tmp52 = tl.where(tmp50, tmp49, tmp51)
    tmp53 = tl.full(tmp52.shape, 0.0, tmp52.dtype)
    tmp54 = tl.where(tmp44, tmp52, tmp53)
    tmp55 = tl.where(tmp35, tmp43, tmp54)
    tmp56 = tl.where(tmp23, tmp31, tmp55)
    tmp57 = tl.where(tmp9, tmp19, tmp56)
    tmp58 = tl.where(tmp4, tmp5, tmp57)
    tl.store(out_ptr0 + x3, tmp58, xmask)


@triton.jit
def triton_poi_fused_add_convolution_mul_4(in_out_ptr0, in_ptr0, in_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 4
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x3, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.2
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 + tmp5
    tl.store(in_out_ptr0 + x3, tmp6, xmask)


@triton.jit
def triton_poi_fused_add_convolution_mul_5(in_out_ptr0, in_ptr0, in_ptr1,
    in_ptr2, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 16 % 4
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x3, xmask)
    tmp8 = tl.load(in_ptr2 + x3, xmask)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.2
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 + tmp5
    tmp7 = tmp6 * tmp3
    tmp9 = tmp7 + tmp8
    tl.store(in_out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6(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)
    x3 = xindex
    x1 = xindex // 16 % 32
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, 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, primals_27,
        primals_28, primals_29, primals_30, primals_31) = args
    args.clear()
    assert_size_stride(primals_1, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_2, (32,), (1,))
    assert_size_stride(primals_3, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_4, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_5, (32,), (1,))
    assert_size_stride(primals_6, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_7, (32,), (1,))
    assert_size_stride(primals_8, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_9, (32,), (1,))
    assert_size_stride(primals_10, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_11, (4,), (1,))
    assert_size_stride(primals_12, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_13, (32,), (1,))
    assert_size_stride(primals_14, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_15, (32,), (1,))
    assert_size_stride(primals_16, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_17, (32,), (1,))
    assert_size_stride(primals_18, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_19, (32,), (1,))
    assert_size_stride(primals_20, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_21, (4,), (1,))
    assert_size_stride(primals_22, (32, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_23, (32,), (1,))
    assert_size_stride(primals_24, (32, 36, 3, 3), (324, 9, 3, 1))
    assert_size_stride(primals_25, (32,), (1,))
    assert_size_stride(primals_26, (32, 68, 3, 3), (612, 9, 3, 1))
    assert_size_stride(primals_27, (32,), (1,))
    assert_size_stride(primals_28, (32, 100, 3, 3), (900, 9, 3, 1))
    assert_size_stride(primals_29, (32,), (1,))
    assert_size_stride(primals_30, (4, 132, 3, 3), (1188, 9, 3, 1))
    assert_size_stride(primals_31, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_3, primals_1, stride=(1, 
            1), padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 32, 4, 4), (512, 16, 4, 1))
        buf1 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.float32
            )
        get_raw_stream(0)
        triton_poi_fused_cat_0[grid(2304)](primals_3, buf0, primals_2, buf1,
            2304, XBLOCK=128, num_warps=4, num_stages=1)
        buf2 = extern_kernels.convolution(buf1, primals_4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 32, 4, 4), (512, 16, 4, 1))
        buf3 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_1[grid(4352)](primals_3, buf0, primals_2, buf2,
            primals_5, buf3, 4352, XBLOCK=256, num_warps=4, num_stages=1)
        buf4 = extern_kernels.convolution(buf3, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 32, 4, 4), (512, 16, 4, 1))
        buf5 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_2[grid(6400)](primals_3, buf0, primals_2, buf2,
            primals_5, buf4, primals_7, buf5, 6400, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf6 = extern_kernels.convolution(buf5, primals_8, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 32, 4, 4), (512, 16, 4, 1))
        buf7 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_3[grid(8448)](primals_3, buf0, primals_2, buf2,
            primals_5, buf4, primals_7, buf6, primals_9, buf7, 8448, XBLOCK
            =256, num_warps=4, num_stages=1)
        buf8 = extern_kernels.convolution(buf7, primals_10, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 4, 4, 4), (64, 16, 4, 1))
        buf9 = buf8
        del buf8
        triton_poi_fused_add_convolution_mul_4[grid(256)](buf9, primals_11,
            primals_3, 256, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_11
        buf10 = extern_kernels.convolution(buf9, primals_12, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 32, 4, 4), (512, 16, 4, 1))
        buf11 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_0[grid(2304)](buf9, buf10, primals_13, buf11, 
            2304, XBLOCK=128, num_warps=4, num_stages=1)
        buf12 = extern_kernels.convolution(buf11, primals_14, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 32, 4, 4), (512, 16, 4, 1))
        buf13 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_1[grid(4352)](buf9, buf10, primals_13, buf12,
            primals_15, buf13, 4352, XBLOCK=256, num_warps=4, num_stages=1)
        buf14 = extern_kernels.convolution(buf13, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 32, 4, 4), (512, 16, 4, 1))
        buf15 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_2[grid(6400)](buf9, buf10, primals_13, buf12,
            primals_15, buf14, primals_17, buf15, 6400, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf16 = extern_kernels.convolution(buf15, primals_18, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 32, 4, 4), (512, 16, 4, 1))
        buf17 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_3[grid(8448)](buf9, buf10, primals_13, buf12,
            primals_15, buf14, primals_17, buf16, primals_19, buf17, 8448,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf17, primals_20, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 4, 4, 4), (64, 16, 4, 1))
        buf19 = buf18
        del buf18
        triton_poi_fused_add_convolution_mul_4[grid(256)](buf19, primals_21,
            buf9, 256, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_21
        buf20 = extern_kernels.convolution(buf19, primals_22, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 32, 4, 4), (512, 16, 4, 1))
        buf21 = empty_strided_cuda((4, 36, 4, 4), (576, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_0[grid(2304)](buf19, buf20, primals_23, buf21,
            2304, XBLOCK=128, num_warps=4, num_stages=1)
        buf22 = extern_kernels.convolution(buf21, primals_24, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 32, 4, 4), (512, 16, 4, 1))
        buf23 = empty_strided_cuda((4, 68, 4, 4), (1088, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_1[grid(4352)](buf19, buf20, primals_23, buf22,
            primals_25, buf23, 4352, XBLOCK=256, num_warps=4, num_stages=1)
        buf24 = extern_kernels.convolution(buf23, primals_26, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 32, 4, 4), (512, 16, 4, 1))
        buf25 = empty_strided_cuda((4, 100, 4, 4), (1600, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_2[grid(6400)](buf19, buf20, primals_23, buf22,
            primals_25, buf24, primals_27, buf25, 6400, XBLOCK=128,
            num_warps=4, num_stages=1)
        buf26 = extern_kernels.convolution(buf25, primals_28, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 32, 4, 4), (512, 16, 4, 1))
        buf27 = empty_strided_cuda((4, 132, 4, 4), (2112, 16, 4, 1), torch.
            float32)
        triton_poi_fused_cat_3[grid(8448)](buf19, buf20, primals_23, buf22,
            primals_25, buf24, primals_27, buf26, primals_29, buf27, 8448,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf28 = extern_kernels.convolution(buf27, primals_30, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 4, 4, 4), (64, 16, 4, 1))
        buf29 = buf28
        del buf28
        triton_poi_fused_add_convolution_mul_5[grid(256)](buf29, primals_31,
            buf19, primals_3, 256, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_31
        buf30 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf26, primals_29, buf30, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf26
        del primals_29
        buf31 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf24, primals_27, buf31, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf24
        del primals_27
        buf32 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf22, primals_25, buf32, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf22
        del primals_25
        buf33 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf20, primals_23, buf33, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf20
        del primals_23
        buf34 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf16, primals_19, buf34, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf16
        del primals_19
        buf35 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf14, primals_17, buf35, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf14
        del primals_17
        buf36 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf12, primals_15, buf36, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf12
        del primals_15
        buf37 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf10, primals_13, buf37, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf10
        del primals_13
        buf38 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf6, primals_9, buf38, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf6
        del primals_9
        buf39 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf4, primals_7, buf39, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf4
        del primals_7
        buf40 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf2, primals_5, buf40, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf2
        del primals_5
        buf41 = empty_strided_cuda((4, 32, 4, 4), (512, 16, 4, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_6[grid(
            2048)](buf0, primals_2, buf41, 2048, XBLOCK=128, num_warps=4,
            num_stages=1)
        del buf0
        del primals_2
    return (buf29, primals_1, primals_3, primals_4, primals_6, primals_8,
        primals_10, primals_12, primals_14, primals_16, primals_18,
        primals_20, primals_22, primals_24, primals_26, primals_28,
        primals_30, buf1, buf3, buf5, buf7, buf9, buf11, buf13, buf15,
        buf17, buf19, buf21, buf23, buf25, buf27, buf30, buf31, buf32,
        buf33, buf34, buf35, buf36, buf37, buf38, buf39, buf40, buf41)


@torch.no_grad()
def default_init_weights(module_list, scale=1, bias_fill=0, **kwargs):
    """Initialize network weights.

    Args:
        module_list (list[nn.Module] | nn.Module): Modules to be initialized.
        scale (float): Scale initialized weights, especially for residual
            blocks. Default: 1.
        bias_fill (float): The value to fill bias. Default: 0
        kwargs (dict): Other arguments for initialization function.
    """
    if not isinstance(module_list, list):
        module_list = [module_list]
    for module in module_list:
        for m in module.modules():
            if isinstance(m, nn.Conv2d):
                init.kaiming_normal_(m.weight, **kwargs)
                m.weight.data *= scale
                if m.bias is not None:
                    m.bias.data.fill_(bias_fill)
            elif isinstance(m, nn.Linear):
                init.kaiming_normal_(m.weight, **kwargs)
                m.weight.data *= scale
                if m.bias is not None:
                    m.bias.data.fill_(bias_fill)
            elif isinstance(m, _BatchNorm):
                init.constant_(m.weight, 1)
                if m.bias is not None:
                    m.bias.data.fill_(bias_fill)


class ResidualDenseBlock(nn.Module):
    """Residual Dense Block.

    Used in RRDB block in ESRGAN.

    Args:
        num_feat (int): Channel number of intermediate features.
        num_grow_ch (int): Channels for each growth.
    """

    def __init__(self, num_feat=64, num_grow_ch=32):
        super(ResidualDenseBlock, self).__init__()
        self.conv1 = nn.Conv2d(num_feat, num_grow_ch, 3, 1, 1)
        self.conv2 = nn.Conv2d(num_feat + num_grow_ch, num_grow_ch, 3, 1, 1)
        self.conv3 = nn.Conv2d(num_feat + 2 * num_grow_ch, num_grow_ch, 3, 1, 1
            )
        self.conv4 = nn.Conv2d(num_feat + 3 * num_grow_ch, num_grow_ch, 3, 1, 1
            )
        self.conv5 = nn.Conv2d(num_feat + 4 * num_grow_ch, num_feat, 3, 1, 1)
        self.lrelu = nn.LeakyReLU(negative_slope=0.2, inplace=True)
        default_init_weights([self.conv1, self.conv2, self.conv3, self.
            conv4, self.conv5], 0.1)

    def forward(self, x):
        x1 = self.lrelu(self.conv1(x))
        x2 = self.lrelu(self.conv2(torch.cat((x, x1), 1)))
        x3 = self.lrelu(self.conv3(torch.cat((x, x1, x2), 1)))
        x4 = self.lrelu(self.conv4(torch.cat((x, x1, x2, x3), 1)))
        x5 = self.conv5(torch.cat((x, x1, x2, x3, x4), 1))
        return x5 * 0.2 + x


class RRDBNew(nn.Module):
    """Residual in Residual Dense Block.

    Used in RRDB-Net in ESRGAN.

    Args:
        num_feat (int): Channel number of intermediate features.
        num_grow_ch (int): Channels for each growth.
    """

    def __init__(self, num_feat, num_grow_ch=32):
        super(RRDBNew, self).__init__()
        self.rdb1 = ResidualDenseBlock(num_feat, num_grow_ch)
        self.rdb2 = ResidualDenseBlock(num_feat, num_grow_ch)
        self.rdb3 = ResidualDenseBlock(num_feat, num_grow_ch)

    def forward(self, input_0):
        primals_1 = self.rdb1.conv1.weight
        primals_2 = self.rdb1.conv1.bias
        primals_4 = self.rdb1.conv2.weight
        primals_5 = self.rdb1.conv2.bias
        primals_6 = self.rdb1.conv3.weight
        primals_7 = self.rdb1.conv3.bias
        primals_8 = self.rdb1.conv4.weight
        primals_9 = self.rdb1.conv4.bias
        primals_10 = self.rdb1.conv5.weight
        primals_11 = self.rdb1.conv5.bias
        primals_12 = self.rdb2.conv1.weight
        primals_13 = self.rdb2.conv1.bias
        primals_14 = self.rdb2.conv2.weight
        primals_15 = self.rdb2.conv2.bias
        primals_16 = self.rdb2.conv3.weight
        primals_17 = self.rdb2.conv3.bias
        primals_18 = self.rdb2.conv4.weight
        primals_19 = self.rdb2.conv4.bias
        primals_20 = self.rdb2.conv5.weight
        primals_21 = self.rdb2.conv5.bias
        primals_22 = self.rdb3.conv1.weight
        primals_23 = self.rdb3.conv1.bias
        primals_24 = self.rdb3.conv2.weight
        primals_25 = self.rdb3.conv2.bias
        primals_26 = self.rdb3.conv3.weight
        primals_27 = self.rdb3.conv3.bias
        primals_28 = self.rdb3.conv4.weight
        primals_29 = self.rdb3.conv4.bias
        primals_30 = self.rdb3.conv5.weight
        primals_31 = self.rdb3.conv5.bias
        primals_3 = 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, primals_27, primals_28, primals_29,
            primals_30, primals_31])
        return output[0]
