# 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_6/inductor_cache/4n/c4nlzbko3giy7ficn6vgl4iuqfc7jzdn4dlv5j3q5kn2uleghka6.py
# Topologically Sorted Source Nodes: [x, x_1], Original ATen: [aten.constant_pad_nd, aten.replication_pad2d]
# Source node to ATen node mapping:
#   x => constant_pad_nd
#   x_1 => _unsafe_index, _unsafe_index_1
# Graph fragment:
#   %constant_pad_nd : [num_users=1] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%primals_1, [0, 0, 1, 0], 0.0), kwargs = {})
#   %_unsafe_index : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd, [None, None, %clamp_max, None]), kwargs = {})
#   %_unsafe_index_1 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index, [None, None, None, %clamp_max_1]), kwargs = {})
triton_poi_fused_constant_pad_nd_replication_pad2d_0 = async_compile.triton('triton_poi_fused_constant_pad_nd_replication_pad2d_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=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_replication_pad2d_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_replication_pad2d_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 504
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 6) % 7
    x0 = xindex % 6
    x2 = (xindex // 42)
    x3 = xindex
    tmp0 = (-1) + ((4) * ((4) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (4)))
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + ((-4) + (4*((4) * ((4) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (4)))) + (16*x2) + ((3) * ((3) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (3)))), tmp2 & xmask, eviction_policy='evict_last', other=0.0)
    tl.store(out_ptr0 + (x3), tmp3, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/ts/cts4wqljoklux6vm7vlaexdhfrw642jhhjl542wsk3467won67fn.py
# Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_5 => constant_pad_nd_1
# Graph fragment:
#   %constant_pad_nd_1 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%slice_2, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_1 = async_compile.triton('triton_poi_fused_constant_pad_nd_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=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 4) % 5
    x3 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + ((-4) + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + (x3), tmp10, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/6d/c6d7bwf5nza5dbdvtys6s2chh6kftpqktaqwpfaq4r242vee3w5y.py
# Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_6 => _unsafe_index_2, _unsafe_index_3
# Graph fragment:
#   %_unsafe_index_2 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_1, [None, None, %clamp_max, None]), kwargs = {})
#   %_unsafe_index_3 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_2, [None, None, None, %clamp_max_1]), kwargs = {})
triton_poi_fused_replication_pad2d_2 = async_compile.triton('triton_poi_fused_replication_pad2d_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: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad2d_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_replication_pad2d_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8064
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = (xindex // 6) % 7
    x2 = (xindex // 42)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((4*((4) * ((4) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (4)))) + (20*x2) + ((3) * ((3) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (3)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/3k/c3k55j5ymtl7cf5vpwhd23d2cvxofdmrvddikrzemg4enms6w5g6.py
# Topologically Sorted Source Nodes: [x_17], Original ATen: [aten.max_pool2d_with_indices]
# Source node to ATen node mapping:
#   x_17 => getitem_1
# Graph fragment:
#   %getitem_1 : [num_users=1] = call_function[target=operator.getitem](args = (%_low_memory_max_pool2d_with_offsets, 1), kwargs = {})
triton_poi_fused_max_pool2d_with_indices_3 = async_compile.triton('triton_poi_fused_max_pool2d_with_indices_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=[1024], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i8', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_pool2d_with_indices_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, '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_max_pool2d_with_indices_3(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = (xindex // 2) % 2
    x2 = (xindex // 4)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((2*x0) + (8*x1) + (20*x2)), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + (2*x0) + (8*x1) + (20*x2)), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (4 + (2*x0) + (8*x1) + (20*x2)), xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr0 + (5 + (2*x0) + (8*x1) + (20*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tmp1 > tmp0
    tmp3 = tl.full([1], 1, tl.int8)
    tmp4 = tl.full([1], 0, tl.int8)
    tmp5 = tl.where(tmp2, tmp3, tmp4)
    tmp6 = triton_helpers.maximum(tmp1, tmp0)
    tmp8 = tmp7 > tmp6
    tmp9 = tl.full([1], 2, tl.int8)
    tmp10 = tl.where(tmp8, tmp9, tmp5)
    tmp11 = triton_helpers.maximum(tmp7, tmp6)
    tmp13 = tmp12 > tmp11
    tmp14 = tl.full([1], 3, tl.int8)
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = triton_helpers.maximum(tmp12, tmp11)
    tl.store(out_ptr0 + (x3), tmp15, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/li/clioa7n7femgrowsnwpk2vkodsiqehum7w2ew5vfm4ik6lia3jo2.py
# Topologically Sorted Source Nodes: [x_17, x_18], Original ATen: [aten.max_pool2d_with_indices, aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_17 => _low_memory_max_pool2d_with_offsets
#   x_18 => constant_pad_nd_4
# Graph fragment:
#   %_low_memory_max_pool2d_with_offsets : [num_users=2] = call_function[target=torch.ops.prims._low_memory_max_pool2d_with_offsets.default](args = (%slice_7, [2, 2], [2, 2], [0, 0], [1, 1], False), kwargs = {})
#   %constant_pad_nd_4 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%getitem, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4 = async_compile.triton('triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_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=[2048], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 2) % 3
    x0 = xindex % 2
    x2 = (xindex // 6)
    x3 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + ((-8) + (2*x0) + (8*x1) + (20*x2)), tmp2 & xmask, eviction_policy='evict_last', other=0.0)
    tmp4 = tl.load(in_ptr0 + ((-7) + (2*x0) + (8*x1) + (20*x2)), tmp2 & xmask, eviction_policy='evict_last', other=0.0)
    tmp5 = triton_helpers.maximum(tmp4, tmp3)
    tmp6 = tl.load(in_ptr0 + ((-4) + (2*x0) + (8*x1) + (20*x2)), tmp2 & xmask, eviction_policy='evict_last', other=0.0)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tl.load(in_ptr0 + ((-3) + (2*x0) + (8*x1) + (20*x2)), tmp2 & xmask, eviction_policy='evict_last', other=0.0)
    tmp9 = triton_helpers.maximum(tmp8, tmp7)
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp2, tmp9, tmp10)
    tl.store(out_ptr0 + (x3), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/yp/cypf3msgbtes3ol7jhlr4cwvwhurg7ehmsja7x3dbmh4bkdyivkp.py
# Topologically Sorted Source Nodes: [x_19], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_19 => _unsafe_index_6, _unsafe_index_7
# Graph fragment:
#   %_unsafe_index_6 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_4, [None, None, %clamp_max_6, None]), kwargs = {})
#   %_unsafe_index_7 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_6, [None, None, None, %clamp_max_7]), kwargs = {})
triton_poi_fused_replication_pad2d_5 = async_compile.triton('triton_poi_fused_replication_pad2d_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=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad2d_5', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_replication_pad2d_5(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = (xindex // 4) % 5
    x2 = (xindex // 20)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((2*((2) * ((2) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (2)))) + (6*x2) + ((1) * ((1) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (1)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/kx/ckxkls7uolahajz3qptgqk4mlrf7mgqfwszjvjoixuhmqi6iea3h.py
# Topologically Sorted Source Nodes: [x_23], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_23 => constant_pad_nd_5
# Graph fragment:
#   %constant_pad_nd_5 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%slice_9, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_6 = async_compile.triton('triton_poi_fused_constant_pad_nd_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: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_6', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_6(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 2) % 3
    x3 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + ((-2) + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + (x3), tmp10, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/d3/cd3j4i52dwfpn7aurpfxo53ervhyhjeh435xhwdepzafy772rau2.py
# Topologically Sorted Source Nodes: [x_35], Original ATen: [aten.max_pool2d_with_indices]
# Source node to ATen node mapping:
#   x_35 => getitem_3
# Graph fragment:
#   %getitem_3 : [num_users=1] = call_function[target=operator.getitem](args = (%_low_memory_max_pool2d_with_offsets_1, 1), kwargs = {})
triton_poi_fused_max_pool2d_with_indices_7 = async_compile.triton('triton_poi_fused_max_pool2d_with_indices_7', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i8', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_pool2d_with_indices_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, '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_max_pool2d_with_indices_7(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (6*x0), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + (6*x0)), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (2 + (6*x0)), xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr0 + (3 + (6*x0)), xmask, eviction_policy='evict_last')
    tmp2 = tmp1 > tmp0
    tmp3 = tl.full([1], 1, tl.int8)
    tmp4 = tl.full([1], 0, tl.int8)
    tmp5 = tl.where(tmp2, tmp3, tmp4)
    tmp6 = triton_helpers.maximum(tmp1, tmp0)
    tmp8 = tmp7 > tmp6
    tmp9 = tl.full([1], 2, tl.int8)
    tmp10 = tl.where(tmp8, tmp9, tmp5)
    tmp11 = triton_helpers.maximum(tmp7, tmp6)
    tmp13 = tmp12 > tmp11
    tmp14 = tl.full([1], 3, tl.int8)
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    tmp16 = triton_helpers.maximum(tmp12, tmp11)
    tl.store(out_ptr0 + (x0), tmp15, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/x7/cx7xvxr5xgamnnob4y3pwbgdmjbrht6ry6aioepigqjr46jri76c.py
# Topologically Sorted Source Nodes: [x_35, x_36], Original ATen: [aten.max_pool2d_with_indices, aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_35 => _low_memory_max_pool2d_with_offsets_1
#   x_36 => constant_pad_nd_8
# Graph fragment:
#   %_low_memory_max_pool2d_with_offsets_1 : [num_users=2] = call_function[target=torch.ops.prims._low_memory_max_pool2d_with_offsets.default](args = (%slice_14, [2, 2], [2, 2], [0, 0], [1, 1], False), kwargs = {})
#   %constant_pad_nd_8 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%getitem_2, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_8 = async_compile.triton('triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_8', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/di/cdissdh67c4azmtun6xeytlma3k4k4yjwpwjoqqbktzndgpjrvam.py
# Topologically Sorted Source Nodes: [x_37], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_37 => _unsafe_index_12, _unsafe_index_13
# Graph fragment:
#   %_unsafe_index_12 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_8, [None, None, %clamp_max_7, None]), kwargs = {})
#   %_unsafe_index_13 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_12, [None, None, None, %clamp_max_13]), kwargs = {})
triton_poi_fused_replication_pad2d_9 = async_compile.triton('triton_poi_fused_replication_pad2d_9', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/iz/ciz3s6gzic62xxna67bmmhiy4an4ncxjiem5oxgqya44qjztd36f.py
# Topologically Sorted Source Nodes: [x_41], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_41 => constant_pad_nd_9
# Graph fragment:
#   %constant_pad_nd_9 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%slice_16, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_10 = async_compile.triton('triton_poi_fused_constant_pad_nd_10', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/nt/cnteih46wbvtl57likkikgsx7a75ielwwp7ajzvuu4jotrcw33xa.py
# Topologically Sorted Source Nodes: [x_42], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_42 => _unsafe_index_14, _unsafe_index_15
# Graph fragment:
#   %_unsafe_index_14 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_9, [None, None, %clamp_max_7, None]), kwargs = {})
#   %_unsafe_index_15 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_14, [None, None, None, %clamp_max_13]), kwargs = {})
triton_poi_fused_replication_pad2d_11 = async_compile.triton('triton_poi_fused_replication_pad2d_11', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/4p/c4ppl7x7rlko7t2e5zp7f7vtwxneyomgqohaazha2nuaqxfsvcmu.py
# Topologically Sorted Source Nodes: [x_51], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
# Source node to ATen node mapping:
#   x_51 => add, add_1, convert_element_type, convert_element_type_1, iota_18, mul_10, mul_9
# Graph fragment:
#   %iota_18 : [num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (2,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %mul_9 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%iota_18, 1), kwargs = {})
#   %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_9, 0), kwargs = {})
#   %convert_element_type : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%add, torch.float32), kwargs = {})
#   %add_1 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type, 0.0), kwargs = {})
#   %mul_10 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_1, 0.5), kwargs = {})
#   %convert_element_type_1 : [num_users=3] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%mul_10, torch.int64), kwargs = {})
triton_poi_fused__to_copy_add_arange_mul_12 = async_compile.triton('triton_poi_fused__to_copy_add_arange_mul_12', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/v5/cv5wkaqbrpwkskgrfxhs7bwtv3lwaw64avxgarlagabitzyzikv7.py
# Topologically Sorted Source Nodes: [x_53, x_54], Original ATen: [aten.cat, aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_53 => cat
#   x_54 => constant_pad_nd_12
# Graph fragment:
#   %cat : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%_unsafe_index_18, %getitem], 1), kwargs = {})
#   %constant_pad_nd_12 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%cat, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_cat_constant_pad_nd_13 = async_compile.triton('triton_poi_fused_cat_constant_pad_nd_13', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*i64', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_constant_pad_nd_13', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_cat_constant_pad_nd_13(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 // 2) % 3
    x2 = (xindex // 6) % 96
    x0 = xindex % 2
    x3 = (xindex // 576)
    x6 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = x2
    tmp4 = tmp3 >= tmp1
    tmp5 = tl.full([1], 48, tl.int64)
    tmp6 = tmp3 < tmp5
    tmp7 = tmp6 & tmp2
    tmp8 = tl.load(in_ptr0 + ((-1) + x1), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp9 = tl.full([XBLOCK], 1, tl.int32)
    tmp10 = tmp8 + tmp9
    tmp11 = tmp8 < 0
    tmp12 = tl.where(tmp11, tmp10, tmp8)
    tmp13 = tl.load(in_ptr0 + (x0), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp14 = tmp13 + tmp9
    tmp15 = tmp13 < 0
    tmp16 = tl.where(tmp15, tmp14, tmp13)
    tmp17 = tl.load(in_ptr1 + (tmp12 + (2*x2) + (96*x3)), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp18 = 0.0
    tmp19 = tmp17 > tmp18
    tmp20 = 0.1
    tmp21 = tmp17 * tmp20
    tmp22 = tl.where(tmp19, tmp17, tmp21)
    tmp23 = tl.full(tmp22.shape, 0.0, tmp22.dtype)
    tmp24 = tl.where(tmp7, tmp22, tmp23)
    tmp25 = tmp3 >= tmp5
    tmp26 = tl.full([1], 96, tl.int64)
    tmp27 = tmp3 < tmp26
    tmp28 = tmp25 & tmp2
    tmp29 = tl.load(in_ptr2 + ((-8) + (2*x0) + (8*x1) + (20*((-48) + x2)) + (960*x3)), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp30 = tl.load(in_ptr2 + ((-7) + (2*x0) + (8*x1) + (20*((-48) + x2)) + (960*x3)), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp31 = triton_helpers.maximum(tmp30, tmp29)
    tmp32 = tl.load(in_ptr2 + ((-4) + (2*x0) + (8*x1) + (20*((-48) + x2)) + (960*x3)), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp33 = triton_helpers.maximum(tmp32, tmp31)
    tmp34 = tl.load(in_ptr2 + ((-3) + (2*x0) + (8*x1) + (20*((-48) + x2)) + (960*x3)), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp35 = triton_helpers.maximum(tmp34, tmp33)
    tmp36 = tl.full(tmp35.shape, 0.0, tmp35.dtype)
    tmp37 = tl.where(tmp28, tmp35, tmp36)
    tmp38 = tl.where(tmp6, tmp24, tmp37)
    tmp39 = tl.full(tmp38.shape, 0.0, tmp38.dtype)
    tmp40 = tl.where(tmp2, tmp38, tmp39)
    tl.store(out_ptr0 + (x6), tmp40, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/3l/c3lwpznmayo2jahncfdmfimrpiszbfxtvyw4tdk5jrwsxefoever.py
# Topologically Sorted Source Nodes: [x_55], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_55 => _unsafe_index_19, _unsafe_index_20
# Graph fragment:
#   %_unsafe_index_19 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_12, [None, None, %clamp_max_6, None]), kwargs = {})
#   %_unsafe_index_20 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_19, [None, None, None, %clamp_max_7]), kwargs = {})
triton_poi_fused_replication_pad2d_14 = async_compile.triton('triton_poi_fused_replication_pad2d_14', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad2d_14', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_replication_pad2d_14(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = (xindex // 4) % 5
    x2 = (xindex // 20)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((2*((2) * ((2) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (2)))) + (6*x2) + ((1) * ((1) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (1)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/w5/cw5vdfv5h3onnspsdljfguaga223bcencrndcytiwqfwp2v4gows.py
# Topologically Sorted Source Nodes: [x_59], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_59 => constant_pad_nd_13
# Graph fragment:
#   %constant_pad_nd_13 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%slice_22, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_15 = async_compile.triton('triton_poi_fused_constant_pad_nd_15', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/e3/ce362u6kfxrjeezi3a32moib3taq4g3rqygks4kzc66efsnerhzc.py
# Topologically Sorted Source Nodes: [x_74], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
# Source node to ATen node mapping:
#   x_74 => add_4, add_5, convert_element_type_4, convert_element_type_5, iota_28, mul_17, mul_18
# Graph fragment:
#   %iota_28 : [num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (4,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %mul_17 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%iota_28, 1), kwargs = {})
#   %add_4 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_17, 0), kwargs = {})
#   %convert_element_type_4 : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%add_4, torch.float32), kwargs = {})
#   %add_5 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_4, 0.0), kwargs = {})
#   %mul_18 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_5, 0.5), kwargs = {})
#   %convert_element_type_5 : [num_users=3] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%mul_18, torch.int64), kwargs = {})
triton_poi_fused__to_copy_add_arange_mul_16 = async_compile.triton('triton_poi_fused__to_copy_add_arange_mul_16', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[4], 
    filename=__file__,
    triton_meta={'signature': {0: '*i64', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0,), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_add_arange_mul_16', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_16(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + (x0), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/vj/cvjrrkcg2bifo6avrxsqbxr3r37edsj2p5jkn4ch4bsdb5ozvubr.py
# Topologically Sorted Source Nodes: [x_76, x_77], Original ATen: [aten.cat, aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_76 => cat_1
#   x_77 => constant_pad_nd_17
# Graph fragment:
#   %cat_1 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%_unsafe_index_27, %primals_1], 1), kwargs = {})
#   %constant_pad_nd_17 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%cat_1, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_cat_constant_pad_nd_17 = async_compile.triton('triton_poi_fused_cat_constant_pad_nd_17', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*i64', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_constant_pad_nd_17', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_cat_constant_pad_nd_17(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 7920
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 4) % 5
    x2 = (xindex // 20) % 99
    x0 = xindex % 4
    x3 = (xindex // 1980)
    x5 = xindex % 20
    x6 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = x2
    tmp4 = tmp3 >= tmp1
    tmp5 = tl.full([1], 96, tl.int64)
    tmp6 = tmp3 < tmp5
    tmp7 = tmp6 & tmp2
    tmp8 = tl.load(in_ptr0 + ((-1) + x1), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp9 = tl.full([XBLOCK], 2, tl.int32)
    tmp10 = tmp8 + tmp9
    tmp11 = tmp8 < 0
    tmp12 = tl.where(tmp11, tmp10, tmp8)
    tmp13 = tl.load(in_ptr0 + (x0), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp14 = tmp13 + tmp9
    tmp15 = tmp13 < 0
    tmp16 = tl.where(tmp15, tmp14, tmp13)
    tmp17 = tl.load(in_ptr1 + (tmp16 + (2*tmp12) + (6*x2) + (576*x3)), tmp7 & xmask, eviction_policy='evict_last', other=0.0)
    tmp18 = 0.0
    tmp19 = tmp17 > tmp18
    tmp20 = 0.1
    tmp21 = tmp17 * tmp20
    tmp22 = tl.where(tmp19, tmp17, tmp21)
    tmp23 = tl.full(tmp22.shape, 0.0, tmp22.dtype)
    tmp24 = tl.where(tmp7, tmp22, tmp23)
    tmp25 = tmp3 >= tmp5
    tmp26 = tl.full([1], 99, tl.int64)
    tmp27 = tmp3 < tmp26
    tmp28 = tmp25 & tmp2
    tmp29 = tl.load(in_ptr2 + ((-4) + x5 + (16*((-96) + x2)) + (48*x3)), tmp28 & xmask, other=0.0)
    tmp30 = tl.where(tmp6, tmp24, tmp29)
    tmp31 = tl.full(tmp30.shape, 0.0, tmp30.dtype)
    tmp32 = tl.where(tmp2, tmp30, tmp31)
    tl.store(out_ptr0 + (x6), tmp32, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/md/cmdtivcdlfaaaojniaj7btygexdu2ek5crym6fuxtkd4z6y64n6a.py
# Topologically Sorted Source Nodes: [x_78], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_78 => _unsafe_index_28, _unsafe_index_29
# Graph fragment:
#   %_unsafe_index_28 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_17, [None, None, %clamp_max, None]), kwargs = {})
#   %_unsafe_index_29 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_28, [None, None, None, %clamp_max_1]), kwargs = {})
triton_poi_fused_replication_pad2d_18 = async_compile.triton('triton_poi_fused_replication_pad2d_18', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[32768], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad2d_18', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_replication_pad2d_18(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16632
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = (xindex // 6) % 7
    x2 = (xindex // 42)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((4*((4) * ((4) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (4)))) + (20*x2) + ((3) * ((3) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (3)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/i4/ci4mkeqsln7fx4v7khmgalvbtlr4p65y6hz3kxockx5ge5s3vnfl.py
# Topologically Sorted Source Nodes: [x_82], Original ATen: [aten.constant_pad_nd]
# Source node to ATen node mapping:
#   x_82 => constant_pad_nd_18
# Graph fragment:
#   %constant_pad_nd_18 : [num_users=2] = call_function[target=torch.ops.aten.constant_pad_nd.default](args = (%slice_30, [0, 0, 1, 0], 0.0), kwargs = {})
triton_poi_fused_constant_pad_nd_19 = async_compile.triton('triton_poi_fused_constant_pad_nd_19', '''
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: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_constant_pad_nd_19', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_constant_pad_nd_19(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 4) % 5
    x3 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + ((-4) + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + (x3), tmp10, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/jb/cjb7etbttlkfa2nmuwdxynj5jfycrxebuuyuomty7d7kiu4busmb.py
# Topologically Sorted Source Nodes: [x_83], Original ATen: [aten.replication_pad2d]
# Source node to ATen node mapping:
#   x_83 => _unsafe_index_30, _unsafe_index_31
# Graph fragment:
#   %_unsafe_index_30 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%constant_pad_nd_18, [None, None, %clamp_max, None]), kwargs = {})
#   %_unsafe_index_31 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_30, [None, None, None, %clamp_max_1]), kwargs = {})
triton_poi_fused_replication_pad2d_20 = async_compile.triton('triton_poi_fused_replication_pad2d_20', '''
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: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad2d_20', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_replication_pad2d_20(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = (xindex // 6) % 7
    x2 = (xindex // 42)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((4*((4) * ((4) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (4)))) + (20*x2) + ((3) * ((3) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (3)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/u6/cu6bpds5a4h3kl2dhwn52bd4ajiagziylgier2uvw6xmsmsgrx6e.py
# Topologically Sorted Source Nodes: [x_95], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_95 => gt_16, mul_24, where_16
# Graph fragment:
#   %gt_16 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_16, 0), kwargs = {})
#   %mul_24 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_16, 0.1), kwargs = {})
#   %where_16 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_16, %convolution_16, %mul_24), kwargs = {})
#   %gt_17 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_16, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_21 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_21', '''
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: '*i1', 2: '*fp32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_21', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_21(in_ptr0, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
    tl.store(out_ptr1 + (x0), tmp5, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/nw/cnwfl3fjcynptzj632swu36mndrrinok7spx7bzm66g4iup55us4.py
# Topologically Sorted Source Nodes: [x_90], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_90 => gt_15, mul_23, where_15
# Graph fragment:
#   %gt_15 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_15, 0), kwargs = {})
#   %mul_23 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_15, 0.1), kwargs = {})
#   %where_15 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_15, %convolution_15, %mul_23), kwargs = {})
#   %gt_18 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_15, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_22 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_22', '''
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: '*i1', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_22', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_22(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/6d/c6dzoojd2s4qbh2rhw4zqvpdb7ou57jvt4564ctqszunc7hpxgsp.py
# Topologically Sorted Source Nodes: [x_72], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_72 => gt_12, mul_16, where_12
# Graph fragment:
#   %gt_12 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_12, 0), kwargs = {})
#   %mul_16 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_12, 0.1), kwargs = {})
#   %where_12 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_12, %convolution_12, %mul_16), kwargs = {})
#   %gt_21 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_12, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_23 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_23', '''
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: '*i1', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_23', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_23(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/zc/czciprdxqs2fjjocsdtd2up7l6kftfcnvysjl2zsrvzqsluwdcdl.py
# Topologically Sorted Source Nodes: [x_49], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_49 => gt_8, mul_8, where_8
# Graph fragment:
#   %gt_8 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_8, 0), kwargs = {})
#   %mul_8 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_8, 0.1), kwargs = {})
#   %where_8 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_8, %convolution_8, %mul_8), kwargs = {})
#   %gt_25 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_8, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_24 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_24', '''
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=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i1', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_24', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_24(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/dm/cdmm6thgynns4vhyclkoxodlfnvlpgso5o6eezgvmgdh36goaryt.py
# Topologically Sorted Source Nodes: [x_44], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_44 => gt_7, mul_7, where_7
# Graph fragment:
#   %gt_7 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_7, 0), kwargs = {})
#   %mul_7 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_7, 0.1), kwargs = {})
#   %where_7 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_7, %convolution_7, %mul_7), kwargs = {})
#   %gt_26 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_7, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_25 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_25', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/ah/cah5m3i4pex3rhkdbbsj6zkz423ikx5gt4d5jwle5wfh2le2ymlj.py
# Topologically Sorted Source Nodes: [x_31], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_31 => gt_5, mul_5, where_5
# Graph fragment:
#   %gt_5 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_5, 0), kwargs = {})
#   %mul_5 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_5, 0.1), kwargs = {})
#   %where_5 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_5, %convolution_5, %mul_5), kwargs = {})
#   %gt_28 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_5, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_26 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_26', '''
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: '*i1', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_26', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_26(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/mw/cmwq7fypacxvmtccwm3kkjtbstrhpkhim2r56xa2lrrjlsnlohez.py
# Topologically Sorted Source Nodes: [x_13], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
# Source node to ATen node mapping:
#   x_13 => gt_2, mul_2, where_2
# Graph fragment:
#   %gt_2 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_2, 0), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_2, 0.1), kwargs = {})
#   %where_2 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_2, %convolution_2, %mul_2), kwargs = {})
#   %gt_31 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%where_2, 0), kwargs = {})
triton_poi_fused_leaky_relu_leaky_relu_backward_27 = async_compile.triton('triton_poi_fused_leaky_relu_leaky_relu_backward_27', '''
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: '*i1', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_leaky_relu_backward_27', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_27(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + (x0), tmp6, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18 = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 4, 4), (48, 16, 4, 1))
    assert_size_stride(primals_2, (48, 3, 3, 3), (27, 9, 3, 1))
    assert_size_stride(primals_3, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_4, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_5, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_6, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_7, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_8, (96, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_9, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_10, (48, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_11, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_12, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_13, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_14, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_15, (96, 99, 3, 3), (891, 9, 3, 1))
    assert_size_stride(primals_16, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_17, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_18, (96, 96, 3, 3), (864, 9, 3, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 3, 7, 6), (126, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x, x_1], Original ATen: [aten.constant_pad_nd, aten.replication_pad2d]
        stream0 = get_raw_stream(0)
        triton_poi_fused_constant_pad_nd_replication_pad2d_0.run(primals_1, buf0, 504, grid=grid(504), stream=stream0)
        # Topologically Sorted Source Nodes: [x_2], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 48, 5, 4), (960, 20, 4, 1))
        buf2 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_1.run(buf1, buf2, 3840, grid=grid(3840), stream=stream0)
        buf3 = empty_strided_cuda((4, 48, 7, 6), (2016, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_2.run(buf2, buf3, 8064, grid=grid(8064), stream=stream0)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.convolution]
        buf4 = extern_kernels.convolution(buf3, primals_3, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 48, 5, 4), (960, 20, 4, 1))
        buf5 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_10], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_1.run(buf4, buf5, 3840, grid=grid(3840), stream=stream0)
        buf6 = empty_strided_cuda((4, 48, 7, 6), (2016, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_11], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_2.run(buf5, buf6, 8064, grid=grid(8064), stream=stream0)
        # Topologically Sorted Source Nodes: [x_12], Original ATen: [aten.convolution]
        buf7 = extern_kernels.convolution(buf6, primals_4, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 48, 5, 4), (960, 20, 4, 1))
        buf8 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_15], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_1.run(buf7, buf8, 3840, grid=grid(3840), stream=stream0)
        buf9 = empty_strided_cuda((4, 48, 2, 2), (192, 4, 2, 1), torch.int8)
        # Topologically Sorted Source Nodes: [x_17], Original ATen: [aten.max_pool2d_with_indices]
        triton_poi_fused_max_pool2d_with_indices_3.run(buf8, buf9, 768, grid=grid(768), stream=stream0)
        buf10 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_17, x_18], Original ATen: [aten.max_pool2d_with_indices, aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4.run(buf8, buf10, 1152, grid=grid(1152), stream=stream0)
        buf11 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_19], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_5.run(buf10, buf11, 3840, grid=grid(3840), stream=stream0)
        # Topologically Sorted Source Nodes: [x_20], Original ATen: [aten.convolution]
        buf12 = extern_kernels.convolution(buf11, primals_5, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 48, 3, 2), (288, 6, 2, 1))
        buf13 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_23], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_6.run(buf12, buf13, 1152, grid=grid(1152), stream=stream0)
        buf14 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_24], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_5.run(buf13, buf14, 3840, grid=grid(3840), stream=stream0)
        # Topologically Sorted Source Nodes: [x_25], Original ATen: [aten.convolution]
        buf15 = extern_kernels.convolution(buf14, primals_6, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 48, 3, 2), (288, 6, 2, 1))
        buf16 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_28], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_6.run(buf15, buf16, 1152, grid=grid(1152), stream=stream0)
        buf17 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_29], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_5.run(buf16, buf17, 3840, grid=grid(3840), stream=stream0)
        # Topologically Sorted Source Nodes: [x_30], Original ATen: [aten.convolution]
        buf18 = extern_kernels.convolution(buf17, primals_7, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 48, 3, 2), (288, 6, 2, 1))
        buf19 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_33], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_6.run(buf18, buf19, 1152, grid=grid(1152), stream=stream0)
        buf20 = empty_strided_cuda((4, 48, 1, 1), (48, 1, 1, 1), torch.int8)
        # Topologically Sorted Source Nodes: [x_35], Original ATen: [aten.max_pool2d_with_indices]
        triton_poi_fused_max_pool2d_with_indices_7.run(buf19, buf20, 192, grid=grid(192), stream=stream0)
        buf21 = empty_strided_cuda((4, 48, 2, 1), (96, 2, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_35, x_36], Original ATen: [aten.max_pool2d_with_indices, aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_8.run(buf19, buf21, 384, grid=grid(384), stream=stream0)
        buf22 = empty_strided_cuda((4, 48, 4, 3), (576, 12, 3, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_37], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_9.run(buf21, buf22, 2304, grid=grid(2304), stream=stream0)
        # Topologically Sorted Source Nodes: [x_38], Original ATen: [aten.convolution]
        buf23 = extern_kernels.convolution(buf22, primals_8, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 96, 2, 1), (192, 2, 1, 1))
        buf24 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_41], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_10.run(buf23, buf24, 768, grid=grid(768), stream=stream0)
        buf25 = empty_strided_cuda((4, 96, 4, 3), (1152, 12, 3, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_42], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_11.run(buf24, buf25, 4608, grid=grid(4608), stream=stream0)
        # Topologically Sorted Source Nodes: [x_43], Original ATen: [aten.convolution]
        buf26 = extern_kernels.convolution(buf25, primals_9, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 96, 2, 1), (192, 2, 1, 1))
        buf27 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_46], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_10.run(buf26, buf27, 768, grid=grid(768), stream=stream0)
        buf28 = empty_strided_cuda((4, 96, 4, 3), (1152, 12, 3, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_47], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_11.run(buf27, buf28, 4608, grid=grid(4608), stream=stream0)
        # Topologically Sorted Source Nodes: [x_48], Original ATen: [aten.convolution]
        buf29 = extern_kernels.convolution(buf28, primals_10, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 48, 2, 1), (96, 2, 1, 1))
        buf30 = empty_strided_cuda((2, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_51], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
        triton_poi_fused__to_copy_add_arange_mul_12.run(buf30, 2, grid=grid(2), stream=stream0)
        buf31 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_53, x_54], Original ATen: [aten.cat, aten.constant_pad_nd]
        triton_poi_fused_cat_constant_pad_nd_13.run(buf30, buf29, buf8, buf31, 2304, grid=grid(2304), stream=stream0)
        buf32 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_55], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_14.run(buf31, buf32, 7680, grid=grid(7680), stream=stream0)
        # Topologically Sorted Source Nodes: [x_56], Original ATen: [aten.convolution]
        buf33 = extern_kernels.convolution(buf32, primals_11, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf33, (4, 96, 3, 2), (576, 6, 2, 1))
        buf34 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_59], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_15.run(buf33, buf34, 2304, grid=grid(2304), stream=stream0)
        buf35 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_60], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_14.run(buf34, buf35, 7680, grid=grid(7680), stream=stream0)
        # Topologically Sorted Source Nodes: [x_61], Original ATen: [aten.convolution]
        buf36 = extern_kernels.convolution(buf35, primals_12, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 96, 3, 2), (576, 6, 2, 1))
        buf37 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_64], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_15.run(buf36, buf37, 2304, grid=grid(2304), stream=stream0)
        buf38 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_65], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_14.run(buf37, buf38, 7680, grid=grid(7680), stream=stream0)
        # Topologically Sorted Source Nodes: [x_66], Original ATen: [aten.convolution]
        buf39 = extern_kernels.convolution(buf38, primals_13, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf39, (4, 96, 3, 2), (576, 6, 2, 1))
        buf40 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_69], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_15.run(buf39, buf40, 2304, grid=grid(2304), stream=stream0)
        buf41 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_70], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_14.run(buf40, buf41, 7680, grid=grid(7680), stream=stream0)
        # Topologically Sorted Source Nodes: [x_71], Original ATen: [aten.convolution]
        buf42 = extern_kernels.convolution(buf41, primals_14, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf42, (4, 96, 3, 2), (576, 6, 2, 1))
        buf43 = empty_strided_cuda((4, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_74], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
        triton_poi_fused__to_copy_add_arange_mul_16.run(buf43, 4, grid=grid(4), stream=stream0)
        buf44 = empty_strided_cuda((4, 99, 5, 4), (1980, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_76, x_77], Original ATen: [aten.cat, aten.constant_pad_nd]
        triton_poi_fused_cat_constant_pad_nd_17.run(buf43, buf42, primals_1, buf44, 7920, grid=grid(7920), stream=stream0)
        del primals_1
        buf45 = empty_strided_cuda((4, 99, 7, 6), (4158, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_78], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_18.run(buf44, buf45, 16632, grid=grid(16632), stream=stream0)
        # Topologically Sorted Source Nodes: [x_79], Original ATen: [aten.convolution]
        buf46 = extern_kernels.convolution(buf45, primals_15, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf46, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf47 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_82], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_19.run(buf46, buf47, 7680, grid=grid(7680), stream=stream0)
        buf48 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_83], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_20.run(buf47, buf48, 16128, grid=grid(16128), stream=stream0)
        # Topologically Sorted Source Nodes: [x_84], Original ATen: [aten.convolution]
        buf49 = extern_kernels.convolution(buf48, primals_16, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf49, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf50 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_87], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_19.run(buf49, buf50, 7680, grid=grid(7680), stream=stream0)
        buf51 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_88], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_20.run(buf50, buf51, 16128, grid=grid(16128), stream=stream0)
        # Topologically Sorted Source Nodes: [x_89], Original ATen: [aten.convolution]
        buf52 = extern_kernels.convolution(buf51, primals_17, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf52, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf53 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_92], Original ATen: [aten.constant_pad_nd]
        triton_poi_fused_constant_pad_nd_19.run(buf52, buf53, 7680, grid=grid(7680), stream=stream0)
        buf54 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_93], Original ATen: [aten.replication_pad2d]
        triton_poi_fused_replication_pad2d_20.run(buf53, buf54, 16128, grid=grid(16128), stream=stream0)
        # Topologically Sorted Source Nodes: [x_94], Original ATen: [aten.convolution]
        buf55 = extern_kernels.convolution(buf54, primals_18, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf56 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        buf73 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_95], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_21.run(buf55, buf56, buf73, 7680, grid=grid(7680), stream=stream0)
        del buf55
        buf57 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_90], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_22.run(buf52, buf57, 7680, grid=grid(7680), stream=stream0)
        del buf52
        buf58 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_85], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_22.run(buf49, buf58, 7680, grid=grid(7680), stream=stream0)
        del buf49
        buf59 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_80], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_22.run(buf46, buf59, 7680, grid=grid(7680), stream=stream0)
        del buf46
        buf60 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_72], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_23.run(buf42, buf60, 2304, grid=grid(2304), stream=stream0)
        del buf42
        buf61 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_67], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_23.run(buf39, buf61, 2304, grid=grid(2304), stream=stream0)
        del buf39
        buf62 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_62], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_23.run(buf36, buf62, 2304, grid=grid(2304), stream=stream0)
        del buf36
        buf63 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_57], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_23.run(buf33, buf63, 2304, grid=grid(2304), stream=stream0)
        del buf33
        buf64 = empty_strided_cuda((4, 48, 2, 1), (96, 2, 1, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_49], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_24.run(buf29, buf64, 384, grid=grid(384), stream=stream0)
        del buf29
        buf65 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_44], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_25.run(buf26, buf65, 768, grid=grid(768), stream=stream0)
        del buf26
        buf66 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_39], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_25.run(buf23, buf66, 768, grid=grid(768), stream=stream0)
        del buf23
        buf67 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_31], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_26.run(buf18, buf67, 1152, grid=grid(1152), stream=stream0)
        del buf18
        buf68 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_26], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_26.run(buf15, buf68, 1152, grid=grid(1152), stream=stream0)
        del buf15
        buf69 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_21], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_26.run(buf12, buf69, 1152, grid=grid(1152), stream=stream0)
        del buf12
        buf70 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_13], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_27.run(buf7, buf70, 3840, grid=grid(3840), stream=stream0)
        del buf7
        buf71 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_27.run(buf4, buf71, 3840, grid=grid(3840), stream=stream0)
        del buf4
        buf72 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        # Topologically Sorted Source Nodes: [x_3], Original ATen: [aten.leaky_relu, aten.leaky_relu_backward]
        triton_poi_fused_leaky_relu_leaky_relu_backward_27.run(buf1, buf72, 3840, grid=grid(3840), stream=stream0)
        del buf1
    return (reinterpret_tensor(buf73, (4, 96, 4, 4), (1920, 20, 4, 1), 0), 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, buf0, buf2, buf3, buf5, buf6, reinterpret_tensor(buf8, (4, 48, 4, 4), (960, 20, 4, 1), 0), buf9, buf10, buf11, buf13, buf14, buf16, buf17, reinterpret_tensor(buf19, (4, 48, 2, 2), (288, 6, 2, 1), 0), buf20, buf21, buf22, buf24, buf25, buf27, buf28, buf30, buf31, buf32, buf34, buf35, buf37, buf38, buf40, buf41, buf43, buf44, buf45, buf47, buf48, buf50, buf51, buf53, buf54, buf56, buf57, buf58, buf59, buf60, buf61, buf62, buf63, buf64, buf65, buf66, buf67, buf68, buf69, buf70, buf71, buf72, )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    primals_1 = rand_strided((4, 3, 4, 4), (48, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((48, 3, 3, 3), (27, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((48, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((48, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((48, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((48, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((48, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((96, 48, 3, 3), (432, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((48, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((96, 99, 3, 3), (891, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((96, 96, 3, 3), (864, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((96, 96, 3, 3), (864, 9, 3, 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])
    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
import torch.nn.functional as F


class crop(nn.Module):

    def __init__(self):
        super().__init__()

    def forward(self, x):
        N, C, H, W = x.shape
        x = x[0:N, 0:C, 0:H - 1, 0:W]
        return x


class shift(nn.Module):

    def __init__(self):
        super().__init__()
        self.shift_down = nn.ZeroPad2d((0, 0, 1, 0))
        self.crop = crop()

    def forward(self, x):
        x = self.shift_down(x)
        x = self.crop(x)
        return x


class Conv(nn.Module):

    def __init__(self, in_channels, out_channels, bias=False, blind=True):
        super().__init__()
        self.blind = blind
        if blind:
            self.shift_down = nn.ZeroPad2d((0, 0, 1, 0))
            self.crop = crop()
        self.replicate = nn.ReplicationPad2d(1)
        self.conv = nn.Conv2d(in_channels, out_channels, 3, bias=bias)
        self.relu = nn.LeakyReLU(0.1, inplace=True)

    def forward(self, x):
        if self.blind:
            x = self.shift_down(x)
        x = self.replicate(x)
        x = self.conv(x)
        x = self.relu(x)
        if self.blind:
            x = self.crop(x)
        return x


class Pool(nn.Module):

    def __init__(self, blind=True):
        super().__init__()
        self.blind = blind
        if blind:
            self.shift = shift()
        self.pool = nn.MaxPool2d(2)

    def forward(self, x):
        if self.blind:
            x = self.shift(x)
        x = self.pool(x)
        return x


class ENC_Conv(nn.Module):

    def __init__(self, in_channels, mid_channels, out_channels, bias=False,
        reduce=True, blind=True):
        super().__init__()
        self.reduce = reduce
        self.conv1 = Conv(in_channels, mid_channels, bias=bias, blind=blind)
        self.conv2 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv3 = Conv(mid_channels, out_channels, bias=bias, blind=blind)
        if reduce:
            self.pool = Pool(blind=blind)

    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        if self.reduce:
            x = self.pool(x)
        return x


class DEC_Conv(nn.Module):

    def __init__(self, in_channels, mid_channels, out_channels, bias=False,
        blind=True):
        super().__init__()
        self.upsample = nn.Upsample(scale_factor=2, mode='nearest')
        self.conv1 = Conv(in_channels, mid_channels, bias=bias, blind=blind)
        self.conv2 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv3 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv4 = Conv(mid_channels, out_channels, bias=bias, blind=blind)

    def forward(self, x, x_in):
        x = self.upsample(x)
        diffY = x_in.size()[2] - x.size()[2]
        diffX = x_in.size()[3] - x.size()[3]
        x = F.pad(x, [diffX // 2, diffX - diffX // 2, diffY // 2, diffY - 
            diffY // 2])
        x = torch.cat((x, x_in), dim=1)
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        x = self.conv4(x)
        return x


class Blind_UNet(nn.Module):

    def __init__(self, n_channels=3, n_output=96, bias=False, blind=True):
        super().__init__()
        self.n_channels = n_channels
        self.bias = bias
        self.enc1 = ENC_Conv(n_channels, 48, 48, bias=bias, blind=blind)
        self.enc2 = ENC_Conv(48, 48, 48, bias=bias, blind=blind)
        self.enc3 = ENC_Conv(48, 96, 48, bias=bias, reduce=False, blind=blind)
        self.dec2 = DEC_Conv(96, 96, 96, bias=bias, blind=blind)
        self.dec1 = DEC_Conv(96 + n_channels, 96, n_output, bias=bias,
            blind=blind)

    def forward(self, input):
        x1 = self.enc1(input)
        x2 = self.enc2(x1)
        x = self.enc3(x2)
        x = self.dec2(x, x1)
        x = self.dec1(x, input)
        return x


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


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

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


@triton.jit
def triton_poi_fused_constant_pad_nd_replication_pad2d_0(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 504
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 6 % 7
    x0 = xindex % 6
    x2 = xindex // 42
    x3 = xindex
    tmp0 = -1 + (4 * (4 <= 0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) +
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) * (0 * (0 >= -1 +
        x1) + (-1 + x1) * (-1 + x1 > 0) < 4))
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-4 + 4 * (4 * (4 <= 0 * (0 >= -1 + x1) + (-1 +
        x1) * (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 >
        0)) * (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 4)) + 16 *
        x2 + (3 * (3 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (
        0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 +
        x0) + (-1 + x0) * (-1 + x0 > 0) < 3))), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tl.store(out_ptr0 + x3, tmp3, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_1(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 5
    x3 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-4 + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_2(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 8064
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = xindex // 6 % 7
    x2 = xindex // 42
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4 * (4 * (4 <= 0 * (0 >= -1 + x1) + (-1 + x1) *
        (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) *
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 4)) + 20 * x2 + (
        3 * (3 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >=
        -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 +
        x0) * (-1 + x0 > 0) < 3))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_3(in_ptr0, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = xindex // 2 % 2
    x2 = xindex // 4
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x0 + 8 * x1 + 20 * x2), xmask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 2 * x0 + 8 * x1 + 20 * x2), xmask,
        eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (4 + 2 * x0 + 8 * x1 + 20 * x2), xmask,
        eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr0 + (5 + 2 * x0 + 8 * x1 + 20 * x2), xmask,
        eviction_policy='evict_last')
    tmp2 = tmp1 > tmp0
    tmp3 = tl.full([1], 1, tl.int8)
    tmp4 = tl.full([1], 0, tl.int8)
    tmp5 = tl.where(tmp2, tmp3, tmp4)
    tmp6 = triton_helpers.maximum(tmp1, tmp0)
    tmp8 = tmp7 > tmp6
    tmp9 = tl.full([1], 2, tl.int8)
    tmp10 = tl.where(tmp8, tmp9, tmp5)
    tmp11 = triton_helpers.maximum(tmp7, tmp6)
    tmp13 = tmp12 > tmp11
    tmp14 = tl.full([1], 3, tl.int8)
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    triton_helpers.maximum(tmp12, tmp11)
    tl.store(out_ptr0 + x3, tmp15, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4(in_ptr0,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 2 % 3
    x0 = xindex % 2
    x2 = xindex // 6
    x3 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-8 + 2 * x0 + 8 * x1 + 20 * x2), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp4 = tl.load(in_ptr0 + (-7 + 2 * x0 + 8 * x1 + 20 * x2), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp5 = triton_helpers.maximum(tmp4, tmp3)
    tmp6 = tl.load(in_ptr0 + (-4 + 2 * x0 + 8 * x1 + 20 * x2), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tl.load(in_ptr0 + (-3 + 2 * x0 + 8 * x1 + 20 * x2), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp9 = triton_helpers.maximum(tmp8, tmp7)
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp2, tmp9, tmp10)
    tl.store(out_ptr0 + x3, tmp11, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_5(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4 % 5
    x2 = xindex // 20
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * (2 * (2 <= 0 * (0 >= -1 + x1) + (-1 + x1) *
        (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) *
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 2)) + 6 * x2 + (1 *
        (1 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >= 
        -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 +
        x0) * (-1 + x0 > 0) < 1))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_6(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 2 % 3
    x3 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-2 + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_poi_fused_max_pool2d_with_indices_7(in_ptr0, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + 6 * x0, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 6 * x0), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (2 + 6 * x0), xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr0 + (3 + 6 * x0), xmask, eviction_policy='evict_last'
        )
    tmp2 = tmp1 > tmp0
    tmp3 = tl.full([1], 1, tl.int8)
    tmp4 = tl.full([1], 0, tl.int8)
    tmp5 = tl.where(tmp2, tmp3, tmp4)
    tmp6 = triton_helpers.maximum(tmp1, tmp0)
    tmp8 = tmp7 > tmp6
    tmp9 = tl.full([1], 2, tl.int8)
    tmp10 = tl.where(tmp8, tmp9, tmp5)
    tmp11 = triton_helpers.maximum(tmp7, tmp6)
    tmp13 = tmp12 > tmp11
    tmp14 = tl.full([1], 3, tl.int8)
    tmp15 = tl.where(tmp13, tmp14, tmp10)
    triton_helpers.maximum(tmp12, tmp11)
    tl.store(out_ptr0 + x0, tmp15, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_8(in_ptr0,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = xindex // 2
    x2 = xindex
    tmp0 = -1 + x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-4 + 4 * x0 + 6 * x1), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp4 = tl.load(in_ptr0 + (-3 + 4 * x0 + 6 * x1), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp5 = triton_helpers.maximum(tmp4, tmp3)
    tmp6 = tl.load(in_ptr0 + (-2 + 4 * x0 + 6 * x1), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tl.load(in_ptr0 + (-1 + 4 * x0 + 6 * x1), tmp2 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp9 = triton_helpers.maximum(tmp8, tmp7)
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp2, tmp9, tmp10)
    tl.store(out_ptr0 + x2, tmp11, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_9(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 3 % 4
    x2 = xindex // 12
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x2 + (1 * (1 <= 0 * (0 >= -1 + x1) + (-1 +
        x1) * (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 >
        0)) * (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 1))), xmask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_10(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = xindex
    tmp0 = -1 + x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-1 + x2), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + x2, tmp10, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_11(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 4608
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 3 % 4
    x2 = xindex // 12
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * x2 + (1 * (1 <= 0 * (0 >= -1 + x1) + (-1 +
        x1) * (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 >
        0)) * (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 1))), xmask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_12(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 2
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_constant_pad_nd_13(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 // 2 % 3
    x2 = xindex // 6 % 96
    x0 = xindex % 2
    x3 = xindex // 576
    x6 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = x2
    tmp5 = tl.full([1], 48, tl.int64)
    tmp6 = tmp3 < tmp5
    tmp7 = tmp6 & tmp2
    tmp8 = tl.load(in_ptr0 + (-1 + x1), tmp7 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp9 = tl.full([XBLOCK], 1, tl.int32)
    tmp10 = tmp8 + tmp9
    tmp11 = tmp8 < 0
    tmp12 = tl.where(tmp11, tmp10, tmp8)
    tmp13 = tl.load(in_ptr0 + x0, tmp7 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp14 = tmp13 + tmp9
    tmp15 = tmp13 < 0
    tl.where(tmp15, tmp14, tmp13)
    tmp17 = tl.load(in_ptr1 + (tmp12 + 2 * x2 + 96 * x3), tmp7 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp18 = 0.0
    tmp19 = tmp17 > tmp18
    tmp20 = 0.1
    tmp21 = tmp17 * tmp20
    tmp22 = tl.where(tmp19, tmp17, tmp21)
    tmp23 = tl.full(tmp22.shape, 0.0, tmp22.dtype)
    tmp24 = tl.where(tmp7, tmp22, tmp23)
    tmp25 = tmp3 >= tmp5
    tl.full([1], 96, tl.int64)
    tmp28 = tmp25 & tmp2
    tmp29 = tl.load(in_ptr2 + (-8 + 2 * x0 + 8 * x1 + 20 * (-48 + x2) + 960 *
        x3), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp30 = tl.load(in_ptr2 + (-7 + 2 * x0 + 8 * x1 + 20 * (-48 + x2) + 960 *
        x3), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp31 = triton_helpers.maximum(tmp30, tmp29)
    tmp32 = tl.load(in_ptr2 + (-4 + 2 * x0 + 8 * x1 + 20 * (-48 + x2) + 960 *
        x3), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp33 = triton_helpers.maximum(tmp32, tmp31)
    tmp34 = tl.load(in_ptr2 + (-3 + 2 * x0 + 8 * x1 + 20 * (-48 + x2) + 960 *
        x3), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp35 = triton_helpers.maximum(tmp34, tmp33)
    tmp36 = tl.full(tmp35.shape, 0.0, tmp35.dtype)
    tmp37 = tl.where(tmp28, tmp35, tmp36)
    tmp38 = tl.where(tmp6, tmp24, tmp37)
    tmp39 = tl.full(tmp38.shape, 0.0, tmp38.dtype)
    tmp40 = tl.where(tmp2, tmp38, tmp39)
    tl.store(out_ptr0 + x6, tmp40, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_14(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 4
    x1 = xindex // 4 % 5
    x2 = xindex // 20
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (2 * (2 * (2 <= 0 * (0 >= -1 + x1) + (-1 + x1) *
        (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) *
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 2)) + 6 * x2 + (1 *
        (1 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >= 
        -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 +
        x0) * (-1 + x0 > 0) < 1))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_15(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 2 % 3
    x3 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-2 + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_16(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused_cat_constant_pad_nd_17(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 7920
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 5
    x2 = xindex // 20 % 99
    x0 = xindex % 4
    x3 = xindex // 1980
    x5 = xindex % 20
    x6 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = x2
    tmp5 = tl.full([1], 96, tl.int64)
    tmp6 = tmp3 < tmp5
    tmp7 = tmp6 & tmp2
    tmp8 = tl.load(in_ptr0 + (-1 + x1), tmp7 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp9 = tl.full([XBLOCK], 2, tl.int32)
    tmp10 = tmp8 + tmp9
    tmp11 = tmp8 < 0
    tmp12 = tl.where(tmp11, tmp10, tmp8)
    tmp13 = tl.load(in_ptr0 + x0, tmp7 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp14 = tmp13 + tmp9
    tmp15 = tmp13 < 0
    tmp16 = tl.where(tmp15, tmp14, tmp13)
    tmp17 = tl.load(in_ptr1 + (tmp16 + 2 * tmp12 + 6 * x2 + 576 * x3), tmp7 &
        xmask, eviction_policy='evict_last', other=0.0)
    tmp18 = 0.0
    tmp19 = tmp17 > tmp18
    tmp20 = 0.1
    tmp21 = tmp17 * tmp20
    tmp22 = tl.where(tmp19, tmp17, tmp21)
    tmp23 = tl.full(tmp22.shape, 0.0, tmp22.dtype)
    tmp24 = tl.where(tmp7, tmp22, tmp23)
    tmp25 = tmp3 >= tmp5
    tl.full([1], 99, tl.int64)
    tmp28 = tmp25 & tmp2
    tmp29 = tl.load(in_ptr2 + (-4 + x5 + 16 * (-96 + x2) + 48 * x3), tmp28 &
        xmask, other=0.0)
    tmp30 = tl.where(tmp6, tmp24, tmp29)
    tmp31 = tl.full(tmp30.shape, 0.0, tmp30.dtype)
    tmp32 = tl.where(tmp2, tmp30, tmp31)
    tl.store(out_ptr0 + x6, tmp32, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_18(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16632
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = xindex // 6 % 7
    x2 = xindex // 42
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4 * (4 * (4 <= 0 * (0 >= -1 + x1) + (-1 + x1) *
        (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) *
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 4)) + 20 * x2 + (
        3 * (3 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >=
        -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 +
        x0) * (-1 + x0 > 0) < 3))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_constant_pad_nd_19(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 5
    x3 = xindex
    tmp0 = -1 + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.load(in_ptr0 + (-4 + x3), tmp2 & xmask, other=0.0)
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.1
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp2, tmp8, tmp9)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_poi_fused_replication_pad2d_20(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = xindex // 6 % 7
    x2 = xindex // 42
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4 * (4 * (4 <= 0 * (0 >= -1 + x1) + (-1 + x1) *
        (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0)) *
        (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 4)) + 20 * x2 + (
        3 * (3 <= 0 * (0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >=
        -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 +
        x0) * (-1 + x0 > 0) < 3))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_21(in_ptr0, out_ptr0,
    out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)
    tl.store(out_ptr1 + x0, tmp5, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_22(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 7680
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_23(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 2304
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_24(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_25(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_26(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 1152
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_leaky_relu_backward_27(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 3840
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.1
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp6 = tmp5 > tmp1
    tl.store(out_ptr0 + x0, tmp6, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17, primals_18
        ) = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 4, 4), (48, 16, 4, 1))
    assert_size_stride(primals_2, (48, 3, 3, 3), (27, 9, 3, 1))
    assert_size_stride(primals_3, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_4, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_5, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_6, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_7, (48, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_8, (96, 48, 3, 3), (432, 9, 3, 1))
    assert_size_stride(primals_9, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_10, (48, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_11, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_12, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_13, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_14, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_15, (96, 99, 3, 3), (891, 9, 3, 1))
    assert_size_stride(primals_16, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_17, (96, 96, 3, 3), (864, 9, 3, 1))
    assert_size_stride(primals_18, (96, 96, 3, 3), (864, 9, 3, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 3, 7, 6), (126, 42, 6, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_constant_pad_nd_replication_pad2d_0[grid(504)](
            primals_1, buf0, 504, XBLOCK=256, num_warps=4, num_stages=1)
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 48, 5, 4), (960, 20, 4, 1))
        buf2 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_1[grid(3840)](buf1, buf2, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf3 = empty_strided_cuda((4, 48, 7, 6), (2016, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_2[grid(8064)](buf2, buf3, 8064,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf4 = extern_kernels.convolution(buf3, primals_3, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf4, (4, 48, 5, 4), (960, 20, 4, 1))
        buf5 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_1[grid(3840)](buf4, buf5, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf6 = empty_strided_cuda((4, 48, 7, 6), (2016, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_2[grid(8064)](buf5, buf6, 8064,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf7 = extern_kernels.convolution(buf6, primals_4, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 48, 5, 4), (960, 20, 4, 1))
        buf8 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_1[grid(3840)](buf7, buf8, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf9 = empty_strided_cuda((4, 48, 2, 2), (192, 4, 2, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_3[grid(768)](buf8, buf9, 
            768, XBLOCK=256, num_warps=4, num_stages=1)
        buf10 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_4[grid(1152)](
            buf8, buf10, 1152, XBLOCK=128, num_warps=4, num_stages=1)
        buf11 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_5[grid(3840)](buf10, buf11, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf12 = extern_kernels.convolution(buf11, primals_5, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 48, 3, 2), (288, 6, 2, 1))
        buf13 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_6[grid(1152)](buf12, buf13, 1152,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf14 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_5[grid(3840)](buf13, buf14, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf15 = extern_kernels.convolution(buf14, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 48, 3, 2), (288, 6, 2, 1))
        buf16 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_6[grid(1152)](buf15, buf16, 1152,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf17 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_5[grid(3840)](buf16, buf17, 3840,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf17, primals_7, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 48, 3, 2), (288, 6, 2, 1))
        buf19 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_6[grid(1152)](buf18, buf19, 1152,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf20 = empty_strided_cuda((4, 48, 1, 1), (48, 1, 1, 1), torch.int8)
        triton_poi_fused_max_pool2d_with_indices_7[grid(192)](buf19, buf20,
            192, XBLOCK=128, num_warps=4, num_stages=1)
        buf21 = empty_strided_cuda((4, 48, 2, 1), (96, 2, 1, 1), torch.float32)
        triton_poi_fused_constant_pad_nd_max_pool2d_with_indices_8[grid(384)](
            buf19, buf21, 384, XBLOCK=128, num_warps=4, num_stages=1)
        buf22 = empty_strided_cuda((4, 48, 4, 3), (576, 12, 3, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_9[grid(2304)](buf21, buf22, 2304,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf23 = extern_kernels.convolution(buf22, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 96, 2, 1), (192, 2, 1, 1))
        buf24 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_10[grid(768)](buf23, buf24, 768,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf25 = empty_strided_cuda((4, 96, 4, 3), (1152, 12, 3, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_11[grid(4608)](buf24, buf25, 
            4608, XBLOCK=128, num_warps=4, num_stages=1)
        buf26 = extern_kernels.convolution(buf25, primals_9, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 96, 2, 1), (192, 2, 1, 1))
        buf27 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_10[grid(768)](buf26, buf27, 768,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf28 = empty_strided_cuda((4, 96, 4, 3), (1152, 12, 3, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_11[grid(4608)](buf27, buf28, 
            4608, XBLOCK=128, num_warps=4, num_stages=1)
        buf29 = extern_kernels.convolution(buf28, primals_10, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 48, 2, 1), (96, 2, 1, 1))
        buf30 = empty_strided_cuda((2,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_12[grid(2)](buf30, 2,
            XBLOCK=2, num_warps=1, num_stages=1)
        buf31 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32
            )
        triton_poi_fused_cat_constant_pad_nd_13[grid(2304)](buf30, buf29,
            buf8, buf31, 2304, XBLOCK=128, num_warps=4, num_stages=1)
        buf32 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_14[grid(7680)](buf31, buf32, 
            7680, XBLOCK=256, num_warps=4, num_stages=1)
        buf33 = extern_kernels.convolution(buf32, primals_11, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf33, (4, 96, 3, 2), (576, 6, 2, 1))
        buf34 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_15[grid(2304)](buf33, buf34, 2304,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf35 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_14[grid(7680)](buf34, buf35, 
            7680, XBLOCK=256, num_warps=4, num_stages=1)
        buf36 = extern_kernels.convolution(buf35, primals_12, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 96, 3, 2), (576, 6, 2, 1))
        buf37 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_15[grid(2304)](buf36, buf37, 2304,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf38 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_14[grid(7680)](buf37, buf38, 
            7680, XBLOCK=256, num_warps=4, num_stages=1)
        buf39 = extern_kernels.convolution(buf38, primals_13, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf39, (4, 96, 3, 2), (576, 6, 2, 1))
        buf40 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.float32
            )
        triton_poi_fused_constant_pad_nd_15[grid(2304)](buf39, buf40, 2304,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf41 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_14[grid(7680)](buf40, buf41, 
            7680, XBLOCK=256, num_warps=4, num_stages=1)
        buf42 = extern_kernels.convolution(buf41, primals_14, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf42, (4, 96, 3, 2), (576, 6, 2, 1))
        buf43 = empty_strided_cuda((4,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_16[grid(4)](buf43, 4,
            XBLOCK=4, num_warps=1, num_stages=1)
        buf44 = empty_strided_cuda((4, 99, 5, 4), (1980, 20, 4, 1), torch.
            float32)
        triton_poi_fused_cat_constant_pad_nd_17[grid(7920)](buf43, buf42,
            primals_1, buf44, 7920, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_1
        buf45 = empty_strided_cuda((4, 99, 7, 6), (4158, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_18[grid(16632)](buf44, buf45, 
            16632, XBLOCK=128, num_warps=4, num_stages=1)
        buf46 = extern_kernels.convolution(buf45, primals_15, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf46, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf47 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_constant_pad_nd_19[grid(7680)](buf46, buf47, 7680,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf48 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_20[grid(16128)](buf47, buf48, 
            16128, XBLOCK=256, num_warps=4, num_stages=1)
        buf49 = extern_kernels.convolution(buf48, primals_16, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf49, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf50 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_constant_pad_nd_19[grid(7680)](buf49, buf50, 7680,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf51 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_20[grid(16128)](buf50, buf51, 
            16128, XBLOCK=256, num_warps=4, num_stages=1)
        buf52 = extern_kernels.convolution(buf51, primals_17, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf52, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf53 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_constant_pad_nd_19[grid(7680)](buf52, buf53, 7680,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf54 = empty_strided_cuda((4, 96, 7, 6), (4032, 42, 6, 1), torch.
            float32)
        triton_poi_fused_replication_pad2d_20[grid(16128)](buf53, buf54, 
            16128, XBLOCK=256, num_warps=4, num_stages=1)
        buf55 = extern_kernels.convolution(buf54, primals_18, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 96, 5, 4), (1920, 20, 4, 1))
        buf56 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        buf73 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.
            float32)
        triton_poi_fused_leaky_relu_leaky_relu_backward_21[grid(7680)](buf55,
            buf56, buf73, 7680, XBLOCK=256, num_warps=4, num_stages=1)
        del buf55
        buf57 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_22[grid(7680)](buf52,
            buf57, 7680, XBLOCK=256, num_warps=4, num_stages=1)
        del buf52
        buf58 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_22[grid(7680)](buf49,
            buf58, 7680, XBLOCK=256, num_warps=4, num_stages=1)
        del buf49
        buf59 = empty_strided_cuda((4, 96, 5, 4), (1920, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_22[grid(7680)](buf46,
            buf59, 7680, XBLOCK=256, num_warps=4, num_stages=1)
        del buf46
        buf60 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_23[grid(2304)](buf42,
            buf60, 2304, XBLOCK=256, num_warps=4, num_stages=1)
        del buf42
        buf61 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_23[grid(2304)](buf39,
            buf61, 2304, XBLOCK=256, num_warps=4, num_stages=1)
        del buf39
        buf62 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_23[grid(2304)](buf36,
            buf62, 2304, XBLOCK=256, num_warps=4, num_stages=1)
        del buf36
        buf63 = empty_strided_cuda((4, 96, 3, 2), (576, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_23[grid(2304)](buf33,
            buf63, 2304, XBLOCK=256, num_warps=4, num_stages=1)
        del buf33
        buf64 = empty_strided_cuda((4, 48, 2, 1), (96, 2, 1, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_24[grid(384)](buf29,
            buf64, 384, XBLOCK=256, num_warps=4, num_stages=1)
        del buf29
        buf65 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_25[grid(768)](buf26,
            buf65, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf26
        buf66 = empty_strided_cuda((4, 96, 2, 1), (192, 2, 1, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_25[grid(768)](buf23,
            buf66, 768, XBLOCK=128, num_warps=4, num_stages=1)
        del buf23
        buf67 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_26[grid(1152)](buf18,
            buf67, 1152, XBLOCK=128, num_warps=4, num_stages=1)
        del buf18
        buf68 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_26[grid(1152)](buf15,
            buf68, 1152, XBLOCK=128, num_warps=4, num_stages=1)
        del buf15
        buf69 = empty_strided_cuda((4, 48, 3, 2), (288, 6, 2, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_26[grid(1152)](buf12,
            buf69, 1152, XBLOCK=128, num_warps=4, num_stages=1)
        del buf12
        buf70 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_27[grid(3840)](buf7,
            buf70, 3840, XBLOCK=128, num_warps=4, num_stages=1)
        del buf7
        buf71 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_27[grid(3840)](buf4,
            buf71, 3840, XBLOCK=128, num_warps=4, num_stages=1)
        del buf4
        buf72 = empty_strided_cuda((4, 48, 5, 4), (960, 20, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_leaky_relu_backward_27[grid(3840)](buf1,
            buf72, 3840, XBLOCK=128, num_warps=4, num_stages=1)
        del buf1
    return (reinterpret_tensor(buf73, (4, 96, 4, 4), (1920, 20, 4, 1), 0),
        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, buf0, buf2, buf3, buf5, buf6, reinterpret_tensor(buf8,
        (4, 48, 4, 4), (960, 20, 4, 1), 0), buf9, buf10, buf11, buf13,
        buf14, buf16, buf17, reinterpret_tensor(buf19, (4, 48, 2, 2), (288,
        6, 2, 1), 0), buf20, buf21, buf22, buf24, buf25, buf27, buf28,
        buf30, buf31, buf32, buf34, buf35, buf37, buf38, buf40, buf41,
        buf43, buf44, buf45, buf47, buf48, buf50, buf51, buf53, buf54,
        buf56, buf57, buf58, buf59, buf60, buf61, buf62, buf63, buf64,
        buf65, buf66, buf67, buf68, buf69, buf70, buf71, buf72)


class crop(nn.Module):

    def __init__(self):
        super().__init__()

    def forward(self, x):
        N, C, H, W = x.shape
        x = x[0:N, 0:C, 0:H - 1, 0:W]
        return x


class shift(nn.Module):

    def __init__(self):
        super().__init__()
        self.shift_down = nn.ZeroPad2d((0, 0, 1, 0))
        self.crop = crop()

    def forward(self, x):
        x = self.shift_down(x)
        x = self.crop(x)
        return x


class Conv(nn.Module):

    def __init__(self, in_channels, out_channels, bias=False, blind=True):
        super().__init__()
        self.blind = blind
        if blind:
            self.shift_down = nn.ZeroPad2d((0, 0, 1, 0))
            self.crop = crop()
        self.replicate = nn.ReplicationPad2d(1)
        self.conv = nn.Conv2d(in_channels, out_channels, 3, bias=bias)
        self.relu = nn.LeakyReLU(0.1, inplace=True)

    def forward(self, x):
        if self.blind:
            x = self.shift_down(x)
        x = self.replicate(x)
        x = self.conv(x)
        x = self.relu(x)
        if self.blind:
            x = self.crop(x)
        return x


class Pool(nn.Module):

    def __init__(self, blind=True):
        super().__init__()
        self.blind = blind
        if blind:
            self.shift = shift()
        self.pool = nn.MaxPool2d(2)

    def forward(self, x):
        if self.blind:
            x = self.shift(x)
        x = self.pool(x)
        return x


class ENC_Conv(nn.Module):

    def __init__(self, in_channels, mid_channels, out_channels, bias=False,
        reduce=True, blind=True):
        super().__init__()
        self.reduce = reduce
        self.conv1 = Conv(in_channels, mid_channels, bias=bias, blind=blind)
        self.conv2 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv3 = Conv(mid_channels, out_channels, bias=bias, blind=blind)
        if reduce:
            self.pool = Pool(blind=blind)

    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        if self.reduce:
            x = self.pool(x)
        return x


class DEC_Conv(nn.Module):

    def __init__(self, in_channels, mid_channels, out_channels, bias=False,
        blind=True):
        super().__init__()
        self.upsample = nn.Upsample(scale_factor=2, mode='nearest')
        self.conv1 = Conv(in_channels, mid_channels, bias=bias, blind=blind)
        self.conv2 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv3 = Conv(mid_channels, mid_channels, bias=bias, blind=blind)
        self.conv4 = Conv(mid_channels, out_channels, bias=bias, blind=blind)

    def forward(self, x, x_in):
        x = self.upsample(x)
        diffY = x_in.size()[2] - x.size()[2]
        diffX = x_in.size()[3] - x.size()[3]
        x = F.pad(x, [diffX // 2, diffX - diffX // 2, diffY // 2, diffY - 
            diffY // 2])
        x = torch.cat((x, x_in), dim=1)
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        x = self.conv4(x)
        return x


class Blind_UNetNew(nn.Module):

    def __init__(self, n_channels=3, n_output=96, bias=False, blind=True):
        super().__init__()
        self.n_channels = n_channels
        self.bias = bias
        self.enc1 = ENC_Conv(n_channels, 48, 48, bias=bias, blind=blind)
        self.enc2 = ENC_Conv(48, 48, 48, bias=bias, blind=blind)
        self.enc3 = ENC_Conv(48, 96, 48, bias=bias, reduce=False, blind=blind)
        self.dec2 = DEC_Conv(96, 96, 96, bias=bias, blind=blind)
        self.dec1 = DEC_Conv(96 + n_channels, 96, n_output, bias=bias,
            blind=blind)

    def forward(self, input_0):
        primals_2 = self.enc1.conv1.conv.weight
        primals_3 = self.enc1.conv2.conv.weight
        primals_4 = self.enc1.conv3.conv.weight
        primals_5 = self.enc2.conv1.conv.weight
        primals_6 = self.enc2.conv2.conv.weight
        primals_7 = self.enc2.conv3.conv.weight
        primals_8 = self.enc3.conv1.conv.weight
        primals_9 = self.enc3.conv2.conv.weight
        primals_10 = self.enc3.conv3.conv.weight
        primals_11 = self.dec2.conv1.conv.weight
        primals_12 = self.dec2.conv2.conv.weight
        primals_13 = self.dec2.conv3.conv.weight
        primals_14 = self.dec2.conv4.conv.weight
        primals_15 = self.dec1.conv1.conv.weight
        primals_16 = self.dec1.conv2.conv.weight
        primals_17 = self.dec1.conv3.conv.weight
        primals_18 = self.dec1.conv4.conv.weight
        primals_1 = 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])
        return output[0]
