# 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/xi/cxiahmsjnazi2upyvo75dtcaxy3z3ofrm5it2sacgswdzkpj4lmt.py
# Topologically Sorted Source Nodes: [x], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp, aten._unsafe_index]
# Source node to ATen node mapping:
#   x => _unsafe_index, _unsafe_index_1, _unsafe_index_2, _unsafe_index_3, add, add_4, add_5, add_6, clamp_max_2, clamp_max_3, clamp_min, clamp_min_2, clamp_min_3, convert_element_type, convert_element_type_1, convert_element_type_3, iota, mul, mul_2, mul_3, mul_4, sub, sub_2, sub_3, sub_4, sub_5, sub_6
# Graph fragment:
#   %iota : [num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (8,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %convert_element_type : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%iota, torch.float32), kwargs = {})
#   %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type, 0.5), kwargs = {})
#   %mul : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add, 0.5), kwargs = {})
#   %sub : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%mul, 0.5), kwargs = {})
#   %clamp_min : [num_users=3] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub, 0.0), kwargs = {})
#   %convert_element_type_1 : [num_users=4] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%view, torch.int64), kwargs = {})
#   %convert_element_type_3 : [num_users=4] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%clamp_min, torch.int64), kwargs = {})
#   %_unsafe_index : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_1, [None, None, %convert_element_type_1, %convert_element_type_3]), kwargs = {})
#   %_unsafe_index_1 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_1, [None, None, %convert_element_type_1, %clamp_max_1]), kwargs = {})
#   %_unsafe_index_2 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_1, [None, None, %clamp_max, %convert_element_type_3]), kwargs = {})
#   %_unsafe_index_3 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_1, [None, None, %clamp_max, %clamp_max_1]), kwargs = {})
#   %sub_2 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%clamp_min, %convert_element_type_3), kwargs = {})
#   %clamp_min_2 : [num_users=1] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_2, 0.0), kwargs = {})
#   %clamp_max_2 : [num_users=2] = call_function[target=torch.ops.aten.clamp_max.default](args = (%clamp_min_2, 1.0), kwargs = {})
#   %sub_3 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_1, %_unsafe_index), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_3, %clamp_max_2), kwargs = {})
#   %add_4 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index, %mul_2), kwargs = {})
#   %sub_4 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_3, %_unsafe_index_2), kwargs = {})
#   %mul_3 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_4, %clamp_max_2), kwargs = {})
#   %add_5 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index_2, %mul_3), kwargs = {})
#   %sub_5 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%view, %convert_element_type_1), kwargs = {})
#   %clamp_min_3 : [num_users=1] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_5, 0.0), kwargs = {})
#   %clamp_max_3 : [num_users=1] = call_function[target=torch.ops.aten.clamp_max.default](args = (%clamp_min_3, 1.0), kwargs = {})
#   %sub_6 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%add_5, %add_4), kwargs = {})
#   %mul_4 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_6, %clamp_max_3), kwargs = {})
#   %add_6 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%add_4, %mul_4), kwargs = {})
triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_mul_sub_0 = async_compile.triton('triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_mul_sub_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=[131072], 
    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__to_copy__unsafe_index_add_arange_clamp_mul_sub_0', 'mutated_arg_names': ['in_out_ptr0'], '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__unsafe_index_add_arange_clamp_mul_sub_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 131072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 8) % 8
    x0 = xindex % 8
    x2 = (xindex // 64)
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 3, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tmp13 = x0
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp14 + tmp2
    tmp16 = tmp15 * tmp2
    tmp17 = tmp16 - tmp2
    tmp18 = triton_helpers.maximum(tmp17, tmp6)
    tmp19 = tmp18.to(tl.int32)
    tmp20 = tmp19 + tmp9
    tmp21 = triton_helpers.minimum(tmp20, tmp11)
    tmp22 = tl.load(in_ptr0 + (tmp21 + (4*tmp12) + (16*x2)), None, eviction_policy='evict_last')
    tmp23 = tl.load(in_ptr0 + (tmp19 + (4*tmp12) + (16*x2)), None, eviction_policy='evict_last')
    tmp24 = tmp22 - tmp23
    tmp25 = tmp19.to(tl.float32)
    tmp26 = tmp18 - tmp25
    tmp27 = triton_helpers.maximum(tmp26, tmp6)
    tmp28 = 1.0
    tmp29 = triton_helpers.minimum(tmp27, tmp28)
    tmp30 = tmp24 * tmp29
    tmp31 = tmp23 + tmp30
    tmp32 = tl.load(in_ptr0 + (tmp19 + (4*tmp8) + (16*x2)), None, eviction_policy='evict_last')
    tmp33 = tl.load(in_ptr0 + (tmp21 + (4*tmp8) + (16*x2)), None, eviction_policy='evict_last')
    tmp34 = tmp33 - tmp32
    tmp35 = tmp34 * tmp29
    tmp36 = tmp32 + tmp35
    tmp37 = tmp31 - tmp36
    tmp38 = tmp8.to(tl.float32)
    tmp39 = tmp7 - tmp38
    tmp40 = triton_helpers.maximum(tmp39, tmp6)
    tmp41 = triton_helpers.minimum(tmp40, tmp28)
    tmp42 = tmp37 * tmp41
    tmp43 = tmp36 + tmp42
    tl.store(in_out_ptr0 + (x4), tmp43, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/kp/ckplomantwvzkj5nmcdcf4fh2kpbj6a7u6dq2kbxpctcweqe7wwb.py
# Topologically Sorted Source Nodes: [pad], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad => _unsafe_index_4, _unsafe_index_5
# Graph fragment:
#   %_unsafe_index_4 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_6, [None, None, %sub_8, None]), kwargs = {})
#   %_unsafe_index_5 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_4, [None, None, None, %sub_8]), kwargs = {})
triton_poi_fused_reflection_pad2d_1 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[262144], 
    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_reflection_pad2d_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_reflection_pad2d_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 204800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 10
    x1 = (xindex // 10) % 10
    x2 = (xindex // 100)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + ((-1)*(tl_math.abs((-7) + (tl_math.abs((-1) + x0))))) + ((-8)*(tl_math.abs((-7) + (tl_math.abs((-1) + x1))))) + (64*x2)), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/hs/chsxkzat4sjlic2u7nqefjzxbmm6gxb2ingitga4b5x4rr3kkd6g.py
# Topologically Sorted Source Nodes: [x_1, x_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_1 => convolution_1
#   x_3 => add_7, rsqrt, var_mean
# Graph fragment:
#   %convolution_1 : [num_users=4] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_5, %primals_3, %primals_4, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_2, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_7 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem, 1e-05), kwargs = {})
#   %rsqrt : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_7,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_2 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.persistent_reduction(
    size_hints=[1024, 64],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_2', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 4, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_2(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 1024
    rnumel = 64
    RBLOCK: tl.constexpr = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_out_ptr0 + (r2 + (64*x3)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [XBLOCK, RBLOCK])
    tmp10 = tl.where(xmask, tmp8, 0)
    tmp11 = tl.broadcast_to(tmp8, [XBLOCK, RBLOCK])
    tmp13 = tl.where(xmask, tmp11, 0)
    tmp14 = tl.sum(tmp13, 1)[:, None]
    tmp15 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp16 = tmp15.to(tl.float32)
    tmp17 = tmp14 / tmp16
    tmp18 = tmp8 - tmp17
    tmp19 = tmp18 * tmp18
    tmp20 = tl.broadcast_to(tmp19, [XBLOCK, RBLOCK])
    tmp22 = tl.where(xmask, tmp20, 0)
    tmp23 = tl.sum(tmp22, 1)[:, None]
    tmp24 = 64.0
    tmp25 = tmp23 / tmp24
    tmp26 = 1e-05
    tmp27 = tmp25 + tmp26
    tmp28 = libdevice.rsqrt(tmp27)
    tl.store(in_out_ptr0 + (r2 + (64*x3)), tmp2, xmask)
    tl.store(out_ptr2 + (x3), tmp28, xmask)
    tl.store(out_ptr0 + (x3), tmp17, xmask)
    tl.store(out_ptr1 + (x3), tmp23, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/jd/cjd5vx7w4a6e6j2yet6y2c2dhx4s6id7olhzl5axdkbbxgphtlm6.py
# Topologically Sorted Source Nodes: [pad_1], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_1 => _unsafe_index_6, _unsafe_index_7
# Graph fragment:
#   %_unsafe_index_6 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%view_3, [None, None, %sub_8, None]), kwargs = {})
#   %_unsafe_index_7 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_6, [None, None, None, %sub_8]), kwargs = {})
triton_poi_fused_reflection_pad2d_3 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[131072], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 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_reflection_pad2d_3', '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_reflection_pad2d_3(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 102400
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 10
    x1 = (xindex // 10) % 10
    x2 = (xindex // 100)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + ((-1)*(tl_math.abs((-7) + (tl_math.abs((-1) + x0))))) + ((-8)*(tl_math.abs((-7) + (tl_math.abs((-1) + x1))))) + (64*x2)), None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + (x2), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + (x2), None, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 64.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (x3), tmp14, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/2s/c2szkuikdzlctxtm2hvmdqloipsoecl6poecribu6zdb376amacc.py
# Topologically Sorted Source Nodes: [x_7], Original ATen: [aten._to_copy]
# Source node to ATen node mapping:
#   x_7 => convert_element_type_5
# Graph fragment:
#   %convert_element_type_5 : [num_users=5] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%view_6, torch.int64), kwargs = {})
triton_poi_fused__to_copy_4 = async_compile.triton('triton_poi_fused__to_copy_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=[16], 
    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, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_4', '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_4(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + (x0), tmp8, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/lc/clcfvqubvq4ase6wnusdyvw4lnshkvto66yfi27kqv2unnajvlvc.py
# Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.add, aten.clamp]
# Source node to ATen node mapping:
#   x_7 => add_11, clamp_max_4
# Graph fragment:
#   %add_11 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_5, 1), kwargs = {})
#   %clamp_max_4 : [num_users=3] = call_function[target=torch.ops.aten.clamp_max.default](args = (%add_11, 7), kwargs = {})
triton_poi_fused_add_clamp_5 = async_compile.triton('triton_poi_fused_add_clamp_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=[16], 
    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, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_clamp_5', '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_add_clamp_5(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 7, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + (x0), tmp12, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/x4/cx4vtz5jo3jkxjyakvhxwh7ayn43j7lhkutujms5t37rn7yncjjd.py
# Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
# Source node to ATen node mapping:
#   x_7 => add_10, clamp_max_6, clamp_min_4, clamp_min_6, convert_element_type_4, iota_6, mul_9, sub_17, sub_19
# Graph fragment:
#   %iota_6 : [num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (16,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %convert_element_type_4 : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%iota_6, torch.float32), kwargs = {})
#   %add_10 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_4, 0.5), kwargs = {})
#   %mul_9 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_10, 0.5), kwargs = {})
#   %sub_17 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%mul_9, 0.5), kwargs = {})
#   %clamp_min_4 : [num_users=3] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_17, 0.0), kwargs = {})
#   %sub_19 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%clamp_min_4, %convert_element_type_7), kwargs = {})
#   %clamp_min_6 : [num_users=1] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_19, 0.0), kwargs = {})
#   %clamp_max_6 : [num_users=3] = call_function[target=torch.ops.aten.clamp_max.default](args = (%clamp_min_6, 1.0), kwargs = {})
triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6 = async_compile.triton('triton_poi_fused__to_copy_add_arange_clamp_mul_sub_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=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6', '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_clamp_mul_sub_6(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/n6/cn6yudebezqea35gwlk2njuqgmvykhtqawhajvnutkug6d2y74zh.py
# Topologically Sorted Source Nodes: [h, x_7], Original ATen: [aten.add, aten._unsafe_index, aten.sub, aten.mul]
# Source node to ATen node mapping:
#   h => add_9
#   x_7 => _unsafe_index_10, _unsafe_index_11, _unsafe_index_8, _unsafe_index_9, add_14, add_15, add_16, mul_11, mul_12, mul_13, sub_20, sub_21, sub_23
# Graph fragment:
#   %add_9 : [num_users=4] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution, %view_5), kwargs = {})
#   %_unsafe_index_8 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_9, [None, None, %convert_element_type_5, %convert_element_type_7]), kwargs = {})
#   %_unsafe_index_9 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_9, [None, None, %convert_element_type_5, %clamp_max_5]), kwargs = {})
#   %_unsafe_index_10 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_9, [None, None, %clamp_max_4, %convert_element_type_7]), kwargs = {})
#   %_unsafe_index_11 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_9, [None, None, %clamp_max_4, %clamp_max_5]), kwargs = {})
#   %sub_20 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_9, %_unsafe_index_8), kwargs = {})
#   %mul_11 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_20, %clamp_max_6), kwargs = {})
#   %add_14 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index_8, %mul_11), kwargs = {})
#   %sub_21 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_11, %_unsafe_index_10), kwargs = {})
#   %mul_12 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_21, %clamp_max_6), kwargs = {})
#   %add_15 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index_10, %mul_12), kwargs = {})
#   %sub_23 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%add_15, %add_14), kwargs = {})
#   %mul_13 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_23, %clamp_max_7), kwargs = {})
#   %add_16 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%add_14, %mul_13), kwargs = {})
triton_poi_fused__unsafe_index_add_mul_sub_7 = async_compile.triton('triton_poi_fused__unsafe_index_add_mul_sub_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=[262144], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i64', 2: '*i64', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*i64', 8: '*i64', 9: '*fp32', 10: '*fp32', 11: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__unsafe_index_add_mul_sub_7', 'mutated_arg_names': ['in_out_ptr1'], 'no_x_dim': False, 'num_load': 8, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__unsafe_index_add_mul_sub_7(in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, xnumel, XBLOCK : tl.constexpr):
    xnumel = 262144
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 16) % 16
    x0 = xindex % 16
    x2 = (xindex // 256)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x1), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (x0), None, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr5 + (x2), None, eviction_policy='evict_last')
    tmp26 = tl.load(in_ptr6 + (x1), None, eviction_policy='evict_last')
    tmp38 = tl.load(in_ptr7 + (x0), None, eviction_policy='evict_last')
    tmp51 = tl.load(in_ptr8 + (x0), None, eviction_policy='evict_last')
    tmp66 = tl.load(in_ptr9 + (x1), None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 8, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + (8*tmp4) + (64*x2)), None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + (tmp8 + (8*tmp4) + (64*x2)), None, eviction_policy='evict_last')
    tmp11 = 0.0
    tmp12 = tmp10 > tmp11
    tmp13 = 0.2
    tmp14 = tmp10 * tmp13
    tmp15 = tl.where(tmp12, tmp10, tmp14)
    tmp17 = tmp15 - tmp16
    tmp19 = 64.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp17 * tmp23
    tmp25 = tmp9 + tmp24
    tmp27 = tmp26 + tmp1
    tmp28 = tmp26 < 0
    tmp29 = tl.where(tmp28, tmp27, tmp26)
    tmp30 = tl.load(in_ptr2 + (tmp8 + (8*tmp29) + (64*x2)), None, eviction_policy='evict_last')
    tmp31 = tl.load(in_ptr3 + (tmp8 + (8*tmp29) + (64*x2)), None, eviction_policy='evict_last')
    tmp32 = tmp31 > tmp11
    tmp33 = tmp31 * tmp13
    tmp34 = tl.where(tmp32, tmp31, tmp33)
    tmp35 = tmp34 - tmp16
    tmp36 = tmp35 * tmp23
    tmp37 = tmp30 + tmp36
    tmp39 = tmp38 + tmp1
    tmp40 = tmp38 < 0
    tmp41 = tl.where(tmp40, tmp39, tmp38)
    tmp42 = tl.load(in_ptr2 + (tmp41 + (8*tmp29) + (64*x2)), None, eviction_policy='evict_last')
    tmp43 = tl.load(in_ptr3 + (tmp41 + (8*tmp29) + (64*x2)), None, eviction_policy='evict_last')
    tmp44 = tmp43 > tmp11
    tmp45 = tmp43 * tmp13
    tmp46 = tl.where(tmp44, tmp43, tmp45)
    tmp47 = tmp46 - tmp16
    tmp48 = tmp47 * tmp23
    tmp49 = tmp42 + tmp48
    tmp50 = tmp49 - tmp37
    tmp52 = tmp50 * tmp51
    tmp53 = tmp37 + tmp52
    tmp54 = tl.load(in_ptr2 + (tmp41 + (8*tmp4) + (64*x2)), None, eviction_policy='evict_last')
    tmp55 = tl.load(in_ptr3 + (tmp41 + (8*tmp4) + (64*x2)), None, eviction_policy='evict_last')
    tmp56 = tmp55 > tmp11
    tmp57 = tmp55 * tmp13
    tmp58 = tl.where(tmp56, tmp55, tmp57)
    tmp59 = tmp58 - tmp16
    tmp60 = tmp59 * tmp23
    tmp61 = tmp54 + tmp60
    tmp62 = tmp61 - tmp25
    tmp63 = tmp62 * tmp51
    tmp64 = tmp25 + tmp63
    tmp65 = tmp64 - tmp53
    tmp67 = tmp65 * tmp66
    tmp68 = tmp53 + tmp67
    tl.store(in_out_ptr1 + (x4), tmp68, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/jy/cjycjlp2wzxavcqz3y5suh345vyeblauh6fm5zvjgw7xlelavo2c.py
# Topologically Sorted Source Nodes: [pad_2], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_2 => _unsafe_index_12, _unsafe_index_13
# Graph fragment:
#   %_unsafe_index_12 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_16, [None, None, %sub_25, None]), kwargs = {})
#   %_unsafe_index_13 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_12, [None, None, None, %sub_25]), kwargs = {})
triton_poi_fused_reflection_pad2d_8 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[524288], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_reflection_pad2d_8', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_reflection_pad2d_8(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 331776
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 18
    x1 = (xindex // 18) % 18
    x2 = (xindex // 324)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + ((-1)*(tl_math.abs((-15) + (tl_math.abs((-1) + x0))))) + ((-16)*(tl_math.abs((-15) + (tl_math.abs((-1) + x1))))) + (256*x2)), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/l2/cl2ern5avnef3giit2rtcyfhgfdoyitok5cpzlfmcsgztig5vkhq.py
# Topologically Sorted Source Nodes: [x_8, x_10], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_10 => add_17, rsqrt_2, var_mean_2
#   x_8 => convolution_4
# Graph fragment:
#   %convolution_4 : [num_users=4] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_13, %primals_8, %primals_9, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_2 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_8, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_17 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_4, 1e-05), kwargs = {})
#   %rsqrt_2 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_17,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_9 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_9', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.persistent_reduction(
    size_hints=[512, 256],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_9', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': True, 'num_load': 2, 'num_reduction': 4, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_9(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel):
    xnumel = 512
    XBLOCK: tl.constexpr = 1
    rnumel = 256
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    xmask = tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    roffset = 0
    rmask = tl.full([RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + (r2 + (256*x3)), None)
    tmp1 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [RBLOCK])
    tmp10 = tl.broadcast_to(tmp8, [RBLOCK])
    tmp12 = triton_helpers.promote_to_tensor(tl.sum(tmp10, 0))
    tmp13 = tl.full([1], 256, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp8 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [RBLOCK])
    tmp20 = triton_helpers.promote_to_tensor(tl.sum(tmp18, 0))
    tmp21 = 256.0
    tmp22 = tmp20 / tmp21
    tmp23 = 1e-05
    tmp24 = tmp22 + tmp23
    tmp25 = libdevice.rsqrt(tmp24)
    tl.store(in_out_ptr0 + (r2 + (256*x3)), tmp2, None)
    tl.store(out_ptr2 + (x3), tmp25, None)
    tl.store(out_ptr0 + (x3), tmp15, None)
    tl.store(out_ptr1 + (x3), tmp20, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/fu/cfutuevrpadtuliusfqog5rko7qwlset3d63kzxxerfcf7ucizrq.py
# Topologically Sorted Source Nodes: [pad_3], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_3 => _unsafe_index_14, _unsafe_index_15
# Graph fragment:
#   %_unsafe_index_14 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%view_9, [None, None, %sub_25, None]), kwargs = {})
#   %_unsafe_index_15 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_14, [None, None, None, %sub_25]), kwargs = {})
triton_poi_fused_reflection_pad2d_10 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[262144], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 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_reflection_pad2d_10', '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_reflection_pad2d_10(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 165888
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 18
    x1 = (xindex // 18) % 18
    x2 = (xindex // 324)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + ((-1)*(tl_math.abs((-15) + (tl_math.abs((-1) + x0))))) + ((-16)*(tl_math.abs((-15) + (tl_math.abs((-1) + x1))))) + (256*x2)), None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + (x2), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + (x2), None, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 256.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (x3), tmp14, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/2s/c2skvccv3trjvegythfgrzvr57dqyst2ortdwttpvjzmnrtvb4xh.py
# Topologically Sorted Source Nodes: [x_14], Original ATen: [aten._to_copy]
# Source node to ATen node mapping:
#   x_14 => convert_element_type_9
# Graph fragment:
#   %convert_element_type_9 : [num_users=5] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%view_12, torch.int64), kwargs = {})
triton_poi_fused__to_copy_11 = async_compile.triton('triton_poi_fused__to_copy_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=[32], 
    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, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_11', '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_11(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + (x0), tmp8, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/x2/cx2hpoygzd32s223gjymvuzfq2xvskkwmi5pqwbspttgaoekur4l.py
# Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.add, aten.clamp]
# Source node to ATen node mapping:
#   x_14 => add_21, clamp_max_8
# Graph fragment:
#   %add_21 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_9, 1), kwargs = {})
#   %clamp_max_8 : [num_users=3] = call_function[target=torch.ops.aten.clamp_max.default](args = (%add_21, 15), kwargs = {})
triton_poi_fused_add_clamp_12 = async_compile.triton('triton_poi_fused_add_clamp_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=[32], 
    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, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_clamp_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_add_clamp_12(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 15, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + (x0), tmp12, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/qb/cqbm6db3nwk47g6jc6tymnxtefewgikbykmz54aimdz3rholwmdi.py
# Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
# Source node to ATen node mapping:
#   x_14 => add_20, clamp_max_10, clamp_min_10, clamp_min_8, convert_element_type_8, iota_12, mul_18, sub_34, sub_36
# Graph fragment:
#   %iota_12 : [num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (32,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %convert_element_type_8 : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%iota_12, torch.float32), kwargs = {})
#   %add_20 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_8, 0.5), kwargs = {})
#   %mul_18 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_20, 0.5), kwargs = {})
#   %sub_34 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%mul_18, 0.5), kwargs = {})
#   %clamp_min_8 : [num_users=3] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_34, 0.0), kwargs = {})
#   %sub_36 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%clamp_min_8, %convert_element_type_11), kwargs = {})
#   %clamp_min_10 : [num_users=1] = call_function[target=torch.ops.aten.clamp_min.default](args = (%sub_36, 0.0), kwargs = {})
#   %clamp_max_10 : [num_users=3] = call_function[target=torch.ops.aten.clamp_max.default](args = (%clamp_min_10, 1.0), kwargs = {})
triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13 = async_compile.triton('triton_poi_fused__to_copy_add_arange_clamp_mul_sub_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=[32], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13', '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_clamp_mul_sub_13(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/oh/coha2shqyu72szwlpt3ipuhejsbvc3k3jqsrzua57yai6oal2nfp.py
# Topologically Sorted Source Nodes: [h_1, x_14], Original ATen: [aten.add, aten._unsafe_index, aten.sub, aten.mul]
# Source node to ATen node mapping:
#   h_1 => add_19
#   x_14 => _unsafe_index_16, _unsafe_index_17, _unsafe_index_18, _unsafe_index_19, add_24, add_25, add_26, mul_20, mul_21, mul_22, sub_37, sub_38, sub_40
# Graph fragment:
#   %add_19 : [num_users=4] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_3, %view_11), kwargs = {})
#   %_unsafe_index_16 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_19, [None, None, %convert_element_type_9, %convert_element_type_11]), kwargs = {})
#   %_unsafe_index_17 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_19, [None, None, %convert_element_type_9, %clamp_max_9]), kwargs = {})
#   %_unsafe_index_18 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_19, [None, None, %clamp_max_8, %convert_element_type_11]), kwargs = {})
#   %_unsafe_index_19 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_19, [None, None, %clamp_max_8, %clamp_max_9]), kwargs = {})
#   %sub_37 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_17, %_unsafe_index_16), kwargs = {})
#   %mul_20 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_37, %clamp_max_10), kwargs = {})
#   %add_24 : [num_users=2] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index_16, %mul_20), kwargs = {})
#   %sub_38 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%_unsafe_index_19, %_unsafe_index_18), kwargs = {})
#   %mul_21 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_38, %clamp_max_10), kwargs = {})
#   %add_25 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%_unsafe_index_18, %mul_21), kwargs = {})
#   %sub_40 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%add_25, %add_24), kwargs = {})
#   %mul_22 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sub_40, %clamp_max_11), kwargs = {})
#   %add_26 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%add_24, %mul_22), kwargs = {})
triton_poi_fused__unsafe_index_add_mul_sub_14 = async_compile.triton('triton_poi_fused__unsafe_index_add_mul_sub_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=[524288], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*i64', 2: '*i64', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*i64', 8: '*i64', 9: '*fp32', 10: '*fp32', 11: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__unsafe_index_add_mul_sub_14', 'mutated_arg_names': ['in_out_ptr1'], 'no_x_dim': False, 'num_load': 8, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__unsafe_index_add_mul_sub_14(in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8, in_ptr9, xnumel, XBLOCK : tl.constexpr):
    xnumel = 524288
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 32) % 32
    x0 = xindex % 32
    x2 = (xindex // 1024)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x1), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + (x0), None, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr5 + (x2), None, eviction_policy='evict_last')
    tmp26 = tl.load(in_ptr6 + (x1), None, eviction_policy='evict_last')
    tmp38 = tl.load(in_ptr7 + (x0), None, eviction_policy='evict_last')
    tmp51 = tl.load(in_ptr8 + (x0), None, eviction_policy='evict_last')
    tmp66 = tl.load(in_ptr9 + (x1), None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 16, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + (16*tmp4) + (256*x2)), None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + (tmp8 + (16*tmp4) + (256*x2)), None, eviction_policy='evict_last')
    tmp11 = 0.0
    tmp12 = tmp10 > tmp11
    tmp13 = 0.2
    tmp14 = tmp10 * tmp13
    tmp15 = tl.where(tmp12, tmp10, tmp14)
    tmp17 = tmp15 - tmp16
    tmp19 = 256.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp17 * tmp23
    tmp25 = tmp9 + tmp24
    tmp27 = tmp26 + tmp1
    tmp28 = tmp26 < 0
    tmp29 = tl.where(tmp28, tmp27, tmp26)
    tmp30 = tl.load(in_ptr2 + (tmp8 + (16*tmp29) + (256*x2)), None, eviction_policy='evict_last')
    tmp31 = tl.load(in_ptr3 + (tmp8 + (16*tmp29) + (256*x2)), None, eviction_policy='evict_last')
    tmp32 = tmp31 > tmp11
    tmp33 = tmp31 * tmp13
    tmp34 = tl.where(tmp32, tmp31, tmp33)
    tmp35 = tmp34 - tmp16
    tmp36 = tmp35 * tmp23
    tmp37 = tmp30 + tmp36
    tmp39 = tmp38 + tmp1
    tmp40 = tmp38 < 0
    tmp41 = tl.where(tmp40, tmp39, tmp38)
    tmp42 = tl.load(in_ptr2 + (tmp41 + (16*tmp29) + (256*x2)), None, eviction_policy='evict_last')
    tmp43 = tl.load(in_ptr3 + (tmp41 + (16*tmp29) + (256*x2)), None, eviction_policy='evict_last')
    tmp44 = tmp43 > tmp11
    tmp45 = tmp43 * tmp13
    tmp46 = tl.where(tmp44, tmp43, tmp45)
    tmp47 = tmp46 - tmp16
    tmp48 = tmp47 * tmp23
    tmp49 = tmp42 + tmp48
    tmp50 = tmp49 - tmp37
    tmp52 = tmp50 * tmp51
    tmp53 = tmp37 + tmp52
    tmp54 = tl.load(in_ptr2 + (tmp41 + (16*tmp4) + (256*x2)), None, eviction_policy='evict_last')
    tmp55 = tl.load(in_ptr3 + (tmp41 + (16*tmp4) + (256*x2)), None, eviction_policy='evict_last')
    tmp56 = tmp55 > tmp11
    tmp57 = tmp55 * tmp13
    tmp58 = tl.where(tmp56, tmp55, tmp57)
    tmp59 = tmp58 - tmp16
    tmp60 = tmp59 * tmp23
    tmp61 = tmp54 + tmp60
    tmp62 = tmp61 - tmp25
    tmp63 = tmp62 * tmp51
    tmp64 = tmp25 + tmp63
    tmp65 = tmp64 - tmp53
    tmp67 = tmp65 * tmp66
    tmp68 = tmp53 + tmp67
    tl.store(in_out_ptr1 + (x4), tmp68, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/ff/cffh5gmajwo7gyt4ksxpny4iau2n3d676vtws2qmrnl5okbhuma3.py
# Topologically Sorted Source Nodes: [pad_4], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_4 => _unsafe_index_20, _unsafe_index_21
# Graph fragment:
#   %_unsafe_index_20 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_26, [None, None, %sub_42, None]), kwargs = {})
#   %_unsafe_index_21 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_20, [None, None, None, %sub_42]), kwargs = {})
triton_poi_fused_reflection_pad2d_15 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[1048576], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_reflection_pad2d_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_reflection_pad2d_15(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 591872
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 34
    x1 = (xindex // 34) % 34
    x2 = (xindex // 1156)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + ((-1)*(tl_math.abs((-31) + (tl_math.abs((-1) + x0))))) + ((-32)*(tl_math.abs((-31) + (tl_math.abs((-1) + x1))))) + (1024*x2)), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/x3/cx3ippaeawuh25jno6uwk4a5w6d2cyjlxxtiyaxnetor7qluazzf.py
# Topologically Sorted Source Nodes: [x_15, x_17], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_15 => convolution_7
#   x_17 => add_27, rsqrt_4, var_mean_4
# Graph fragment:
#   %convolution_7 : [num_users=4] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_21, %primals_13, %primals_14, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_4 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_14, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_27 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_8, 1e-05), kwargs = {})
#   %rsqrt_4 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_27,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_16 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_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.persistent_reduction(
    size_hints=[256, 1024],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_16', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': True, 'num_load': 2, 'num_reduction': 4, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_16(in_out_ptr0, in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel):
    xnumel = 256
    XBLOCK: tl.constexpr = 1
    rnumel = 1024
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    xmask = tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    roffset = 0
    rmask = tl.full([RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + (r2 + (1024*x3)), None)
    tmp1 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [RBLOCK])
    tmp10 = tl.broadcast_to(tmp8, [RBLOCK])
    tmp12 = triton_helpers.promote_to_tensor(tl.sum(tmp10, 0))
    tmp13 = tl.full([1], 1024, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp8 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [RBLOCK])
    tmp20 = triton_helpers.promote_to_tensor(tl.sum(tmp18, 0))
    tmp21 = 1024.0
    tmp22 = tmp20 / tmp21
    tmp23 = 1e-05
    tmp24 = tmp22 + tmp23
    tmp25 = libdevice.rsqrt(tmp24)
    tl.store(in_out_ptr0 + (r2 + (1024*x3)), tmp2, None)
    tl.store(out_ptr2 + (x3), tmp25, None)
    tl.store(out_ptr0 + (x3), tmp15, None)
    tl.store(out_ptr1 + (x3), tmp20, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/2v/c2v7i7yipctqbhkjdws47zy74jpsnxqkh3kaz5hykvq7z5mq6oih.py
# Topologically Sorted Source Nodes: [pad_5], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_5 => _unsafe_index_22, _unsafe_index_23
# Graph fragment:
#   %_unsafe_index_22 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%view_15, [None, None, %sub_42, None]), kwargs = {})
#   %_unsafe_index_23 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_22, [None, None, None, %sub_42]), kwargs = {})
triton_poi_fused_reflection_pad2d_17 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[524288], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 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_reflection_pad2d_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_reflection_pad2d_17(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 295936
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = (xindex // 34) % 34
    x2 = (xindex // 1156)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + ((-1)*(tl_math.abs((-31) + (tl_math.abs((-1) + x0))))) + ((-32)*(tl_math.abs((-31) + (tl_math.abs((-1) + x1))))) + (1024*x2)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + (x2), xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + (x2), xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 1024.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + (x3), tmp14, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/32/c32aw436pbvdvtwrkxrflicnxori6n2ixviddb6ofol76tkuciny.py
# Topologically Sorted Source Nodes: [x_18, x_20, h_2], Original ATen: [aten.convolution, aten._native_batch_norm_legit, aten.add]
# Source node to ATen node mapping:
#   h_2 => add_29
#   x_18 => convolution_8
#   x_20 => add_28, rsqrt_5, var_mean_5
# Graph fragment:
#   %convolution_8 : [num_users=4] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_23, %primals_15, %primals_16, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_5 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_16, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_28 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_10, 1e-05), kwargs = {})
#   %rsqrt_5 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_28,), kwargs = {})
#   %add_29 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_6, %view_17), kwargs = {})
triton_per_fused__native_batch_norm_legit_add_convolution_18 = async_compile.triton('triton_per_fused__native_batch_norm_legit_add_convolution_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.persistent_reduction(
    size_hints=[256, 1024],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_add_convolution_18', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], 'no_x_dim': True, 'num_load': 3, 'num_reduction': 4, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_per_fused__native_batch_norm_legit_add_convolution_18(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, out_ptr2, xnumel, rnumel):
    xnumel = 256
    XBLOCK: tl.constexpr = 1
    rnumel = 1024
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    xmask = tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    roffset = 0
    rmask = tl.full([RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + (r2 + (1024*x3)), None)
    tmp1 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp21 = tl.load(in_out_ptr1 + (r2 + (1024*x3)), None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [RBLOCK])
    tmp10 = tl.broadcast_to(tmp8, [RBLOCK])
    tmp12 = triton_helpers.promote_to_tensor(tl.sum(tmp10, 0))
    tmp13 = tl.full([1], 1024, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp8 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [RBLOCK])
    tmp20 = triton_helpers.promote_to_tensor(tl.sum(tmp18, 0))
    tmp22 = tmp7 - tmp15
    tmp23 = 1024.0
    tmp24 = tmp20 / tmp23
    tmp25 = 1e-05
    tmp26 = tmp24 + tmp25
    tmp27 = libdevice.rsqrt(tmp26)
    tmp28 = tmp22 * tmp27
    tmp29 = tmp21 + tmp28
    tl.store(in_out_ptr0 + (r2 + (1024*x3)), tmp2, None)
    tl.store(in_out_ptr1 + (r2 + (1024*x3)), tmp29, None)
    tl.store(out_ptr2 + (x3), tmp27, None)
    tl.store(out_ptr0 + (x3), tmp15, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/df/cdfkzwkflxyxzqi6diq7lh6co7qzat3bflfbd3nhumrurwf6vavo.py
# Topologically Sorted Source Nodes: [pad_6], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   pad_6 => _unsafe_index_24, _unsafe_index_25
# Graph fragment:
#   %_unsafe_index_24 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_29, [None, None, %sub_42, None]), kwargs = {})
#   %_unsafe_index_25 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_24, [None, None, None, %sub_42]), kwargs = {})
triton_poi_fused_reflection_pad2d_19 = async_compile.triton('triton_poi_fused_reflection_pad2d_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=[524288], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_reflection_pad2d_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_reflection_pad2d_19(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 295936
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = (xindex // 34) % 34
    x2 = (xindex // 1156)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + ((-1)*(tl_math.abs((-31) + (tl_math.abs((-1) + x0))))) + ((-32)*(tl_math.abs((-31) + (tl_math.abs((-1) + x1))))) + (1024*x2)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/ru/crux652jveimgvzxzrkhq7ieghd6gg3ukwjyx2lgafw3labxfki7.py
# Topologically Sorted Source Nodes: [score, score_1], Original ATen: [aten.convolution, aten._softmax]
# Source node to ATen node mapping:
#   score => convolution_12
#   score_1 => amax, exp, sub_61, sum_1
# Graph fragment:
#   %convolution_12 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%add_32, %primals_22, %primals_23, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %amax : [num_users=1] = call_function[target=torch.ops.aten.amax.default](args = (%convolution_12, [1], True), kwargs = {})
#   %sub_61 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%convolution_12, %amax), kwargs = {})
#   %exp : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%sub_61,), kwargs = {})
#   %sum_1 : [num_users=1] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp, [1], True), kwargs = {})
triton_poi_fused__softmax_convolution_20 = async_compile.triton('triton_poi_fused__softmax_convolution_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=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 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__softmax_convolution_20', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 10, '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__softmax_convolution_20(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 1024
    x1 = (xindex // 1024)
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (5120*x1)), None)
    tmp1 = tl.load(in_ptr1 + (0))
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp4 = tl.load(in_ptr0 + (1024 + x0 + (5120*x1)), None)
    tmp5 = tl.load(in_ptr1 + (1))
    tmp6 = tl.broadcast_to(tmp5, [XBLOCK])
    tmp9 = tl.load(in_ptr0 + (2048 + x0 + (5120*x1)), None)
    tmp10 = tl.load(in_ptr1 + (2))
    tmp11 = tl.broadcast_to(tmp10, [XBLOCK])
    tmp14 = tl.load(in_ptr0 + (3072 + x0 + (5120*x1)), None)
    tmp15 = tl.load(in_ptr1 + (3))
    tmp16 = tl.broadcast_to(tmp15, [XBLOCK])
    tmp19 = tl.load(in_ptr0 + (4096 + x0 + (5120*x1)), None)
    tmp20 = tl.load(in_ptr1 + (4))
    tmp21 = tl.broadcast_to(tmp20, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tmp7 = tmp4 + tmp6
    tmp8 = triton_helpers.maximum(tmp3, tmp7)
    tmp12 = tmp9 + tmp11
    tmp13 = triton_helpers.maximum(tmp8, tmp12)
    tmp17 = tmp14 + tmp16
    tmp18 = triton_helpers.maximum(tmp13, tmp17)
    tmp22 = tmp19 + tmp21
    tmp23 = triton_helpers.maximum(tmp18, tmp22)
    tmp24 = tmp3 - tmp23
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp7 - tmp23
    tmp27 = tl_math.exp(tmp26)
    tmp28 = tmp25 + tmp27
    tmp29 = tmp12 - tmp23
    tmp30 = tl_math.exp(tmp29)
    tmp31 = tmp28 + tmp30
    tmp32 = tmp17 - tmp23
    tmp33 = tl_math.exp(tmp32)
    tmp34 = tmp31 + tmp33
    tmp35 = tmp22 - tmp23
    tmp36 = tl_math.exp(tmp35)
    tmp37 = tmp34 + tmp36
    tl.store(out_ptr0 + (x2), tmp23, None)
    tl.store(out_ptr1 + (x2), tmp37, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/2i/c2iimfuwza2vxxv26zlq5o7kwtc3odkezofpzyz373kifhnvw43a.py
# Topologically Sorted Source Nodes: [score, score_1], Original ATen: [aten.convolution, aten._softmax]
# Source node to ATen node mapping:
#   score => convolution_12
#   score_1 => div, exp, sub_61
# Graph fragment:
#   %convolution_12 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%add_32, %primals_22, %primals_23, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %sub_61 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%convolution_12, %amax), kwargs = {})
#   %exp : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%sub_61,), kwargs = {})
#   %div : [num_users=2] = call_function[target=torch.ops.aten.div.Tensor](args = (%exp, %sum_1), kwargs = {})
triton_poi_fused__softmax_convolution_21 = async_compile.triton('triton_poi_fused__softmax_convolution_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=[32768], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 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__softmax_convolution_21', 'mutated_arg_names': ['in_out_ptr0'], '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__softmax_convolution_21(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, xnumel, XBLOCK : tl.constexpr):
    xnumel = 20480
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = (xindex // 1024) % 5
    x0 = xindex % 1024
    x2 = (xindex // 5120)
    tmp0 = tl.load(in_out_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr0 + (x1), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr1 + (x0 + (1024*x2)), None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + (x0 + (1024*x2)), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 - tmp3
    tmp5 = tl_math.exp(tmp4)
    tmp7 = tmp5 / tmp6
    tl.store(in_out_ptr0 + (x3), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/nl/cnlw4ytyupjrbjd6jdqejni3cddqbvrwzdr7nq5ggvvremntosqn.py
# Topologically Sorted Source Nodes: [conv2d_13], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv2d_13 => convolution_13
# Graph fragment:
#   %convolution_13 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%add_32, %primals_24, %primals_25, [1, 1], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_22 = async_compile.triton('triton_poi_fused_convolution_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=[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, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_22', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_22(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 20480
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = (xindex // 1024) % 5
    tmp0 = tl.load(in_out_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr0 + (x1), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + (x3), tmp2, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/kh/ckhaxv37bisygog3ute7n43lgcufittklynsgrcdjr53wmou2ekm.py
# Topologically Sorted Source Nodes: [out, sum_1], Original ATen: [aten.mul, aten.sum]
# Source node to ATen node mapping:
#   out => mul_31
#   sum_1 => sum_2
# Graph fragment:
#   %mul_31 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_13, %div), kwargs = {})
#   %sum_2 : [num_users=1] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%mul_31, [1]), kwargs = {})
triton_poi_fused_mul_sum_23 = async_compile.triton('triton_poi_fused_mul_sum_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: '*fp32', 2: '*fp32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_sum_23', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 10, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_mul_sum_23(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 1024
    x1 = (xindex // 1024)
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (5120*x1)), None)
    tmp1 = tl.load(in_ptr1 + (x0 + (5120*x1)), None)
    tmp3 = tl.load(in_ptr0 + (1024 + x0 + (5120*x1)), None)
    tmp4 = tl.load(in_ptr1 + (1024 + x0 + (5120*x1)), None)
    tmp7 = tl.load(in_ptr0 + (2048 + x0 + (5120*x1)), None)
    tmp8 = tl.load(in_ptr1 + (2048 + x0 + (5120*x1)), None)
    tmp11 = tl.load(in_ptr0 + (3072 + x0 + (5120*x1)), None)
    tmp12 = tl.load(in_ptr1 + (3072 + x0 + (5120*x1)), None)
    tmp15 = tl.load(in_ptr0 + (4096 + x0 + (5120*x1)), None)
    tmp16 = tl.load(in_ptr1 + (4096 + x0 + (5120*x1)), None)
    tmp2 = tmp0 * tmp1
    tmp5 = tmp3 * tmp4
    tmp6 = tmp2 + tmp5
    tmp9 = tmp7 * tmp8
    tmp10 = tmp6 + tmp9
    tmp13 = tmp11 * tmp12
    tmp14 = tmp10 + tmp13
    tmp17 = tmp15 * tmp16
    tmp18 = tmp14 + tmp17
    tl.store(out_ptr0 + (x2), tmp18, None)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25 = args
    args.clear()
    assert_size_stride(primals_1, (4, 512, 4, 4), (8192, 16, 4, 1))
    assert_size_stride(primals_2, (256, 512, 1, 1), (512, 1, 1, 1))
    assert_size_stride(primals_3, (256, 512, 3, 3), (4608, 9, 3, 1))
    assert_size_stride(primals_4, (256, ), (1, ))
    assert_size_stride(primals_5, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_6, (256, ), (1, ))
    assert_size_stride(primals_7, (128, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_8, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_9, (128, ), (1, ))
    assert_size_stride(primals_10, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_11, (128, ), (1, ))
    assert_size_stride(primals_12, (64, 128, 1, 1), (128, 1, 1, 1))
    assert_size_stride(primals_13, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_14, (64, ), (1, ))
    assert_size_stride(primals_15, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_16, (64, ), (1, ))
    assert_size_stride(primals_17, (64, 64, 1, 1), (64, 1, 1, 1))
    assert_size_stride(primals_18, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_19, (64, ), (1, ))
    assert_size_stride(primals_20, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_21, (64, ), (1, ))
    assert_size_stride(primals_22, (5, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_23, (5, ), (1, ))
    assert_size_stride(primals_24, (5, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_25, (5, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 512, 8, 8), (32768, 64, 8, 1), torch.float32)
        buf1 = buf0; del buf0  # reuse
        buf2 = buf1; del buf1  # reuse
        # Topologically Sorted Source Nodes: [x], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp, aten._unsafe_index]
        stream0 = get_raw_stream(0)
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_mul_sub_0.run(buf2, primals_1, 131072, grid=grid(131072), stream=stream0)
        del primals_1
        # Topologically Sorted Source Nodes: [x_s], Original ATen: [aten.convolution]
        buf3 = extern_kernels.convolution(buf2, primals_2, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 256, 8, 8), (16384, 64, 8, 1))
        buf4 = empty_strided_cuda((4, 512, 10, 10), (51200, 100, 10, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_1.run(buf2, buf4, 204800, grid=grid(204800), stream=stream0)
        # Topologically Sorted Source Nodes: [x_1], Original ATen: [aten.convolution]
        buf5 = extern_kernels.convolution(buf4, primals_3, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 256, 8, 8), (16384, 64, 8, 1))
        buf6 = buf5; del buf5  # reuse
        buf7 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024), torch.float32)
        buf8 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024), torch.float32)
        buf10 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024), torch.float32)
        # Topologically Sorted Source Nodes: [x_1, x_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_2.run(buf6, primals_4, buf7, buf8, buf10, 1024, 64, grid=grid(1024), stream=stream0)
        del primals_4
        buf11 = empty_strided_cuda((4, 256, 10, 10), (25600, 100, 10, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_1], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_3.run(buf6, buf7, buf8, buf11, 102400, grid=grid(102400), stream=stream0)
        # Topologically Sorted Source Nodes: [x_4], 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, 256, 8, 8), (16384, 64, 8, 1))
        buf13 = buf12; del buf12  # reuse
        buf14 = buf8; del buf8  # reuse
        buf15 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024), torch.float32)
        buf17 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024), torch.float32)
        # Topologically Sorted Source Nodes: [x_4, x_6], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_2.run(buf13, primals_6, buf14, buf15, buf17, 1024, 64, grid=grid(1024), stream=stream0)
        del primals_6
        buf18 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten._to_copy]
        triton_poi_fused__to_copy_4.run(buf18, 16, grid=grid(16), stream=stream0)
        buf19 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.add, aten.clamp]
        triton_poi_fused_add_clamp_5.run(buf19, 16, grid=grid(16), stream=stream0)
        buf20 = empty_strided_cuda((16, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
        triton_poi_fused__to_copy_4.run(buf20, 16, grid=grid(16), stream=stream0)
        buf21 = empty_strided_cuda((16, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.add, aten.clamp]
        triton_poi_fused_add_clamp_5.run(buf21, 16, grid=grid(16), stream=stream0)
        buf24 = empty_strided_cuda((16, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6.run(buf24, 16, grid=grid(16), stream=stream0)
        buf26 = empty_strided_cuda((16, 1), (1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.sub, aten.clamp]
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6.run(buf26, 16, grid=grid(16), stream=stream0)
        buf23 = empty_strided_cuda((4, 256, 16, 16), (65536, 256, 16, 1), torch.float32)
        buf27 = buf23; del buf23  # reuse
        buf28 = buf27; del buf27  # reuse
        # Topologically Sorted Source Nodes: [h, x_7], Original ATen: [aten.add, aten._unsafe_index, aten.sub, aten.mul]
        triton_poi_fused__unsafe_index_add_mul_sub_7.run(buf28, buf19, buf20, buf3, buf13, buf14, buf15, buf18, buf21, buf24, buf26, 262144, grid=grid(262144), stream=stream0)
        del buf15
        del buf3
        # Topologically Sorted Source Nodes: [x_s_1], Original ATen: [aten.convolution]
        buf29 = extern_kernels.convolution(buf28, primals_7, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf30 = empty_strided_cuda((4, 256, 18, 18), (82944, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_2], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_8.run(buf28, buf30, 331776, grid=grid(331776), stream=stream0)
        # Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.convolution]
        buf31 = extern_kernels.convolution(buf30, primals_8, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf32 = buf31; del buf31  # reuse
        buf33 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf34 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf36 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        # Topologically Sorted Source Nodes: [x_8, x_10], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_9.run(buf32, primals_9, buf33, buf34, buf36, 512, 256, grid=grid(512), stream=stream0)
        del primals_9
        buf37 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_3], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_10.run(buf32, buf33, buf34, buf37, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_11], Original ATen: [aten.convolution]
        buf38 = extern_kernels.convolution(buf37, primals_10, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf39 = buf38; del buf38  # reuse
        buf40 = buf34; del buf34  # reuse
        buf41 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf43 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        # Topologically Sorted Source Nodes: [x_11, x_13], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_9.run(buf39, primals_11, buf40, buf41, buf43, 512, 256, grid=grid(512), stream=stream0)
        del primals_11
        buf44 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten._to_copy]
        triton_poi_fused__to_copy_11.run(buf44, 32, grid=grid(32), stream=stream0)
        buf45 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.add, aten.clamp]
        triton_poi_fused_add_clamp_12.run(buf45, 32, grid=grid(32), stream=stream0)
        buf46 = empty_strided_cuda((32, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
        triton_poi_fused__to_copy_11.run(buf46, 32, grid=grid(32), stream=stream0)
        buf47 = empty_strided_cuda((32, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.add, aten.clamp]
        triton_poi_fused_add_clamp_12.run(buf47, 32, grid=grid(32), stream=stream0)
        buf50 = empty_strided_cuda((32, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.arange, aten._to_copy, aten.add, aten.mul, aten.sub, aten.clamp]
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13.run(buf50, 32, grid=grid(32), stream=stream0)
        buf52 = empty_strided_cuda((32, 1), (1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_14], Original ATen: [aten.sub, aten.clamp]
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13.run(buf52, 32, grid=grid(32), stream=stream0)
        buf49 = empty_strided_cuda((4, 128, 32, 32), (131072, 1024, 32, 1), torch.float32)
        buf53 = buf49; del buf49  # reuse
        buf54 = buf53; del buf53  # reuse
        # Topologically Sorted Source Nodes: [h_1, x_14], Original ATen: [aten.add, aten._unsafe_index, aten.sub, aten.mul]
        triton_poi_fused__unsafe_index_add_mul_sub_14.run(buf54, buf45, buf46, buf29, buf39, buf40, buf41, buf44, buf47, buf50, buf52, 524288, grid=grid(524288), stream=stream0)
        del buf29
        del buf41
        # Topologically Sorted Source Nodes: [x_s_2], Original ATen: [aten.convolution]
        buf55 = extern_kernels.convolution(buf54, primals_12, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf56 = empty_strided_cuda((4, 128, 34, 34), (147968, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_4], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_15.run(buf54, buf56, 591872, grid=grid(591872), stream=stream0)
        # Topologically Sorted Source Nodes: [x_15], Original ATen: [aten.convolution]
        buf57 = extern_kernels.convolution(buf56, primals_13, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf57, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf58 = buf57; del buf57  # reuse
        buf59 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf60 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf62 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_15, x_17], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_16.run(buf58, primals_14, buf59, buf60, buf62, 256, 1024, grid=grid(256), stream=stream0)
        del primals_14
        buf63 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_5], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_17.run(buf58, buf59, buf60, buf63, 295936, grid=grid(295936), stream=stream0)
        # Topologically Sorted Source Nodes: [x_18], Original ATen: [aten.convolution]
        buf64 = extern_kernels.convolution(buf63, primals_15, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf65 = buf64; del buf64  # reuse
        buf66 = buf60; del buf60  # reuse
        buf70 = buf55; del buf55  # reuse
        buf69 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_18, x_20, h_2], Original ATen: [aten.convolution, aten._native_batch_norm_legit, aten.add]
        triton_per_fused__native_batch_norm_legit_add_convolution_18.run(buf65, buf70, primals_16, buf66, buf69, 256, 1024, grid=grid(256), stream=stream0)
        del primals_16
        # Topologically Sorted Source Nodes: [x_s_3], Original ATen: [aten.convolution]
        buf71 = extern_kernels.convolution(buf70, primals_17, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf71, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf72 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_6], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_19.run(buf70, buf72, 295936, grid=grid(295936), stream=stream0)
        # Topologically Sorted Source Nodes: [x_21], Original ATen: [aten.convolution]
        buf73 = extern_kernels.convolution(buf72, primals_18, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf73, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf74 = buf73; del buf73  # reuse
        buf75 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf76 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf78 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_21, x_23], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_16.run(buf74, primals_19, buf75, buf76, buf78, 256, 1024, grid=grid(256), stream=stream0)
        del primals_19
        buf79 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad_7], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_17.run(buf74, buf75, buf76, buf79, 295936, grid=grid(295936), stream=stream0)
        # Topologically Sorted Source Nodes: [x_24], Original ATen: [aten.convolution]
        buf80 = extern_kernels.convolution(buf79, primals_20, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf80, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf81 = buf80; del buf80  # reuse
        buf82 = buf76; del buf76  # reuse
        buf86 = buf71; del buf71  # reuse
        buf85 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        # Topologically Sorted Source Nodes: [x_24, x_26, h_3], Original ATen: [aten.convolution, aten._native_batch_norm_legit, aten.add]
        triton_per_fused__native_batch_norm_legit_add_convolution_18.run(buf81, buf86, primals_21, buf82, buf85, 256, 1024, grid=grid(256), stream=stream0)
        del primals_21
        # Topologically Sorted Source Nodes: [score], Original ATen: [aten.convolution]
        buf87 = extern_kernels.convolution(buf86, primals_22, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf87, (4, 5, 32, 32), (5120, 1024, 32, 1))
        buf88 = empty_strided_cuda((4, 1, 32, 32), (1024, 4096, 32, 1), torch.float32)
        buf89 = empty_strided_cuda((4, 1, 32, 32), (1024, 4096, 32, 1), torch.float32)
        # Topologically Sorted Source Nodes: [score, score_1], Original ATen: [aten.convolution, aten._softmax]
        triton_poi_fused__softmax_convolution_20.run(buf87, primals_23, buf88, buf89, 4096, grid=grid(4096), stream=stream0)
        buf90 = buf87; del buf87  # reuse
        # Topologically Sorted Source Nodes: [score, score_1], Original ATen: [aten.convolution, aten._softmax]
        triton_poi_fused__softmax_convolution_21.run(buf90, primals_23, buf88, buf89, 20480, grid=grid(20480), stream=stream0)
        del buf88
        del primals_23
        # Topologically Sorted Source Nodes: [conv2d_13], Original ATen: [aten.convolution]
        buf91 = extern_kernels.convolution(buf86, primals_24, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf91, (4, 5, 32, 32), (5120, 1024, 32, 1))
        buf92 = buf91; del buf91  # reuse
        # Topologically Sorted Source Nodes: [conv2d_13], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_22.run(buf92, primals_25, 20480, grid=grid(20480), stream=stream0)
        del primals_25
        buf93 = reinterpret_tensor(buf89, (4, 32, 32), (1024, 32, 1), 0); del buf89  # reuse
        # Topologically Sorted Source Nodes: [out, sum_1], Original ATen: [aten.mul, aten.sum]
        triton_poi_fused_mul_sum_23.run(buf92, buf90, buf93, 4096, grid=grid(4096), stream=stream0)
    return (reinterpret_tensor(buf93, (4, 1, 32, 32), (1024, 1024, 32, 1), 0), primals_2, primals_3, primals_5, primals_7, primals_8, primals_10, primals_12, primals_13, primals_15, primals_17, primals_18, primals_20, primals_22, primals_24, buf2, buf4, buf6, reinterpret_tensor(buf10, (1024, ), (1, ), 0), buf11, buf13, reinterpret_tensor(buf17, (1024, ), (1, ), 0), buf18, buf19, buf20, buf21, buf24, buf26, buf28, buf30, buf32, reinterpret_tensor(buf36, (512, ), (1, ), 0), buf37, buf39, reinterpret_tensor(buf43, (512, ), (1, ), 0), buf44, buf45, buf46, buf47, buf50, buf52, buf54, buf56, buf58, reinterpret_tensor(buf62, (256, ), (1, ), 0), buf63, buf65, reinterpret_tensor(buf69, (256, ), (1, ), 0), buf70, buf72, buf74, reinterpret_tensor(buf78, (256, ), (1, ), 0), buf79, buf81, reinterpret_tensor(buf85, (256, ), (1, ), 0), buf86, buf90, buf92, reinterpret_tensor(buf82, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf75, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf66, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf59, (1, 256, 1, 1), (256, 1, 1, 1), 0), reinterpret_tensor(buf40, (1, 512, 1, 1), (512, 1, 1, 1), 0), reinterpret_tensor(buf33, (1, 512, 1, 1), (512, 1, 1, 1), 0), reinterpret_tensor(buf14, (1, 1024, 1, 1), (1024, 1, 1, 1), 0), reinterpret_tensor(buf7, (1, 1024, 1, 1), (1024, 1, 1, 1), 0), )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    primals_1 = rand_strided((4, 512, 4, 4), (8192, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((256, 512, 1, 1), (512, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((256, 512, 3, 3), (4608, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((256, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((256, 256, 3, 3), (2304, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((256, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((128, 256, 1, 1), (256, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((128, 256, 3, 3), (2304, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((64, 128, 1, 1), (128, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((64, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((64, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((64, 64, 1, 1), (64, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((64, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((64, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_21 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_22 = rand_strided((5, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_23 = rand_strided((5, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_24 = rand_strided((5, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_25 = rand_strided((5, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25])
    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 ResidualBlock(nn.Module):

    def __init__(self, input_channel, output_channel, upsample=True):
        super(ResidualBlock, self).__init__()
        self.conv1 = nn.Conv2d(input_channel, output_channel, kernel_size=3,
            padding=0)
        self.conv2 = nn.Conv2d(output_channel, output_channel, kernel_size=
            3, padding=0)
        self.conv_shortcut = nn.Conv2d(input_channel, output_channel,
            kernel_size=1, bias=False)
        self.relu = nn.LeakyReLU(0.2)
        self.norm = nn.InstanceNorm2d(output_channel)
        self.upsample = upsample
        self.reflecPad1 = nn.ReflectionPad2d((1, 1, 1, 1))
        self.reflecPad2 = nn.ReflectionPad2d((1, 1, 1, 1))

    def forward(self, x):
        if self.upsample:
            x = F.interpolate(x, mode='bilinear', scale_factor=2)
        x_s = self.conv_shortcut(x)
        x = self.conv1(self.reflecPad1(x))
        x = self.relu(x)
        x = self.norm(x)
        x = self.conv2(self.reflecPad2(x))
        x = self.relu(x)
        x = self.norm(x)
        return x_s + x


class Img_decoder_v3(nn.Module):

    def __init__(self):
        super(Img_decoder_v3, self).__init__()
        self.slice4 = ResidualBlock(512, 256)
        self.slice3 = ResidualBlock(256, 128)
        self.slice2 = ResidualBlock(128, 64)
        self.slice1 = ResidualBlock(64, 64, upsample=False)
        self.map = nn.Conv2d(64, 5, 3, 1, 1)
        self.confidence = nn.Conv2d(64, 5, 3, 1, 1)
        self.soft = nn.Softmax(dim=1)

    def forward(self, feat):
        h = self.slice4(feat)
        h = self.slice3(h)
        h = self.slice2(h)
        h = self.slice1(h)
        score = self.confidence(h)
        score = self.soft(score)
        out = self.map(h) * score
        out = torch.sum(out, dim=1).unsqueeze(1)
        return out


def get_inputs():
    return [torch.rand([4, 512, 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
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
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__to_copy__unsafe_index_add_arange_clamp_mul_sub_0(
    in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x2 = xindex // 64
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 3, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tmp13 = x0
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp14 + tmp2
    tmp16 = tmp15 * tmp2
    tmp17 = tmp16 - tmp2
    tmp18 = triton_helpers.maximum(tmp17, tmp6)
    tmp19 = tmp18.to(tl.int32)
    tmp20 = tmp19 + tmp9
    tmp21 = triton_helpers.minimum(tmp20, tmp11)
    tmp22 = tl.load(in_ptr0 + (tmp21 + 4 * tmp12 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp23 = tl.load(in_ptr0 + (tmp19 + 4 * tmp12 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp24 = tmp22 - tmp23
    tmp25 = tmp19.to(tl.float32)
    tmp26 = tmp18 - tmp25
    tmp27 = triton_helpers.maximum(tmp26, tmp6)
    tmp28 = 1.0
    tmp29 = triton_helpers.minimum(tmp27, tmp28)
    tmp30 = tmp24 * tmp29
    tmp31 = tmp23 + tmp30
    tmp32 = tl.load(in_ptr0 + (tmp19 + 4 * tmp8 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp33 = tl.load(in_ptr0 + (tmp21 + 4 * tmp8 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp34 = tmp33 - tmp32
    tmp35 = tmp34 * tmp29
    tmp36 = tmp32 + tmp35
    tmp37 = tmp31 - tmp36
    tmp38 = tmp8.to(tl.float32)
    tmp39 = tmp7 - tmp38
    tmp40 = triton_helpers.maximum(tmp39, tmp6)
    tmp41 = triton_helpers.minimum(tmp40, tmp28)
    tmp42 = tmp37 * tmp41
    tmp43 = tmp36 + tmp42
    tl.store(in_out_ptr0 + x4, tmp43, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_1(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 10
    x1 = xindex // 10 % 10
    x2 = xindex // 100
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-7 + tl_math.abs(-1 +
        x0)) + -8 * tl_math.abs(-7 + tl_math.abs(-1 + x1)) + 64 * x2), None,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_2(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 1024
    RBLOCK: tl.constexpr = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_out_ptr0 + (r2 + 64 * x3), xmask, other=0.0)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [XBLOCK, RBLOCK])
    tl.where(xmask, tmp8, 0)
    tmp11 = tl.broadcast_to(tmp8, [XBLOCK, RBLOCK])
    tmp13 = tl.where(xmask, tmp11, 0)
    tmp14 = tl.sum(tmp13, 1)[:, None]
    tmp15 = tl.full([XBLOCK, 1], 64, tl.int32)
    tmp16 = tmp15.to(tl.float32)
    tmp17 = tmp14 / tmp16
    tmp18 = tmp8 - tmp17
    tmp19 = tmp18 * tmp18
    tmp20 = tl.broadcast_to(tmp19, [XBLOCK, RBLOCK])
    tmp22 = tl.where(xmask, tmp20, 0)
    tmp23 = tl.sum(tmp22, 1)[:, None]
    tmp24 = 64.0
    tmp25 = tmp23 / tmp24
    tmp26 = 1e-05
    tmp27 = tmp25 + tmp26
    tmp28 = libdevice.rsqrt(tmp27)
    tl.store(in_out_ptr0 + (r2 + 64 * x3), tmp2, xmask)
    tl.store(out_ptr2 + x3, tmp28, xmask)
    tl.store(out_ptr0 + x3, tmp17, xmask)
    tl.store(out_ptr1 + x3, tmp23, xmask)


@triton.jit
def triton_poi_fused_reflection_pad2d_3(in_ptr0, in_ptr1, in_ptr2, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 10
    x1 = xindex // 10 % 10
    x2 = xindex // 100
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-7 + tl_math.abs(-1 +
        x0)) + -8 * tl_math.abs(-7 + tl_math.abs(-1 + x1)) + 64 * x2), None,
        eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x2, None, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 64.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + x3, tmp14, None)


@triton.jit
def triton_poi_fused__to_copy_4(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_5(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 7, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6(out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 16
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_mul_sub_7(in_out_ptr1, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8,
    in_ptr9, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 16 % 16
    x0 = xindex % 16
    x2 = xindex // 256
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr5 + x2, None, eviction_policy='evict_last')
    tmp26 = tl.load(in_ptr6 + x1, None, eviction_policy='evict_last')
    tmp38 = tl.load(in_ptr7 + x0, None, eviction_policy='evict_last')
    tmp51 = tl.load(in_ptr8 + x0, None, eviction_policy='evict_last')
    tmp66 = tl.load(in_ptr9 + x1, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 8, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 8 * tmp4 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + (tmp8 + 8 * tmp4 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp11 = 0.0
    tmp12 = tmp10 > tmp11
    tmp13 = 0.2
    tmp14 = tmp10 * tmp13
    tmp15 = tl.where(tmp12, tmp10, tmp14)
    tmp17 = tmp15 - tmp16
    tmp19 = 64.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp17 * tmp23
    tmp25 = tmp9 + tmp24
    tmp27 = tmp26 + tmp1
    tmp28 = tmp26 < 0
    tmp29 = tl.where(tmp28, tmp27, tmp26)
    tmp30 = tl.load(in_ptr2 + (tmp8 + 8 * tmp29 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp31 = tl.load(in_ptr3 + (tmp8 + 8 * tmp29 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp32 = tmp31 > tmp11
    tmp33 = tmp31 * tmp13
    tmp34 = tl.where(tmp32, tmp31, tmp33)
    tmp35 = tmp34 - tmp16
    tmp36 = tmp35 * tmp23
    tmp37 = tmp30 + tmp36
    tmp39 = tmp38 + tmp1
    tmp40 = tmp38 < 0
    tmp41 = tl.where(tmp40, tmp39, tmp38)
    tmp42 = tl.load(in_ptr2 + (tmp41 + 8 * tmp29 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp43 = tl.load(in_ptr3 + (tmp41 + 8 * tmp29 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp44 = tmp43 > tmp11
    tmp45 = tmp43 * tmp13
    tmp46 = tl.where(tmp44, tmp43, tmp45)
    tmp47 = tmp46 - tmp16
    tmp48 = tmp47 * tmp23
    tmp49 = tmp42 + tmp48
    tmp50 = tmp49 - tmp37
    tmp52 = tmp50 * tmp51
    tmp53 = tmp37 + tmp52
    tmp54 = tl.load(in_ptr2 + (tmp41 + 8 * tmp4 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp55 = tl.load(in_ptr3 + (tmp41 + 8 * tmp4 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp56 = tmp55 > tmp11
    tmp57 = tmp55 * tmp13
    tmp58 = tl.where(tmp56, tmp55, tmp57)
    tmp59 = tmp58 - tmp16
    tmp60 = tmp59 * tmp23
    tmp61 = tmp54 + tmp60
    tmp62 = tmp61 - tmp25
    tmp63 = tmp62 * tmp51
    tmp64 = tmp25 + tmp63
    tmp65 = tmp64 - tmp53
    tmp67 = tmp65 * tmp66
    tmp68 = tmp53 + tmp67
    tl.store(in_out_ptr1 + x4, tmp68, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_8(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x2 = xindex // 324
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x2),
        None, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_9(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + (r2 + 256 * x3), None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [RBLOCK])
    tmp10 = tl.broadcast_to(tmp8, [RBLOCK])
    tmp12 = triton_helpers.promote_to_tensor(tl.sum(tmp10, 0))
    tmp13 = tl.full([1], 256, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp8 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [RBLOCK])
    tmp20 = triton_helpers.promote_to_tensor(tl.sum(tmp18, 0))
    tmp21 = 256.0
    tmp22 = tmp20 / tmp21
    tmp23 = 1e-05
    tmp24 = tmp22 + tmp23
    tmp25 = libdevice.rsqrt(tmp24)
    tl.store(in_out_ptr0 + (r2 + 256 * x3), tmp2, None)
    tl.store(out_ptr2 + x3, tmp25, None)
    tl.store(out_ptr0 + x3, tmp15, None)
    tl.store(out_ptr1 + x3, tmp20, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_10(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x2 = xindex // 324
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x2),
        None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x2, None, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 256.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + x3, tmp14, None)


@triton.jit
def triton_poi_fused__to_copy_11(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_12(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 15, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13(out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 32
    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 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_mul_sub_14(in_out_ptr1, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, in_ptr7, in_ptr8,
    in_ptr9, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 32 % 32
    x0 = xindex % 32
    x2 = xindex // 1024
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp18 = tl.load(in_ptr5 + x2, None, eviction_policy='evict_last')
    tmp26 = tl.load(in_ptr6 + x1, None, eviction_policy='evict_last')
    tmp38 = tl.load(in_ptr7 + x0, None, eviction_policy='evict_last')
    tmp51 = tl.load(in_ptr8 + x0, None, eviction_policy='evict_last')
    tmp66 = tl.load(in_ptr9 + x1, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 16, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + (tmp8 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp11 = 0.0
    tmp12 = tmp10 > tmp11
    tmp13 = 0.2
    tmp14 = tmp10 * tmp13
    tmp15 = tl.where(tmp12, tmp10, tmp14)
    tmp17 = tmp15 - tmp16
    tmp19 = 256.0
    tmp20 = tmp18 / tmp19
    tmp21 = 1e-05
    tmp22 = tmp20 + tmp21
    tmp23 = libdevice.rsqrt(tmp22)
    tmp24 = tmp17 * tmp23
    tmp25 = tmp9 + tmp24
    tmp27 = tmp26 + tmp1
    tmp28 = tmp26 < 0
    tmp29 = tl.where(tmp28, tmp27, tmp26)
    tmp30 = tl.load(in_ptr2 + (tmp8 + 16 * tmp29 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp31 = tl.load(in_ptr3 + (tmp8 + 16 * tmp29 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp32 = tmp31 > tmp11
    tmp33 = tmp31 * tmp13
    tmp34 = tl.where(tmp32, tmp31, tmp33)
    tmp35 = tmp34 - tmp16
    tmp36 = tmp35 * tmp23
    tmp37 = tmp30 + tmp36
    tmp39 = tmp38 + tmp1
    tmp40 = tmp38 < 0
    tmp41 = tl.where(tmp40, tmp39, tmp38)
    tmp42 = tl.load(in_ptr2 + (tmp41 + 16 * tmp29 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp43 = tl.load(in_ptr3 + (tmp41 + 16 * tmp29 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp44 = tmp43 > tmp11
    tmp45 = tmp43 * tmp13
    tmp46 = tl.where(tmp44, tmp43, tmp45)
    tmp47 = tmp46 - tmp16
    tmp48 = tmp47 * tmp23
    tmp49 = tmp42 + tmp48
    tmp50 = tmp49 - tmp37
    tmp52 = tmp50 * tmp51
    tmp53 = tmp37 + tmp52
    tmp54 = tl.load(in_ptr2 + (tmp41 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp55 = tl.load(in_ptr3 + (tmp41 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp56 = tmp55 > tmp11
    tmp57 = tmp55 * tmp13
    tmp58 = tl.where(tmp56, tmp55, tmp57)
    tmp59 = tmp58 - tmp16
    tmp60 = tmp59 * tmp23
    tmp61 = tmp54 + tmp60
    tmp62 = tmp61 - tmp25
    tmp63 = tmp62 * tmp51
    tmp64 = tmp25 + tmp63
    tmp65 = tmp64 - tmp53
    tmp67 = tmp65 * tmp66
    tmp68 = tmp53 + tmp67
    tl.store(in_out_ptr1 + x4, tmp68, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_15(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x2 = xindex // 1156
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x2),
        None, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_16(in_out_ptr0,
    in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    r2 = rindex
    x3 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + (r2 + 1024 * x3), None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.2
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tmp8 = tl.broadcast_to(tmp7, [RBLOCK])
    tmp10 = tl.broadcast_to(tmp8, [RBLOCK])
    tmp12 = triton_helpers.promote_to_tensor(tl.sum(tmp10, 0))
    tmp13 = tl.full([1], 1024, tl.int32)
    tmp14 = tmp13.to(tl.float32)
    tmp15 = tmp12 / tmp14
    tmp16 = tmp8 - tmp15
    tmp17 = tmp16 * tmp16
    tmp18 = tl.broadcast_to(tmp17, [RBLOCK])
    tmp20 = triton_helpers.promote_to_tensor(tl.sum(tmp18, 0))
    tmp21 = 1024.0
    tmp22 = tmp20 / tmp21
    tmp23 = 1e-05
    tmp24 = tmp22 + tmp23
    tmp25 = libdevice.rsqrt(tmp24)
    tl.store(in_out_ptr0 + (r2 + 1024 * x3), tmp2, None)
    tl.store(out_ptr2 + x3, tmp25, None)
    tl.store(out_ptr0 + x3, tmp15, None)
    tl.store(out_ptr1 + x3, tmp20, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_17(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 295936
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x2 = xindex // 1156
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr2 + x2, xmask, eviction_policy='evict_last')
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.2
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tmp7 = tmp5 - tmp6
    tmp9 = 1024.0
    tmp10 = tmp8 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp7 * tmp13
    tl.store(out_ptr0 + x3, tmp14, xmask)


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


@triton.jit
def triton_poi_fused_reflection_pad2d_19(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 295936
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x2 = xindex // 1156
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused__softmax_convolution_20(in_ptr0, in_ptr1, out_ptr0,
    out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 1024
    x1 = xindex // 1024
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 5120 * x1), None)
    tmp1 = tl.load(in_ptr1 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp4 = tl.load(in_ptr0 + (1024 + x0 + 5120 * x1), None)
    tmp5 = tl.load(in_ptr1 + 1)
    tmp6 = tl.broadcast_to(tmp5, [XBLOCK])
    tmp9 = tl.load(in_ptr0 + (2048 + x0 + 5120 * x1), None)
    tmp10 = tl.load(in_ptr1 + 2)
    tmp11 = tl.broadcast_to(tmp10, [XBLOCK])
    tmp14 = tl.load(in_ptr0 + (3072 + x0 + 5120 * x1), None)
    tmp15 = tl.load(in_ptr1 + 3)
    tmp16 = tl.broadcast_to(tmp15, [XBLOCK])
    tmp19 = tl.load(in_ptr0 + (4096 + x0 + 5120 * x1), None)
    tmp20 = tl.load(in_ptr1 + 4)
    tmp21 = tl.broadcast_to(tmp20, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tmp7 = tmp4 + tmp6
    tmp8 = triton_helpers.maximum(tmp3, tmp7)
    tmp12 = tmp9 + tmp11
    tmp13 = triton_helpers.maximum(tmp8, tmp12)
    tmp17 = tmp14 + tmp16
    tmp18 = triton_helpers.maximum(tmp13, tmp17)
    tmp22 = tmp19 + tmp21
    tmp23 = triton_helpers.maximum(tmp18, tmp22)
    tmp24 = tmp3 - tmp23
    tmp25 = tl_math.exp(tmp24)
    tmp26 = tmp7 - tmp23
    tmp27 = tl_math.exp(tmp26)
    tmp28 = tmp25 + tmp27
    tmp29 = tmp12 - tmp23
    tmp30 = tl_math.exp(tmp29)
    tmp31 = tmp28 + tmp30
    tmp32 = tmp17 - tmp23
    tmp33 = tl_math.exp(tmp32)
    tmp34 = tmp31 + tmp33
    tmp35 = tmp22 - tmp23
    tmp36 = tl_math.exp(tmp35)
    tmp37 = tmp34 + tmp36
    tl.store(out_ptr0 + x2, tmp23, None)
    tl.store(out_ptr1 + x2, tmp37, None)


@triton.jit
def triton_poi_fused__softmax_convolution_21(in_out_ptr0, in_ptr0, in_ptr1,
    in_ptr2, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 1024 % 5
    x0 = xindex % 1024
    x2 = xindex // 5120
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr1 + (x0 + 1024 * x2), None, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr2 + (x0 + 1024 * x2), None, eviction_policy=
        'evict_last')
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 - tmp3
    tmp5 = tl_math.exp(tmp4)
    tmp7 = tmp5 / tmp6
    tl.store(in_out_ptr0 + x3, tmp7, None)


@triton.jit
def triton_poi_fused_convolution_22(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 1024 % 5
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, None)


@triton.jit
def triton_poi_fused_mul_sum_23(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 1024
    x1 = xindex // 1024
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 5120 * x1), None)
    tmp1 = tl.load(in_ptr1 + (x0 + 5120 * x1), None)
    tmp3 = tl.load(in_ptr0 + (1024 + x0 + 5120 * x1), None)
    tmp4 = tl.load(in_ptr1 + (1024 + x0 + 5120 * x1), None)
    tmp7 = tl.load(in_ptr0 + (2048 + x0 + 5120 * x1), None)
    tmp8 = tl.load(in_ptr1 + (2048 + x0 + 5120 * x1), None)
    tmp11 = tl.load(in_ptr0 + (3072 + x0 + 5120 * x1), None)
    tmp12 = tl.load(in_ptr1 + (3072 + x0 + 5120 * x1), None)
    tmp15 = tl.load(in_ptr0 + (4096 + x0 + 5120 * x1), None)
    tmp16 = tl.load(in_ptr1 + (4096 + x0 + 5120 * x1), None)
    tmp2 = tmp0 * tmp1
    tmp5 = tmp3 * tmp4
    tmp6 = tmp2 + tmp5
    tmp9 = tmp7 * tmp8
    tmp10 = tmp6 + tmp9
    tmp13 = tmp11 * tmp12
    tmp14 = tmp10 + tmp13
    tmp17 = tmp15 * tmp16
    tmp18 = tmp14 + tmp17
    tl.store(out_ptr0 + x2, tmp18, None)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25) = args
    args.clear()
    assert_size_stride(primals_1, (4, 512, 4, 4), (8192, 16, 4, 1))
    assert_size_stride(primals_2, (256, 512, 1, 1), (512, 1, 1, 1))
    assert_size_stride(primals_3, (256, 512, 3, 3), (4608, 9, 3, 1))
    assert_size_stride(primals_4, (256,), (1,))
    assert_size_stride(primals_5, (256, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_6, (256,), (1,))
    assert_size_stride(primals_7, (128, 256, 1, 1), (256, 1, 1, 1))
    assert_size_stride(primals_8, (128, 256, 3, 3), (2304, 9, 3, 1))
    assert_size_stride(primals_9, (128,), (1,))
    assert_size_stride(primals_10, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_11, (128,), (1,))
    assert_size_stride(primals_12, (64, 128, 1, 1), (128, 1, 1, 1))
    assert_size_stride(primals_13, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_14, (64,), (1,))
    assert_size_stride(primals_15, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_16, (64,), (1,))
    assert_size_stride(primals_17, (64, 64, 1, 1), (64, 1, 1, 1))
    assert_size_stride(primals_18, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_19, (64,), (1,))
    assert_size_stride(primals_20, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_21, (64,), (1,))
    assert_size_stride(primals_22, (5, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_23, (5,), (1,))
    assert_size_stride(primals_24, (5, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_25, (5,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 512, 8, 8), (32768, 64, 8, 1), torch.
            float32)
        buf1 = buf0
        del buf0
        buf2 = buf1
        del buf1
        get_raw_stream(0)
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_mul_sub_0[grid
            (131072)](buf2, primals_1, 131072, XBLOCK=512, num_warps=8,
            num_stages=1)
        del primals_1
        buf3 = extern_kernels.convolution(buf2, primals_2, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 256, 8, 8), (16384, 64, 8, 1))
        buf4 = empty_strided_cuda((4, 512, 10, 10), (51200, 100, 10, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_1[grid(204800)](buf2, buf4, 
            204800, XBLOCK=512, num_warps=8, num_stages=1)
        buf5 = extern_kernels.convolution(buf4, primals_3, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 256, 8, 8), (16384, 64, 8, 1))
        buf6 = buf5
        del buf5
        buf7 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024),
            torch.float32)
        buf8 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024),
            torch.float32)
        buf10 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_2[grid(1024)](
            buf6, primals_4, buf7, buf8, buf10, 1024, 64, XBLOCK=8,
            num_warps=4, num_stages=1)
        del primals_4
        buf11 = empty_strided_cuda((4, 256, 10, 10), (25600, 100, 10, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_3[grid(102400)](buf6, buf7, buf8,
            buf11, 102400, XBLOCK=512, num_warps=8, 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, 256, 8, 8), (16384, 64, 8, 1))
        buf13 = buf12
        del buf12
        buf14 = buf8
        del buf8
        buf15 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024),
            torch.float32)
        buf17 = empty_strided_cuda((1, 1024, 1, 1), (1024, 1, 1024, 1024),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_2[grid(1024)](
            buf13, primals_6, buf14, buf15, buf17, 1024, 64, XBLOCK=8,
            num_warps=4, num_stages=1)
        del primals_6
        buf18 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_4[grid(16)](buf18, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf19 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_5[grid(16)](buf19, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf20 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused__to_copy_4[grid(16)](buf20, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf21 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused_add_clamp_5[grid(16)](buf21, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf24 = empty_strided_cuda((16,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6[grid(16)](buf24,
            16, XBLOCK=16, num_warps=1, num_stages=1)
        buf26 = empty_strided_cuda((16, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_6[grid(16)](buf26,
            16, XBLOCK=16, num_warps=1, num_stages=1)
        buf23 = empty_strided_cuda((4, 256, 16, 16), (65536, 256, 16, 1),
            torch.float32)
        buf27 = buf23
        del buf23
        buf28 = buf27
        del buf27
        triton_poi_fused__unsafe_index_add_mul_sub_7[grid(262144)](buf28,
            buf19, buf20, buf3, buf13, buf14, buf15, buf18, buf21, buf24,
            buf26, 262144, XBLOCK=512, num_warps=8, num_stages=1)
        del buf15
        del buf3
        buf29 = extern_kernels.convolution(buf28, primals_7, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf30 = empty_strided_cuda((4, 256, 18, 18), (82944, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_8[grid(331776)](buf28, buf30, 
            331776, XBLOCK=512, num_warps=8, num_stages=1)
        buf31 = extern_kernels.convolution(buf30, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf32 = buf31
        del buf31
        buf33 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf34 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf36 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_9[grid(512)](
            buf32, primals_9, buf33, buf34, buf36, 512, 256, num_warps=2,
            num_stages=1)
        del primals_9
        buf37 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_10[grid(165888)](buf32, buf33,
            buf34, buf37, 165888, XBLOCK=1024, num_warps=4, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_10, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf39 = buf38
        del buf38
        buf40 = buf34
        del buf34
        buf41 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf43 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_9[grid(512)](
            buf39, primals_11, buf40, buf41, buf43, 512, 256, num_warps=2,
            num_stages=1)
        del primals_11
        buf44 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_11[grid(32)](buf44, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf45 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_12[grid(32)](buf45, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf46 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused__to_copy_11[grid(32)](buf46, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf47 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused_add_clamp_12[grid(32)](buf47, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf50 = empty_strided_cuda((32,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13[grid(32)](buf50,
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf52 = empty_strided_cuda((32, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_arange_clamp_mul_sub_13[grid(32)](buf52,
            32, XBLOCK=32, num_warps=1, num_stages=1)
        buf49 = empty_strided_cuda((4, 128, 32, 32), (131072, 1024, 32, 1),
            torch.float32)
        buf53 = buf49
        del buf49
        buf54 = buf53
        del buf53
        triton_poi_fused__unsafe_index_add_mul_sub_14[grid(524288)](buf54,
            buf45, buf46, buf29, buf39, buf40, buf41, buf44, buf47, buf50,
            buf52, 524288, XBLOCK=512, num_warps=8, num_stages=1)
        del buf29
        del buf41
        buf55 = extern_kernels.convolution(buf54, primals_12, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf56 = empty_strided_cuda((4, 128, 34, 34), (147968, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_15[grid(591872)](buf54, buf56, 
            591872, XBLOCK=512, num_warps=8, num_stages=1)
        buf57 = extern_kernels.convolution(buf56, primals_13, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf57, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf58 = buf57
        del buf57
        buf59 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf60 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf62 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_16[grid(256)](
            buf58, primals_14, buf59, buf60, buf62, 256, 1024, num_warps=8,
            num_stages=1)
        del primals_14
        buf63 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_17[grid(295936)](buf58, buf59,
            buf60, buf63, 295936, XBLOCK=1024, num_warps=4, num_stages=1)
        buf64 = extern_kernels.convolution(buf63, primals_15, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf64, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf65 = buf64
        del buf64
        buf66 = buf60
        del buf60
        buf70 = buf55
        del buf55
        buf69 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_add_convolution_18[grid(256)
            ](buf65, buf70, primals_16, buf66, buf69, 256, 1024, num_warps=
            8, num_stages=1)
        del primals_16
        buf71 = extern_kernels.convolution(buf70, primals_17, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf71, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf72 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_19[grid(295936)](buf70, buf72, 
            295936, XBLOCK=512, num_warps=8, num_stages=1)
        buf73 = extern_kernels.convolution(buf72, primals_18, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf73, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf74 = buf73
        del buf73
        buf75 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf76 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf78 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_16[grid(256)](
            buf74, primals_19, buf75, buf76, buf78, 256, 1024, num_warps=8,
            num_stages=1)
        del primals_19
        buf79 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_17[grid(295936)](buf74, buf75,
            buf76, buf79, 295936, XBLOCK=1024, num_warps=4, num_stages=1)
        buf80 = extern_kernels.convolution(buf79, primals_20, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf80, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf81 = buf80
        del buf80
        buf82 = buf76
        del buf76
        buf86 = buf71
        del buf71
        buf85 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_add_convolution_18[grid(256)
            ](buf81, buf86, primals_21, buf82, buf85, 256, 1024, num_warps=
            8, num_stages=1)
        del primals_21
        buf87 = extern_kernels.convolution(buf86, primals_22, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf87, (4, 5, 32, 32), (5120, 1024, 32, 1))
        buf88 = empty_strided_cuda((4, 1, 32, 32), (1024, 4096, 32, 1),
            torch.float32)
        buf89 = empty_strided_cuda((4, 1, 32, 32), (1024, 4096, 32, 1),
            torch.float32)
        triton_poi_fused__softmax_convolution_20[grid(4096)](buf87,
            primals_23, buf88, buf89, 4096, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf90 = buf87
        del buf87
        triton_poi_fused__softmax_convolution_21[grid(20480)](buf90,
            primals_23, buf88, buf89, 20480, XBLOCK=256, num_warps=4,
            num_stages=1)
        del buf88
        del primals_23
        buf91 = extern_kernels.convolution(buf86, primals_24, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf91, (4, 5, 32, 32), (5120, 1024, 32, 1))
        buf92 = buf91
        del buf91
        triton_poi_fused_convolution_22[grid(20480)](buf92, primals_25, 
            20480, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_25
        buf93 = reinterpret_tensor(buf89, (4, 32, 32), (1024, 32, 1), 0)
        del buf89
        triton_poi_fused_mul_sum_23[grid(4096)](buf92, buf90, buf93, 4096,
            XBLOCK=256, num_warps=4, num_stages=1)
    return (reinterpret_tensor(buf93, (4, 1, 32, 32), (1024, 1024, 32, 1), 
        0), primals_2, primals_3, primals_5, primals_7, primals_8,
        primals_10, primals_12, primals_13, primals_15, primals_17,
        primals_18, primals_20, primals_22, primals_24, buf2, buf4, buf6,
        reinterpret_tensor(buf10, (1024,), (1,), 0), buf11, buf13,
        reinterpret_tensor(buf17, (1024,), (1,), 0), buf18, buf19, buf20,
        buf21, buf24, buf26, buf28, buf30, buf32, reinterpret_tensor(buf36,
        (512,), (1,), 0), buf37, buf39, reinterpret_tensor(buf43, (512,), (
        1,), 0), buf44, buf45, buf46, buf47, buf50, buf52, buf54, buf56,
        buf58, reinterpret_tensor(buf62, (256,), (1,), 0), buf63, buf65,
        reinterpret_tensor(buf69, (256,), (1,), 0), buf70, buf72, buf74,
        reinterpret_tensor(buf78, (256,), (1,), 0), buf79, buf81,
        reinterpret_tensor(buf85, (256,), (1,), 0), buf86, buf90, buf92,
        reinterpret_tensor(buf82, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf75, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf66, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf59, (1, 256, 1, 1), (256, 1, 1, 1), 0),
        reinterpret_tensor(buf40, (1, 512, 1, 1), (512, 1, 1, 1), 0),
        reinterpret_tensor(buf33, (1, 512, 1, 1), (512, 1, 1, 1), 0),
        reinterpret_tensor(buf14, (1, 1024, 1, 1), (1024, 1, 1, 1), 0),
        reinterpret_tensor(buf7, (1, 1024, 1, 1), (1024, 1, 1, 1), 0))


class ResidualBlock(nn.Module):

    def __init__(self, input_channel, output_channel, upsample=True):
        super(ResidualBlock, self).__init__()
        self.conv1 = nn.Conv2d(input_channel, output_channel, kernel_size=3,
            padding=0)
        self.conv2 = nn.Conv2d(output_channel, output_channel, kernel_size=
            3, padding=0)
        self.conv_shortcut = nn.Conv2d(input_channel, output_channel,
            kernel_size=1, bias=False)
        self.relu = nn.LeakyReLU(0.2)
        self.norm = nn.InstanceNorm2d(output_channel)
        self.upsample = upsample
        self.reflecPad1 = nn.ReflectionPad2d((1, 1, 1, 1))
        self.reflecPad2 = nn.ReflectionPad2d((1, 1, 1, 1))

    def forward(self, x):
        if self.upsample:
            x = F.interpolate(x, mode='bilinear', scale_factor=2)
        x_s = self.conv_shortcut(x)
        x = self.conv1(self.reflecPad1(x))
        x = self.relu(x)
        x = self.norm(x)
        x = self.conv2(self.reflecPad2(x))
        x = self.relu(x)
        x = self.norm(x)
        return x_s + x


class Img_decoder_v3New(nn.Module):

    def __init__(self):
        super(Img_decoder_v3New, self).__init__()
        self.slice4 = ResidualBlock(512, 256)
        self.slice3 = ResidualBlock(256, 128)
        self.slice2 = ResidualBlock(128, 64)
        self.slice1 = ResidualBlock(64, 64, upsample=False)
        self.map = nn.Conv2d(64, 5, 3, 1, 1)
        self.confidence = nn.Conv2d(64, 5, 3, 1, 1)
        self.soft = nn.Softmax(dim=1)

    def forward(self, input_0):
        primals_3 = self.slice4.conv1.weight
        primals_4 = self.slice4.conv1.bias
        primals_5 = self.slice4.conv2.weight
        primals_6 = self.slice4.conv2.bias
        primals_2 = self.slice4.conv_shortcut.weight
        primals_8 = self.slice3.conv1.weight
        primals_9 = self.slice3.conv1.bias
        primals_10 = self.slice3.conv2.weight
        primals_11 = self.slice3.conv2.bias
        primals_7 = self.slice3.conv_shortcut.weight
        primals_13 = self.slice2.conv1.weight
        primals_14 = self.slice2.conv1.bias
        primals_15 = self.slice2.conv2.weight
        primals_16 = self.slice2.conv2.bias
        primals_12 = self.slice2.conv_shortcut.weight
        primals_18 = self.slice1.conv1.weight
        primals_19 = self.slice1.conv1.bias
        primals_20 = self.slice1.conv2.weight
        primals_21 = self.slice1.conv2.bias
        primals_17 = self.slice1.conv_shortcut.weight
        primals_22 = self.map.weight
        primals_23 = self.map.bias
        primals_24 = self.confidence.weight
        primals_25 = self.confidence.bias
        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, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25])
        return output[0]
