# 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/6z/c6zp6ex7l6je4eaeyrwdsgxas67mkc5y6ehm56jynqsnopblmcu3.py
# Topologically Sorted Source Nodes: [x], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x => _unsafe_index, _unsafe_index_1
# Graph fragment:
#   %_unsafe_index : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_1, [None, None, %sub_1, None]), kwargs = {})
#   %_unsafe_index_1 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index, [None, None, None, %sub_1]), kwargs = {})
triton_poi_fused_reflection_pad2d_0 = async_compile.triton('triton_poi_fused_reflection_pad2d_0', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[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_reflection_pad2d_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_reflection_pad2d_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 65712
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 74
    x1 = (xindex // 74) % 74
    x2 = (xindex // 5476)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + ((-1)*(tl_math.abs((-63) + (tl_math.abs((-5) + x0))))) + ((-64)*(tl_math.abs((-63) + (tl_math.abs((-5) + x1))))) + (4096*x2)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x3), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/cc/cccekbpoouz4zzgzos2c56sobuvklb5pmasacbllwb3jzohxpuy7.py
# Topologically Sorted Source Nodes: [x_1, x_2], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_1 => convolution
#   x_2 => add, rsqrt, var_mean
# Graph fragment:
#   %convolution : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_1, %primals_2, %primals_3, [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, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem, 1e-05), kwargs = {})
#   %rsqrt : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add,), kwargs = {})
triton_red_fused__native_batch_norm_legit_convolution_1 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.reduction(
    size_hints=[128, 8192],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 5: '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_red_fused__native_batch_norm_legit_convolution_1', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 2, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_1(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4356
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 32
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + (4356*x3)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + (4356*x3)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x3), tmp4, xmask)
    tmp7 = 4356.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x3), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/in/ciny2bql3sygecchlvr6rxw73jnhl7dgi3s5w2g2fefaoug53zzz.py
# Topologically Sorted Source Nodes: [x_2], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   x_2 => repeat
# Graph fragment:
#   %repeat : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_4, [4]), kwargs = {})
triton_poi_fused_repeat_2 = async_compile.triton('triton_poi_fused_repeat_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/n2/cn255v2yj5fbdnwsnxypmsjna6khzwy4jw6j2ry4orupe5aqy6iw.py
# Topologically Sorted Source Nodes: [x_3, x_4], Original ATen: [aten.relu, aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_3 => relu
#   x_4 => _unsafe_index_2, _unsafe_index_3
# Graph fragment:
#   %relu : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_1,), kwargs = {})
#   %_unsafe_index_2 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu, [None, None, %sub_6, None]), kwargs = {})
#   %_unsafe_index_3 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_2, [None, None, None, %sub_6]), kwargs = {})
triton_poi_fused_reflection_pad2d_relu_3 = async_compile.triton('triton_poi_fused_reflection_pad2d_relu_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=[1048576], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=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_poi_fused_reflection_pad2d_relu_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, '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_relu_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 574592
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 67
    x1 = (xindex // 67) % 67
    x2 = (xindex // 4489)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4355 + ((-1)*(tl_math.abs((-65) + (tl_math.abs((-1) + x0))))) + ((-66)*(tl_math.abs((-65) + (tl_math.abs((-1) + x1))))) + (4356*x2)), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x2), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x2), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + (x2), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + (x3), tmp10, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/xz/cxzh6nqsjelve5ob25xfne5gachxdayce26fuvsylva6jrnjcgu5.py
# Topologically Sorted Source Nodes: [x_5, x_6], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_5 => convolution_1
#   x_6 => add_2, rsqrt_1, var_mean_1
# Graph fragment:
#   %convolution_1 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_3, %primals_6, %primals_7, [2, 2], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_1 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_2, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_2 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_2, 1e-05), kwargs = {})
#   %rsqrt_1 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_2,), kwargs = {})
triton_red_fused__native_batch_norm_legit_convolution_4 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_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.reduction(
    size_hints=[256, 2048],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 5: '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_red_fused__native_batch_norm_legit_convolution_4', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 2, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_4(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 256
    rnumel = 1089
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 64
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + (1089*x3)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + (1089*x3)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x3), tmp4, xmask)
    tmp7 = 1089.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x3), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/bo/cbop6byfkkzzjktajzua3ovnpvhy32nxb7dbv364jfeaxunlv7bo.py
# Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   x_6 => repeat_2
# Graph fragment:
#   %repeat_2 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_8, [4]), kwargs = {})
triton_poi_fused_repeat_5 = async_compile.triton('triton_poi_fused_repeat_5', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/pu/cpuzqhw3biucgjwhzz5zpno5fys7fmjfedq7qg5cdqio5ht2p77j.py
# Topologically Sorted Source Nodes: [x_7, x_8], Original ATen: [aten.relu, aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_7 => relu_1
#   x_8 => _unsafe_index_4, _unsafe_index_5
# Graph fragment:
#   %relu_1 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_3,), kwargs = {})
#   %_unsafe_index_4 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu_1, [None, None, %sub_11, 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_11]), kwargs = {})
triton_poi_fused_reflection_pad2d_relu_6 = async_compile.triton('triton_poi_fused_reflection_pad2d_relu_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=[524288], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=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_poi_fused_reflection_pad2d_relu_6', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, '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_relu_6(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, 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 + (1088 + ((-1)*(tl_math.abs((-32) + (tl_math.abs((-1) + x0))))) + ((-33)*(tl_math.abs((-32) + (tl_math.abs((-1) + x1))))) + (1089*x2)), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x2), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x2), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + (x2), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + (x3), tmp10, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/nr/cnrulaca7axjpejfelvoukj4275yefkepol6ssk73jegol2a7v4j.py
# Topologically Sorted Source Nodes: [x_9, x_10], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_10 => add_4, rsqrt_2, var_mean_2
#   x_9 => convolution_2
# Graph fragment:
#   %convolution_2 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_5, %primals_10, %primals_11, [2, 2], [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_4, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_4 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_4, 1e-05), kwargs = {})
#   %rsqrt_2 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_4,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_7 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_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.persistent_reduction(
    size_hints=[512, 256],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_7', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], '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_7(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, 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 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp5 = tl.broadcast_to(tmp3, [RBLOCK])
    tmp7 = triton_helpers.promote_to_tensor(tl.sum(tmp5, 0))
    tmp8 = tl.full([1], 256, tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = tmp3 - tmp10
    tmp12 = tmp11 * tmp11
    tmp13 = tl.broadcast_to(tmp12, [RBLOCK])
    tmp15 = triton_helpers.promote_to_tensor(tl.sum(tmp13, 0))
    tmp16 = 256.0
    tmp17 = tmp15 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.store(in_out_ptr0 + (r2 + (256*x3)), tmp2, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x3), tmp20, None)
    tl.store(out_ptr0 + (x3), tmp10, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/cx/ccx6gci2ib4oohea5xn4ov5ur2nz2zods6mnyw3romkzf5s25lx3.py
# Topologically Sorted Source Nodes: [x_10], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   x_10 => repeat_4
# Graph fragment:
#   %repeat_4 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_12, [4]), kwargs = {})
triton_poi_fused_repeat_8 = async_compile.triton('triton_poi_fused_repeat_8', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


# kernel path: runs/run_shard_6/inductor_cache/cb/ccbukoi7vclz6u6p3devgjverddcql7canz2j67ieotvy3arkary.py
# Topologically Sorted Source Nodes: [x_11, x_12], Original ATen: [aten.relu, aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_11 => relu_2
#   x_12 => _unsafe_index_6, _unsafe_index_7
# Graph fragment:
#   %relu_2 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_5,), kwargs = {})
#   %_unsafe_index_6 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu_2, [None, None, %sub_16, 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_16]), kwargs = {})
triton_poi_fused_reflection_pad2d_relu_9 = async_compile.triton('triton_poi_fused_reflection_pad2d_relu_9', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[262144], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=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_poi_fused_reflection_pad2d_relu_9', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, '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_relu_9(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, 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')
    tmp1 = tl.load(in_ptr1 + (x2), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x2), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x2), None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + (x3), tmp10, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/hs/chsmvdjd5wcez3hx37l5f5urhkvxeg2zxbjltpjflrpl22zdydh7.py
# Topologically Sorted Source Nodes: [x_13, x_14, x_15], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
# Source node to ATen node mapping:
#   x_13 => convolution_3
#   x_14 => add_6, repeat_6, repeat_7, rsqrt_3, var_mean_3
#   x_15 => relu_3
# Graph fragment:
#   %convolution_3 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_7, %primals_14, %primals_15, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %repeat_6 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_16, [4]), kwargs = {})
#   %repeat_7 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_17, [4]), kwargs = {})
#   %var_mean_3 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_6, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_6 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_6, 1e-05), kwargs = {})
#   %rsqrt_3 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_6,), kwargs = {})
#   %relu_3 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%view_7,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.persistent_reduction(
    size_hints=[512, 256],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp32', 9: 'i32', 10: '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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], 'no_x_dim': True, 'num_load': 4, '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_relu_repeat_10(in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr2, out_ptr3, 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)
    x0 = xindex
    r3 = rindex
    x1 = xindex % 128
    tmp0 = tl.load(in_ptr0 + (x0 % 128), None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x0 % 128), None, eviction_policy='evict_last')
    tmp2 = tl.load(in_out_ptr0 + (r3 + (256*x0)), None)
    tmp3 = tl.load(in_ptr2 + (x1), None, eviction_policy='evict_last')
    tmp4 = tmp2 + tmp3
    tmp5 = tl.broadcast_to(tmp4, [RBLOCK])
    tmp7 = tl.broadcast_to(tmp5, [RBLOCK])
    tmp9 = triton_helpers.promote_to_tensor(tl.sum(tmp7, 0))
    tmp10 = tl.full([1], 256, tl.int32)
    tmp11 = tmp10.to(tl.float32)
    tmp12 = tmp9 / tmp11
    tmp13 = tmp5 - tmp12
    tmp14 = tmp13 * tmp13
    tmp15 = tl.broadcast_to(tmp14, [RBLOCK])
    tmp17 = triton_helpers.promote_to_tensor(tl.sum(tmp15, 0))
    tmp18 = 256.0
    tmp19 = tmp17 / tmp18
    tmp20 = 1e-05
    tmp21 = tmp19 + tmp20
    tmp22 = libdevice.rsqrt(tmp21)
    tmp23 = tmp4 - tmp12
    tmp24 = tmp23 * tmp22
    tmp25 = tmp24 * tmp0
    tmp26 = tmp25 + tmp1
    tmp27 = tl.full([1], 0, tl.int32)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tl.store(out_ptr0 + (x0), tmp0, None)
    tl.store(out_ptr1 + (x0), tmp1, None)
    tl.store(in_out_ptr0 + (r3 + (256*x0)), tmp4, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x0), tmp22, None)
    tl.store(out_ptr3 + (r3 + (256*x0)), tmp28, None)
    tl.store(out_ptr2 + (x0), tmp12, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/tt/cttvoi63nbrkzaawfkfj7kof5gg7rdu7erfcx3zznexrlxhhqpbx.py
# Topologically Sorted Source Nodes: [x_16], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_16 => _unsafe_index_8, _unsafe_index_9
# Graph fragment:
#   %_unsafe_index_8 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu_3, [None, None, %sub_16, None]), kwargs = {})
#   %_unsafe_index_9 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_8, [None, None, None, %sub_16]), kwargs = {})
triton_poi_fused_reflection_pad2d_11 = async_compile.triton('triton_poi_fused_reflection_pad2d_11', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[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_11', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_reflection_pad2d_11(in_ptr0, 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')
    tl.store(out_ptr0 + (x3), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/oo/coonli7toumwjdnagyhu5xmu3wzpfj6wzlk3negwockmloxtypls.py
# Topologically Sorted Source Nodes: [x_19, x_20, x_21], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_19 => relu_4
#   x_20 => add_10
#   x_21 => _unsafe_index_10, _unsafe_index_11
# Graph fragment:
#   %relu_4 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_9,), kwargs = {})
#   %add_10 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%relu_3, %relu_4), kwargs = {})
#   %_unsafe_index_10 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_10, [None, None, %sub_16, None]), kwargs = {})
#   %_unsafe_index_11 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_10, [None, None, None, %sub_16]), kwargs = {})
triton_poi_fused_add_reflection_pad2d_relu_12 = async_compile.triton('triton_poi_fused_add_reflection_pad2d_relu_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=[262144], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_reflection_pad2d_relu_12', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_add_reflection_pad2d_relu_12(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, 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')
    tmp1 = tl.load(in_ptr1 + (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')
    tmp2 = tl.load(in_ptr2 + (x2), None, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr3 + (x2), None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + (x2), None, eviction_policy='evict_last')
    tmp3 = tmp1 - tmp2
    tmp5 = tmp3 * tmp4
    tmp7 = tmp5 * tmp6
    tmp9 = tmp7 + tmp8
    tmp10 = tl.full([1], 0, tl.int32)
    tmp11 = triton_helpers.maximum(tmp10, tmp9)
    tmp12 = tmp0 + tmp11
    tl.store(out_ptr0 + (x3), tmp12, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/rb/crbic5nlnsjyr3okgxosok7y7jbjadlfwpgd2t62anmhmxmicdwt.py
# Topologically Sorted Source Nodes: [x_58], Original ATen: [aten.arange]
# Source node to ATen node mapping:
#   x_58 => iota_28
# Graph fragment:
#   %iota_28 : [num_users=3] = call_function[target=torch.ops.prims.iota.default](args = (32,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
triton_poi_fused_arange_13 = async_compile.triton('triton_poi_fused_arange_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: '*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_arange_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_arange_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
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/lh/clhmroknisxpfulbzxd35lthz4fgwlqlou2jn6t3wegzuda2pndf.py
# Topologically Sorted Source Nodes: [x_58], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
# Source node to ATen node mapping:
#   x_58 => add_31, add_32, convert_element_type, convert_element_type_1, mul_26, mul_27
# Graph fragment:
#   %mul_26 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%iota_28, 1), kwargs = {})
#   %add_31 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_26, 0), kwargs = {})
#   %convert_element_type : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%add_31, torch.float32), kwargs = {})
#   %add_32 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type, 0.0), kwargs = {})
#   %mul_27 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_32, 0.5), kwargs = {})
#   %convert_element_type_1 : [num_users=3] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%mul_27, torch.int64), kwargs = {})
triton_poi_fused__to_copy_add_arange_mul_14 = async_compile.triton('triton_poi_fused__to_copy_add_arange_mul_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=[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_add_arange_mul_14', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_14(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.to(tl.int32)
    tl.store(out_ptr0 + (x0), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/xz/cxzxvmd5v3ctwfqe6annx2nolajigrq4yekqbvwku5szxmckjb5v.py
# Topologically Sorted Source Nodes: [x_55, x_56, x_57, x_58, x_59], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d, aten._unsafe_index]
# Source node to ATen node mapping:
#   x_55 => relu_12
#   x_56 => add_30
#   x_57 => _unsafe_index_26, _unsafe_index_27
#   x_58 => _unsafe_index_28
#   x_59 => _unsafe_index_29
# Graph fragment:
#   %relu_12 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_25,), kwargs = {})
#   %add_30 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%relu_11, %relu_12), kwargs = {})
#   %_unsafe_index_26 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%add_30, [None, None, %sub_66, None]), kwargs = {})
#   %_unsafe_index_27 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_26, [None, None, None, %sub_66]), kwargs = {})
#   %_unsafe_index_28 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_27, [None, None, %unsqueeze_52, %convert_element_type_1]), kwargs = {})
#   %_unsafe_index_29 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_28, [None, None, %sub_70, None]), kwargs = {})
triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15 = async_compile.triton('triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_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: '*i64', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 557056
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 32) % 34
    x0 = xindex % 32
    x2 = (xindex // 1088)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (31 + ((-1)*(tl_math.abs((-31) + (tl_math.abs((-1) + x1)))))), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr3 + (x2), None, eviction_policy='evict_last')
    tmp13 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr5 + (x2), None, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr6 + (x2), 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_ptr1 + (255 + ((-1)*(tl_math.abs((-15) + tmp8))) + ((-16)*(tl_math.abs((-15) + tmp4))) + (256*x2)), None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr2 + (255 + ((-1)*(tl_math.abs((-15) + tmp8))) + ((-16)*(tl_math.abs((-15) + tmp4))) + (256*x2)), None, eviction_policy='evict_last')
    tmp12 = tmp10 - tmp11
    tmp14 = tmp12 * tmp13
    tmp16 = tmp14 * tmp15
    tmp18 = tmp16 + tmp17
    tmp19 = tl.full([1], 0, tl.int32)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp21 = tmp9 + tmp20
    tl.store(out_ptr0 + (x4), tmp21, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/os/cosc266h7wvveiabyxuy4nbeqm5psm2jxkrmtwz6pznjwe3cke65.py
# Topologically Sorted Source Nodes: [x_59], Original ATen: [aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_59 => _unsafe_index_30
# Graph fragment:
#   %_unsafe_index_30 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_29, [None, None, None, %sub_70]), kwargs = {})
triton_poi_fused_reflection_pad2d_16 = async_compile.triton('triton_poi_fused_reflection_pad2d_16', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[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_16', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_reflection_pad2d_16(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)
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (31 + ((-1)*(tl_math.abs((-31) + (tl_math.abs((-1) + x0))))) + (32*x1)), None, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2), tmp0, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/oe/coevdbvv37usd27ae26ara6xiwj7sa7dv2r7eewjinl3gdmwonuu.py
# Topologically Sorted Source Nodes: [x_60, x_61], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_60 => convolution_13
#   x_61 => add_35, rsqrt_13, var_mean_13
# Graph fragment:
#   %convolution_13 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_30, %primals_54, %primals_55, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_13 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_26, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_35 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_26, 1e-05), kwargs = {})
#   %rsqrt_13 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_35,), kwargs = {})
triton_per_fused__native_batch_norm_legit_convolution_17 = async_compile.triton('triton_per_fused__native_batch_norm_legit_convolution_17', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.persistent_reduction(
    size_hints=[256, 1024],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused__native_batch_norm_legit_convolution_17', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], '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_17(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, 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 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp5 = tl.broadcast_to(tmp3, [RBLOCK])
    tmp7 = triton_helpers.promote_to_tensor(tl.sum(tmp5, 0))
    tmp8 = tl.full([1], 1024, tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = tmp3 - tmp10
    tmp12 = tmp11 * tmp11
    tmp13 = tl.broadcast_to(tmp12, [RBLOCK])
    tmp15 = triton_helpers.promote_to_tensor(tl.sum(tmp13, 0))
    tmp16 = 1024.0
    tmp17 = tmp15 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.store(in_out_ptr0 + (r2 + (1024*x3)), tmp2, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x3), tmp20, None)
    tl.store(out_ptr0 + (x3), tmp10, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/ou/couo6xzmjwqbsh4aninhzxrfm7t6zlt3vyqlw6f6d3t6xh3frbfg.py
# Topologically Sorted Source Nodes: [x_64], Original ATen: [aten.arange]
# Source node to ATen node mapping:
#   x_64 => iota_34
# Graph fragment:
#   %iota_34 : [num_users=2] = call_function[target=torch.ops.prims.iota.default](args = (64,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
triton_poi_fused_arange_18 = async_compile.triton('triton_poi_fused_arange_18', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[64], 
    filename=__file__,
    triton_meta={'signature': {0: '*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_arange_18', '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_arange_18(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/ud/cudpb3kdyvqb7qiovaslx7kchi6orczekfulhrfx5wv6frsnspck.py
# Topologically Sorted Source Nodes: [x_64], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
# Source node to ATen node mapping:
#   x_64 => add_37, add_38, convert_element_type_4, convert_element_type_5, mul_32, mul_33
# Graph fragment:
#   %mul_32 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%iota_34, 1), kwargs = {})
#   %add_37 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_32, 0), kwargs = {})
#   %convert_element_type_4 : [num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%add_37, torch.float32), kwargs = {})
#   %add_38 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%convert_element_type_4, 0.0), kwargs = {})
#   %mul_33 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_38, 0.5), kwargs = {})
#   %convert_element_type_5 : [num_users=3] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%mul_33, torch.int64), kwargs = {})
triton_poi_fused__to_copy_add_arange_mul_19 = async_compile.triton('triton_poi_fused__to_copy_add_arange_mul_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=[64], 
    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_add_arange_mul_19', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_19(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 * tmp2
    tmp4 = tmp3.to(tl.int32)
    tl.store(out_ptr0 + (x0), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/vo/cvor2isivy3yg7msgpkv5xnnhsipwsewsjhiw6m7eptwgflsriik.py
# Topologically Sorted Source Nodes: [x_62, x_63, x_64, x_65], Original ATen: [aten.relu, aten.reflection_pad2d, aten._unsafe_index]
# Source node to ATen node mapping:
#   x_62 => relu_13
#   x_63 => _unsafe_index_31, _unsafe_index_32
#   x_64 => _unsafe_index_33
#   x_65 => _unsafe_index_34, _unsafe_index_35
# Graph fragment:
#   %relu_13 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_27,), kwargs = {})
#   %_unsafe_index_31 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu_13, [None, None, %sub_75, None]), kwargs = {})
#   %_unsafe_index_32 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_31, [None, None, None, %sub_75]), kwargs = {})
#   %_unsafe_index_33 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_32, [None, None, %unsqueeze_57, %convert_element_type_5]), kwargs = {})
#   %_unsafe_index_34 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_33, [None, None, %sub_79, None]), kwargs = {})
#   %_unsafe_index_35 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_34, [None, None, None, %sub_79]), kwargs = {})
triton_poi_fused__unsafe_index_reflection_pad2d_relu_20 = async_compile.triton('triton_poi_fused__unsafe_index_reflection_pad2d_relu_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=[2097152], 
    filename=__file__,
    triton_meta={'signature': {0: '*i64', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__unsafe_index_reflection_pad2d_relu_20', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 6, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__unsafe_index_reflection_pad2d_relu_20(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1115136
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 66) % 66
    x0 = xindex % 66
    x2 = (xindex // 4356)
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + ((-1)*(tl_math.abs((-63) + (tl_math.abs((-1) + x1)))))), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (63 + ((-1)*(tl_math.abs((-63) + (tl_math.abs((-1) + x0)))))), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr2 + (x2), xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr3 + (x2), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr4 + (x2), xmask, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr5 + (x2), xmask, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 32, 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_ptr1 + (1023 + ((-1)*(tl_math.abs((-31) + tmp8))) + ((-32)*(tl_math.abs((-31) + tmp4))) + (1024*x2)), xmask, eviction_policy='evict_last')
    tmp11 = tmp9 - tmp10
    tmp13 = tmp11 * tmp12
    tmp15 = tmp13 * tmp14
    tmp17 = tmp15 + tmp16
    tmp18 = tl.full([1], 0, tl.int32)
    tmp19 = triton_helpers.maximum(tmp18, tmp17)
    tl.store(out_ptr0 + (x5), tmp19, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/uv/cuvh6ka5moywn3lyxkqjfsct23hu3t4t2l7akqp5s66jv334mgec.py
# Topologically Sorted Source Nodes: [x_66, x_67], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
# Source node to ATen node mapping:
#   x_66 => convolution_14
#   x_67 => add_41, rsqrt_14, var_mean_14
# Graph fragment:
#   %convolution_14 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_35, %primals_58, %primals_59, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %var_mean_14 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_28, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_41 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_28, 1e-05), kwargs = {})
#   %rsqrt_14 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_41,), kwargs = {})
triton_red_fused__native_batch_norm_legit_convolution_21 = async_compile.triton('triton_red_fused__native_batch_norm_legit_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.reduction(
    size_hints=[128, 4096],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: 'i32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_21', 'mutated_arg_names': ['in_out_ptr0', 'in_out_ptr1'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 2, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_21(in_out_ptr0, in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 128
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 32
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + (4096*x3)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = triton_helpers.welford_reduce(
            tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0
        )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + (4096*x3)), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(
        tmp4_mean, tmp4_m2, tmp4_weight, 1
    )
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tl.store(out_ptr0 + (x3), tmp4, xmask)
    tmp7 = 4096.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + (x3), tmp11, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/uu/cuuhbrvjuevz367ve2ajclcc6uy5k2vtz5hjdsrcf7qo736pfhc3.py
# Topologically Sorted Source Nodes: [x_68, x_69], Original ATen: [aten.relu, aten.reflection_pad2d]
# Source node to ATen node mapping:
#   x_68 => relu_14
#   x_69 => _unsafe_index_36, _unsafe_index_37
# Graph fragment:
#   %relu_14 : [num_users=1] = call_function[target=torch.ops.aten.relu.default](args = (%view_29,), kwargs = {})
#   %_unsafe_index_36 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%relu_14, [None, None, %sub_84, None]), kwargs = {})
#   %_unsafe_index_37 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_36, [None, None, None, %sub_84]), kwargs = {})
triton_poi_fused_reflection_pad2d_relu_22 = async_compile.triton('triton_poi_fused_reflection_pad2d_relu_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=[1048576], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=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_poi_fused_reflection_pad2d_relu_22', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, '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_relu_22(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 663552
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 72
    x1 = (xindex // 72) % 72
    x2 = (xindex // 5184)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + ((-1)*(tl_math.abs((-63) + (tl_math.abs((-4) + x0))))) + ((-64)*(tl_math.abs((-63) + (tl_math.abs((-4) + x1))))) + (4096*x2)), None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x2), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x2), None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + (x2), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + (x3), tmp10, None)
''', device_str='cuda')


# kernel path: runs/run_shard_6/inductor_cache/k6/ck6kvb4rgbhsot5d63arefzdafqmmalawdaegylknrecpeoxc6hh.py
# Topologically Sorted Source Nodes: [x_70, x_71, x_72], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.sigmoid]
# Source node to ATen node mapping:
#   x_70 => convolution_15
#   x_71 => add_43, repeat_30, rsqrt_15, var_mean_15
#   x_72 => sigmoid
# Graph fragment:
#   %convolution_15 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%_unsafe_index_37, %primals_62, %primals_63, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
#   %repeat_30 : [num_users=2] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_64, [4]), kwargs = {})
#   %var_mean_15 : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view_30, [0, 2, 3]), kwargs = {correction: 0, keepdim: True})
#   %add_43 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_30, 1e-05), kwargs = {})
#   %rsqrt_15 : [num_users=2] = call_function[target=torch.ops.aten.rsqrt.default](args = (%add_43,), kwargs = {})
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_31,), kwargs = {})
triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23 = async_compile.triton('triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_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.reduction(
    size_hints=[16, 4096],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: 'i32', 9: '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, 9), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 2, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False}
)
@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3, out_ptr4, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 12
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 % 3), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
    x1 = xindex % 3
    tmp2 = tl.load(in_ptr1 + (x1), xmask, eviction_policy='evict_last')
    tmp5_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp5_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp5_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp1 = tl.load(in_out_ptr0 + (r3 + (4096*x0)), rmask & xmask, eviction_policy='evict_last', other=0.0)
        tmp3 = tmp1 + tmp2
        tmp4 = tl.broadcast_to(tmp3, [XBLOCK, RBLOCK])
        tmp5_mean_next, tmp5_m2_next, tmp5_weight_next = triton_helpers.welford_reduce(
            tmp4, tmp5_mean, tmp5_m2, tmp5_weight, roffset == 0
        )
        tmp5_mean = tl.where(rmask & xmask, tmp5_mean_next, tmp5_mean)
        tmp5_m2 = tl.where(rmask & xmask, tmp5_m2_next, tmp5_m2)
        tmp5_weight = tl.where(rmask & xmask, tmp5_weight_next, tmp5_weight)
        tl.store(in_out_ptr0 + (r3 + (4096*x0)), tmp3, rmask & xmask)
    tmp5_tmp, tmp6_tmp, tmp7_tmp = triton_helpers.welford(
        tmp5_mean, tmp5_m2, tmp5_weight, 1
    )
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tmp7 = tmp7_tmp[:, None]
    tl.store(out_ptr1 + (x0), tmp5, xmask)
    tmp17 = tl.load(in_ptr2 + (x1), xmask, eviction_policy='evict_last')
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp8 = tl.load(in_out_ptr0 + (r3 + (4096*x0)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp9 = tmp8 - tmp5
        tmp10 = 4096.0
        tmp11 = tmp6 / tmp10
        tmp12 = 1e-05
        tmp13 = tmp11 + tmp12
        tmp14 = libdevice.rsqrt(tmp13)
        tmp15 = tmp9 * tmp14
        tmp16 = tmp15 * tmp0
        tmp18 = tmp16 + tmp17
        tmp19 = tl.sigmoid(tmp18)
        tl.store(out_ptr3 + (r3 + (4096*x0)), tmp19, rmask & xmask)
    tmp20 = 4096.0
    tmp21 = tmp6 / tmp20
    tmp22 = 1e-05
    tmp23 = tmp21 + tmp22
    tmp24 = libdevice.rsqrt(tmp23)
    tl.store(out_ptr4 + (x0), tmp24, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26, primals_27, primals_28, primals_29, primals_30, primals_31, primals_32, primals_33, primals_34, primals_35, primals_36, primals_37, primals_38, primals_39, primals_40, primals_41, primals_42, primals_43, primals_44, primals_45, primals_46, primals_47, primals_48, primals_49, primals_50, primals_51, primals_52, primals_53, primals_54, primals_55, primals_56, primals_57, primals_58, primals_59, primals_60, primals_61, primals_62, primals_63, primals_64, primals_65 = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_2, (32, 3, 9, 9), (243, 81, 9, 1))
    assert_size_stride(primals_3, (32, ), (1, ))
    assert_size_stride(primals_4, (32, ), (1, ))
    assert_size_stride(primals_5, (32, ), (1, ))
    assert_size_stride(primals_6, (64, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_7, (64, ), (1, ))
    assert_size_stride(primals_8, (64, ), (1, ))
    assert_size_stride(primals_9, (64, ), (1, ))
    assert_size_stride(primals_10, (128, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (128, ), (1, ))
    assert_size_stride(primals_12, (128, ), (1, ))
    assert_size_stride(primals_13, (128, ), (1, ))
    assert_size_stride(primals_14, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_15, (128, ), (1, ))
    assert_size_stride(primals_16, (128, ), (1, ))
    assert_size_stride(primals_17, (128, ), (1, ))
    assert_size_stride(primals_18, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_19, (128, ), (1, ))
    assert_size_stride(primals_20, (128, ), (1, ))
    assert_size_stride(primals_21, (128, ), (1, ))
    assert_size_stride(primals_22, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_23, (128, ), (1, ))
    assert_size_stride(primals_24, (128, ), (1, ))
    assert_size_stride(primals_25, (128, ), (1, ))
    assert_size_stride(primals_26, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_27, (128, ), (1, ))
    assert_size_stride(primals_28, (128, ), (1, ))
    assert_size_stride(primals_29, (128, ), (1, ))
    assert_size_stride(primals_30, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_31, (128, ), (1, ))
    assert_size_stride(primals_32, (128, ), (1, ))
    assert_size_stride(primals_33, (128, ), (1, ))
    assert_size_stride(primals_34, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_35, (128, ), (1, ))
    assert_size_stride(primals_36, (128, ), (1, ))
    assert_size_stride(primals_37, (128, ), (1, ))
    assert_size_stride(primals_38, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_39, (128, ), (1, ))
    assert_size_stride(primals_40, (128, ), (1, ))
    assert_size_stride(primals_41, (128, ), (1, ))
    assert_size_stride(primals_42, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_43, (128, ), (1, ))
    assert_size_stride(primals_44, (128, ), (1, ))
    assert_size_stride(primals_45, (128, ), (1, ))
    assert_size_stride(primals_46, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_47, (128, ), (1, ))
    assert_size_stride(primals_48, (128, ), (1, ))
    assert_size_stride(primals_49, (128, ), (1, ))
    assert_size_stride(primals_50, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_51, (128, ), (1, ))
    assert_size_stride(primals_52, (128, ), (1, ))
    assert_size_stride(primals_53, (128, ), (1, ))
    assert_size_stride(primals_54, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_55, (64, ), (1, ))
    assert_size_stride(primals_56, (64, ), (1, ))
    assert_size_stride(primals_57, (64, ), (1, ))
    assert_size_stride(primals_58, (32, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_59, (32, ), (1, ))
    assert_size_stride(primals_60, (32, ), (1, ))
    assert_size_stride(primals_61, (32, ), (1, ))
    assert_size_stride(primals_62, (3, 32, 9, 9), (2592, 81, 9, 1))
    assert_size_stride(primals_63, (3, ), (1, ))
    assert_size_stride(primals_64, (3, ), (1, ))
    assert_size_stride(primals_65, (3, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 3, 74, 74), (16428, 5476, 74, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x], Original ATen: [aten.reflection_pad2d]
        stream0 = get_raw_stream(0)
        triton_poi_fused_reflection_pad2d_0.run(primals_1, buf0, 65712, grid=grid(65712), stream=stream0)
        del primals_1
        # Topologically Sorted Source Nodes: [x_1], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 32, 66, 66), (139392, 4356, 66, 1))
        buf2 = buf1; del buf1  # reuse
        buf5 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf6 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf8 = reinterpret_tensor(buf6, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf6  # reuse
        # Topologically Sorted Source Nodes: [x_1, x_2], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_1.run(buf2, buf8, primals_3, buf5, 128, 4356, grid=grid(128), stream=stream0)
        del primals_3
        buf3 = empty_strided_cuda((128, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_2], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_2.run(primals_4, buf3, 128, grid=grid(128), stream=stream0)
        del primals_4
        buf4 = empty_strided_cuda((128, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_2], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_2.run(primals_5, buf4, 128, grid=grid(128), stream=stream0)
        del primals_5
        buf9 = empty_strided_cuda((4, 32, 67, 67), (143648, 4489, 67, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_3, x_4], Original ATen: [aten.relu, aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_relu_3.run(buf2, buf5, buf8, buf3, buf4, buf9, 574592, grid=grid(574592), stream=stream0)
        # Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.convolution]
        buf10 = extern_kernels.convolution(buf9, primals_6, stride=(2, 2), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 64, 33, 33), (69696, 1089, 33, 1))
        buf11 = buf10; del buf10  # reuse
        buf14 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 1, 1), torch.float32)
        buf15 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf17 = reinterpret_tensor(buf15, (1, 256, 1, 1), (256, 1, 1, 1), 0); del buf15  # reuse
        # Topologically Sorted Source Nodes: [x_5, x_6], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_4.run(buf11, buf17, primals_7, buf14, 256, 1089, grid=grid(256), stream=stream0)
        del primals_7
        buf12 = empty_strided_cuda((256, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_5.run(primals_8, buf12, 256, grid=grid(256), stream=stream0)
        del primals_8
        buf13 = empty_strided_cuda((256, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_5.run(primals_9, buf13, 256, grid=grid(256), stream=stream0)
        del primals_9
        buf18 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_7, x_8], Original ATen: [aten.relu, aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_relu_6.run(buf11, buf14, buf17, buf12, buf13, buf18, 295936, grid=grid(295936), stream=stream0)
        # Topologically Sorted Source Nodes: [x_9], Original ATen: [aten.convolution]
        buf19 = extern_kernels.convolution(buf18, primals_10, stride=(2, 2), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf20 = buf19; del buf19  # reuse
        buf23 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf24 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf26 = reinterpret_tensor(buf24, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf24  # reuse
        # Topologically Sorted Source Nodes: [x_9, x_10], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf20, buf26, primals_11, buf23, 512, 256, grid=grid(512), stream=stream0)
        del primals_11
        buf21 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_10], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_12, buf21, 512, grid=grid(512), stream=stream0)
        del primals_12
        buf22 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_10], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_13, buf22, 512, grid=grid(512), stream=stream0)
        del primals_13
        buf27 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_11, x_12], Original ATen: [aten.relu, aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_relu_9.run(buf20, buf23, buf26, buf21, buf22, buf27, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_13], Original ATen: [aten.convolution]
        buf28 = extern_kernels.convolution(buf27, primals_14, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf30 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf31 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf29 = buf28; del buf28  # reuse
        buf32 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf33 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf35 = reinterpret_tensor(buf33, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf33  # reuse
        buf36 = empty_strided_cuda((4, 128, 16, 16), (32768, 256, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_13, x_14, x_15], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10.run(buf29, buf35, primals_16, primals_17, primals_15, buf30, buf31, buf32, buf36, 512, 256, grid=grid(512), stream=stream0)
        del primals_15
        del primals_16
        del primals_17
        buf37 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_16], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_11.run(buf36, buf37, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_17], Original ATen: [aten.convolution]
        buf38 = extern_kernels.convolution(buf37, primals_18, 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
        buf42 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf43 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf45 = reinterpret_tensor(buf43, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf43  # reuse
        # Topologically Sorted Source Nodes: [x_17, x_18], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf39, buf45, primals_19, buf42, 512, 256, grid=grid(512), stream=stream0)
        del primals_19
        buf40 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_18], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_20, buf40, 512, grid=grid(512), stream=stream0)
        del primals_20
        buf41 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_18], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_21, buf41, 512, grid=grid(512), stream=stream0)
        del primals_21
        buf46 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_19, x_20, x_21], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d]
        triton_poi_fused_add_reflection_pad2d_relu_12.run(buf36, buf39, buf42, buf45, buf40, buf41, buf46, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_22], Original ATen: [aten.convolution]
        buf47 = extern_kernels.convolution(buf46, primals_22, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf47, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf49 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf50 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf48 = buf47; del buf47  # reuse
        buf51 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf52 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf54 = reinterpret_tensor(buf52, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf52  # reuse
        buf55 = buf36; del buf36  # reuse
        # Topologically Sorted Source Nodes: [x_22, x_23, x_24], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10.run(buf48, buf54, primals_24, primals_25, primals_23, buf49, buf50, buf51, buf55, 512, 256, grid=grid(512), stream=stream0)
        del primals_23
        del primals_24
        del primals_25
        buf56 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_25], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_11.run(buf55, buf56, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_26], Original ATen: [aten.convolution]
        buf57 = extern_kernels.convolution(buf56, primals_26, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf57, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf58 = buf57; del buf57  # reuse
        buf61 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf62 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf64 = reinterpret_tensor(buf62, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf62  # reuse
        # Topologically Sorted Source Nodes: [x_26, x_27], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf58, buf64, primals_27, buf61, 512, 256, grid=grid(512), stream=stream0)
        del primals_27
        buf59 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_27], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_28, buf59, 512, grid=grid(512), stream=stream0)
        del primals_28
        buf60 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_27], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_29, buf60, 512, grid=grid(512), stream=stream0)
        del primals_29
        buf65 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_28, x_29, x_30], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d]
        triton_poi_fused_add_reflection_pad2d_relu_12.run(buf55, buf58, buf61, buf64, buf59, buf60, buf65, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_31], Original ATen: [aten.convolution]
        buf66 = extern_kernels.convolution(buf65, primals_30, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf66, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf68 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf69 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf67 = buf66; del buf66  # reuse
        buf70 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf71 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf73 = reinterpret_tensor(buf71, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf71  # reuse
        buf74 = buf55; del buf55  # reuse
        # Topologically Sorted Source Nodes: [x_31, x_32, x_33], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10.run(buf67, buf73, primals_32, primals_33, primals_31, buf68, buf69, buf70, buf74, 512, 256, grid=grid(512), stream=stream0)
        del primals_31
        del primals_32
        del primals_33
        buf75 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_34], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_11.run(buf74, buf75, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_35], Original ATen: [aten.convolution]
        buf76 = extern_kernels.convolution(buf75, primals_34, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf76, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf77 = buf76; del buf76  # reuse
        buf80 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf81 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf83 = reinterpret_tensor(buf81, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf81  # reuse
        # Topologically Sorted Source Nodes: [x_35, x_36], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf77, buf83, primals_35, buf80, 512, 256, grid=grid(512), stream=stream0)
        del primals_35
        buf78 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_36], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_36, buf78, 512, grid=grid(512), stream=stream0)
        del primals_36
        buf79 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_36], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_37, buf79, 512, grid=grid(512), stream=stream0)
        del primals_37
        buf84 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_37, x_38, x_39], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d]
        triton_poi_fused_add_reflection_pad2d_relu_12.run(buf74, buf77, buf80, buf83, buf78, buf79, buf84, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_40], Original ATen: [aten.convolution]
        buf85 = extern_kernels.convolution(buf84, primals_38, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf85, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf87 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf88 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf86 = buf85; del buf85  # reuse
        buf89 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf90 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf92 = reinterpret_tensor(buf90, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf90  # reuse
        buf93 = buf74; del buf74  # reuse
        # Topologically Sorted Source Nodes: [x_40, x_41, x_42], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10.run(buf86, buf92, primals_40, primals_41, primals_39, buf87, buf88, buf89, buf93, 512, 256, grid=grid(512), stream=stream0)
        del primals_39
        del primals_40
        del primals_41
        buf94 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_43], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_11.run(buf93, buf94, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_44], Original ATen: [aten.convolution]
        buf95 = extern_kernels.convolution(buf94, primals_42, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf95, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf96 = buf95; del buf95  # reuse
        buf99 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf100 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf102 = reinterpret_tensor(buf100, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf100  # reuse
        # Topologically Sorted Source Nodes: [x_44, x_45], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf96, buf102, primals_43, buf99, 512, 256, grid=grid(512), stream=stream0)
        del primals_43
        buf97 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_45], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_44, buf97, 512, grid=grid(512), stream=stream0)
        del primals_44
        buf98 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_45], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_45, buf98, 512, grid=grid(512), stream=stream0)
        del primals_45
        buf103 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_46, x_47, x_48], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d]
        triton_poi_fused_add_reflection_pad2d_relu_12.run(buf93, buf96, buf99, buf102, buf97, buf98, buf103, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_49], Original ATen: [aten.convolution]
        buf104 = extern_kernels.convolution(buf103, primals_46, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf104, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf106 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf107 = empty_strided_cuda((512, ), (1, ), torch.float32)
        buf105 = buf104; del buf104  # reuse
        buf108 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf109 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf111 = reinterpret_tensor(buf109, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf109  # reuse
        buf112 = buf93; del buf93  # reuse
        # Topologically Sorted Source Nodes: [x_49, x_50, x_51], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.relu]
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10.run(buf105, buf111, primals_48, primals_49, primals_47, buf106, buf107, buf108, buf112, 512, 256, grid=grid(512), stream=stream0)
        del primals_47
        del primals_48
        del primals_49
        buf113 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_52], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_11.run(buf112, buf113, 165888, grid=grid(165888), stream=stream0)
        # Topologically Sorted Source Nodes: [x_53], Original ATen: [aten.convolution]
        buf114 = extern_kernels.convolution(buf113, primals_50, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf114, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf115 = buf114; del buf114  # reuse
        buf118 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.float32)
        buf119 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512), torch.float32)
        buf121 = reinterpret_tensor(buf119, (1, 512, 1, 1), (512, 1, 1, 1), 0); del buf119  # reuse
        # Topologically Sorted Source Nodes: [x_53, x_54], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_7.run(buf115, buf121, primals_51, buf118, 512, 256, grid=grid(512), stream=stream0)
        del primals_51
        buf116 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_54], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_52, buf116, 512, grid=grid(512), stream=stream0)
        del primals_52
        buf117 = empty_strided_cuda((512, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_54], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_8.run(primals_53, buf117, 512, grid=grid(512), stream=stream0)
        del primals_53
        buf122 = empty_strided_cuda((32, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_58], Original ATen: [aten.arange]
        triton_poi_fused_arange_13.run(buf122, 32, grid=grid(32), stream=stream0)
        buf123 = empty_strided_cuda((32, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_58], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
        triton_poi_fused__to_copy_add_arange_mul_14.run(buf123, 32, grid=grid(32), stream=stream0)
        buf124 = empty_strided_cuda((4, 128, 34, 32), (139264, 1088, 32, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_55, x_56, x_57, x_58, x_59], Original ATen: [aten.relu, aten.add, aten.reflection_pad2d, aten._unsafe_index]
        triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15.run(buf123, buf112, buf115, buf118, buf121, buf116, buf117, buf124, 557056, grid=grid(557056), stream=stream0)
        del buf112
        buf125 = empty_strided_cuda((4, 128, 34, 34), (147968, 1156, 34, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_59], Original ATen: [aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_16.run(buf124, buf125, 591872, grid=grid(591872), stream=stream0)
        del buf124
        # Topologically Sorted Source Nodes: [x_60], Original ATen: [aten.convolution]
        buf126 = extern_kernels.convolution(buf125, primals_54, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf126, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf127 = buf126; del buf126  # reuse
        buf130 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 1, 1), torch.float32)
        buf131 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256), torch.float32)
        buf133 = reinterpret_tensor(buf131, (1, 256, 1, 1), (256, 1, 1, 1), 0); del buf131  # reuse
        # Topologically Sorted Source Nodes: [x_60, x_61], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_per_fused__native_batch_norm_legit_convolution_17.run(buf127, buf133, primals_55, buf130, 256, 1024, grid=grid(256), stream=stream0)
        del primals_55
        buf128 = empty_strided_cuda((256, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_61], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_5.run(primals_56, buf128, 256, grid=grid(256), stream=stream0)
        del primals_56
        buf129 = empty_strided_cuda((256, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_61], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_5.run(primals_57, buf129, 256, grid=grid(256), stream=stream0)
        del primals_57
        buf134 = empty_strided_cuda((64, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_64], Original ATen: [aten.arange]
        triton_poi_fused_arange_18.run(buf134, 64, grid=grid(64), stream=stream0)
        buf135 = empty_strided_cuda((64, ), (1, ), torch.int64)
        # Topologically Sorted Source Nodes: [x_64], Original ATen: [aten.arange, aten.add, aten.mul, aten._to_copy]
        triton_poi_fused__to_copy_add_arange_mul_19.run(buf135, 64, grid=grid(64), stream=stream0)
        buf136 = empty_strided_cuda((4, 64, 66, 66), (278784, 4356, 66, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_62, x_63, x_64, x_65], Original ATen: [aten.relu, aten.reflection_pad2d, aten._unsafe_index]
        triton_poi_fused__unsafe_index_reflection_pad2d_relu_20.run(buf135, buf127, buf130, buf133, buf128, buf129, buf136, 1115136, grid=grid(1115136), stream=stream0)
        # Topologically Sorted Source Nodes: [x_66], Original ATen: [aten.convolution]
        buf137 = extern_kernels.convolution(buf136, primals_58, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf137, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf138 = buf137; del buf137  # reuse
        buf141 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        buf142 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch.float32)
        buf144 = reinterpret_tensor(buf142, (1, 128, 1, 1), (128, 1, 1, 1), 0); del buf142  # reuse
        # Topologically Sorted Source Nodes: [x_66, x_67], Original ATen: [aten.convolution, aten._native_batch_norm_legit]
        triton_red_fused__native_batch_norm_legit_convolution_21.run(buf138, buf144, primals_59, buf141, 128, 4096, grid=grid(128), stream=stream0)
        del primals_59
        buf139 = empty_strided_cuda((128, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_67], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_2.run(primals_60, buf139, 128, grid=grid(128), stream=stream0)
        del primals_60
        buf140 = empty_strided_cuda((128, ), (1, ), torch.float32)
        # Topologically Sorted Source Nodes: [x_67], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_2.run(primals_61, buf140, 128, grid=grid(128), stream=stream0)
        del primals_61
        buf145 = empty_strided_cuda((4, 32, 72, 72), (165888, 5184, 72, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_68, x_69], Original ATen: [aten.relu, aten.reflection_pad2d]
        triton_poi_fused_reflection_pad2d_relu_22.run(buf138, buf141, buf144, buf139, buf140, buf145, 663552, grid=grid(663552), stream=stream0)
        # Topologically Sorted Source Nodes: [x_70], Original ATen: [aten.convolution]
        buf146 = extern_kernels.convolution(buf145, primals_62, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf146, (4, 3, 64, 64), (12288, 4096, 64, 1))
        buf148 = empty_strided_cuda((12, ), (1, ), torch.float32)
        buf147 = buf146; del buf146  # reuse
        buf149 = empty_strided_cuda((1, 12, 1, 1), (12, 1, 12, 12), torch.float32)
        buf153 = empty_strided_cuda((4, 3, 64, 64), (12288, 4096, 64, 1), torch.float32)
        buf152 = empty_strided_cuda((1, 12, 1, 1), (12, 1, 12, 12), torch.float32)
        # Topologically Sorted Source Nodes: [x_70, x_71, x_72], Original ATen: [aten.convolution, aten.repeat, aten._native_batch_norm_legit, aten.sigmoid]
        triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23.run(buf147, primals_64, primals_63, primals_65, buf148, buf149, buf153, buf152, 12, 4096, grid=grid(12), stream=stream0)
        del primals_63
        del primals_64
        del primals_65
    return (buf153, primals_2, primals_6, primals_10, primals_14, primals_18, primals_22, primals_26, primals_30, primals_34, primals_38, primals_42, primals_46, primals_50, primals_54, primals_58, primals_62, buf0, buf2, buf3, buf4, buf5, buf8, buf9, buf11, buf12, buf13, buf14, buf17, buf18, buf20, buf21, buf22, buf23, buf26, buf27, buf29, buf30, buf31, buf32, buf35, buf37, buf39, buf40, buf41, buf42, buf45, buf46, buf48, buf49, buf50, buf51, buf54, buf56, buf58, buf59, buf60, buf61, buf64, buf65, buf67, buf68, buf69, buf70, buf73, buf75, buf77, buf78, buf79, buf80, buf83, buf84, buf86, buf87, buf88, buf89, buf92, buf94, buf96, buf97, buf98, buf99, buf102, buf103, buf105, buf106, buf107, buf108, buf111, buf113, buf115, buf116, buf117, buf118, buf121, buf122, buf123, buf125, buf127, buf128, buf129, buf130, buf133, buf134, buf135, buf136, buf138, buf139, buf140, buf141, buf144, buf145, buf147, buf148, reinterpret_tensor(buf152, (12, ), (1, ), 0), buf153, reinterpret_tensor(buf149, (1, 12, 1, 1), (12, 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, 3, 64, 64), (12288, 4096, 64, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((32, 3, 9, 9), (243, 81, 9, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((64, 32, 3, 3), (288, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((128, 64, 3, 3), (576, 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((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_21 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_22 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_23 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_24 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_25 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_26 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_27 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_28 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_29 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_30 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_31 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_32 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_33 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_34 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_35 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_36 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_37 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_38 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_39 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_40 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_41 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_42 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_43 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_44 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_45 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_46 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_47 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_48 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_49 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_50 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_51 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_52 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_53 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_54 = rand_strided((64, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_55 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_56 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_57 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_58 = rand_strided((32, 64, 3, 3), (576, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_59 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_60 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_61 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_62 = rand_strided((3, 32, 9, 9), (2592, 81, 9, 1), device='cuda:0', dtype=torch.float32)
    primals_63 = rand_strided((3, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_64 = rand_strided((3, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_65 = rand_strided((3, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26, primals_27, primals_28, primals_29, primals_30, primals_31, primals_32, primals_33, primals_34, primals_35, primals_36, primals_37, primals_38, primals_39, primals_40, primals_41, primals_42, primals_43, primals_44, primals_45, primals_46, primals_47, primals_48, primals_49, primals_50, primals_51, primals_52, primals_53, primals_54, primals_55, primals_56, primals_57, primals_58, primals_59, primals_60, primals_61, primals_62, primals_63, primals_64, primals_65])
    return print_performance(fn, times=times, repeat=repeat)


if __name__ == "__main__":
    from torch._inductor.wrapper_benchmark import compiled_module_main
    compiled_module_main('None', benchmark_compiled_module)

import torch
import torch.nn as nn


class GenericLayer(nn.Module):

    def __init__(self, layer, out_channels, padding=(0, 0, 0, 0),
        activation=None):
        super(GenericLayer, self).__init__()
        self._act = activation
        self._layer = layer
        self._norm = nn.InstanceNorm2d(out_channels, affine=True)
        self._pad = nn.ReflectionPad2d(padding)

    def forward(self, x):
        x = self._pad(x)
        x = self._layer(x)
        x = self._norm(x)
        if self._act is not None:
            x = self._act(x)
        return x


class ResidualBlock(nn.Module):

    def __init__(self, channels, kernel_size, stride, padding=(0, 0, 0, 0)):
        super(ResidualBlock, self).__init__()
        self._conv_1 = GenericLayer(nn.Conv2d(128, 128, 3, 1), 128, (1, 1, 
            1, 1), nn.ReLU())
        self._conv_2 = GenericLayer(nn.Conv2d(128, 128, 3, 1), 128, (1, 1, 
            1, 1), nn.ReLU())

    def forward(self, x):
        x = self._conv_1(x)
        x = x + self._conv_2(x)
        return x


class UpsampleConvLayer(nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size, stride,
        scale_factor):
        super(UpsampleConvLayer, self).__init__()
        self._scale_factor = scale_factor
        self._reflection_pad = nn.ReflectionPad2d(kernel_size // 2)
        self._conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride)

    def forward(self, x):
        x = nn.functional.interpolate(x, mode='nearest', scale_factor=self.
            _scale_factor)
        x = self._reflection_pad(x)
        x = self._conv(x)
        return x


class TransferNet(nn.Module):

    def __init__(self):
        super(TransferNet, self).__init__()
        self._conv_1 = GenericLayer(nn.Conv2d(3, 32, 9, 1), 32, (5, 5, 5, 5
            ), nn.ReLU())
        self._conv_2 = GenericLayer(nn.Conv2d(32, 64, 3, 2), 64, (1, 0, 1, 
            0), nn.ReLU())
        self._conv_3 = GenericLayer(nn.Conv2d(64, 128, 3, 2), 128, (1, 0, 1,
            0), nn.ReLU())
        self._res_1 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_2 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_3 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_4 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_5 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._conv_4 = GenericLayer(UpsampleConvLayer(128, 64, 3, 1, 2), 64,
            (0, 0, 0, 0), nn.ReLU())
        self._conv_5 = GenericLayer(UpsampleConvLayer(64, 32, 3, 1, 2), 32,
            (0, 0, 0, 0), nn.ReLU())
        self._conv_6 = GenericLayer(nn.Conv2d(32, 3, 9, 1), 3, (4, 4, 4, 4),
            nn.Sigmoid())

    def forward(self, x):
        x = self._conv_1(x)
        x = self._conv_2(x)
        x = self._conv_3(x)
        x = self._res_1(x)
        x = self._res_2(x)
        x = self._res_3(x)
        x = self._res_4(x)
        x = self._res_5(x)
        x = self._conv_4(x)
        x = self._conv_5(x)
        x = self._conv_6(x)
        return x


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


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
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_reflection_pad2d_0(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 65712
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 74
    x1 = xindex // 74 % 74
    x2 = xindex // 5476
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-5 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-5 + x1)) + 4096 * x2),
        xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_1(in_out_ptr0,
    in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr,
    RBLOCK: tl.constexpr):
    xnumel = 128
    rnumel = 4356
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 32
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + 4356 * x3), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + 4356 * x3), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6_tmp[:, None]
    tl.store(out_ptr0 + x3, tmp4, xmask)
    tmp7 = 4356.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x3, tmp11, xmask)


@triton.jit
def triton_poi_fused_repeat_2(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0 % 32, xmask)
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_reflection_pad2d_relu_3(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 574592
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 67
    x1 = xindex // 67 % 67
    x2 = xindex // 4489
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4355 + -1 * tl_math.abs(-65 + tl_math.abs(-1 +
        x0)) + -66 * tl_math.abs(-65 + tl_math.abs(-1 + x1)) + 4356 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x2, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x2, xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + x2, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_4(in_out_ptr0,
    in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr,
    RBLOCK: tl.constexpr):
    xnumel = 256
    rnumel = 1089
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 64
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + 1089 * x3), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + 1089 * x3), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6_tmp[:, None]
    tl.store(out_ptr0 + x3, tmp4, xmask)
    tmp7 = 1089.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x3, tmp11, xmask)


@triton.jit
def triton_poi_fused_repeat_5(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0 % 64, xmask)
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_reflection_pad2d_relu_6(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, 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 + (1088 + -1 * tl_math.abs(-32 + tl_math.abs(-1 +
        x0)) + -33 * tl_math.abs(-32 + tl_math.abs(-1 + x1)) + 1089 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x2, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x2, xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + x2, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + x3, tmp10, xmask)


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_7(in_out_ptr0,
    in_out_ptr1, in_ptr0, out_ptr0, 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 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp5 = tl.broadcast_to(tmp3, [RBLOCK])
    tmp7 = triton_helpers.promote_to_tensor(tl.sum(tmp5, 0))
    tmp8 = tl.full([1], 256, tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = tmp3 - tmp10
    tmp12 = tmp11 * tmp11
    tmp13 = tl.broadcast_to(tmp12, [RBLOCK])
    tmp15 = triton_helpers.promote_to_tensor(tl.sum(tmp13, 0))
    tmp16 = 256.0
    tmp17 = tmp15 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.store(in_out_ptr0 + (r2 + 256 * x3), tmp2, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x3, tmp20, None)
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_poi_fused_repeat_8(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0 % 128, xmask)
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_reflection_pad2d_relu_9(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, 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')
    tmp1 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x2, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10(
    in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1,
    out_ptr2, out_ptr3, xnumel, rnumel):
    XBLOCK: tl.constexpr = 1
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    tl.full([RBLOCK], True, tl.int1)
    x0 = xindex
    r3 = rindex
    x1 = xindex % 128
    tmp0 = tl.load(in_ptr0 + x0 % 128, None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x0 % 128, None, eviction_policy='evict_last')
    tmp2 = tl.load(in_out_ptr0 + (r3 + 256 * x0), None)
    tmp3 = tl.load(in_ptr2 + x1, None, eviction_policy='evict_last')
    tmp4 = tmp2 + tmp3
    tmp5 = tl.broadcast_to(tmp4, [RBLOCK])
    tmp7 = tl.broadcast_to(tmp5, [RBLOCK])
    tmp9 = triton_helpers.promote_to_tensor(tl.sum(tmp7, 0))
    tmp10 = tl.full([1], 256, tl.int32)
    tmp11 = tmp10.to(tl.float32)
    tmp12 = tmp9 / tmp11
    tmp13 = tmp5 - tmp12
    tmp14 = tmp13 * tmp13
    tmp15 = tl.broadcast_to(tmp14, [RBLOCK])
    tmp17 = triton_helpers.promote_to_tensor(tl.sum(tmp15, 0))
    tmp18 = 256.0
    tmp19 = tmp17 / tmp18
    tmp20 = 1e-05
    tmp21 = tmp19 + tmp20
    tmp22 = libdevice.rsqrt(tmp21)
    tmp23 = tmp4 - tmp12
    tmp24 = tmp23 * tmp22
    tmp25 = tmp24 * tmp0
    tmp26 = tmp25 + tmp1
    tmp27 = tl.full([1], 0, tl.int32)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tl.store(out_ptr0 + x0, tmp0, None)
    tl.store(out_ptr1 + x0, tmp1, None)
    tl.store(in_out_ptr0 + (r3 + 256 * x0), tmp4, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x0, tmp22, None)
    tl.store(out_ptr3 + (r3 + 256 * x0), tmp28, None)
    tl.store(out_ptr2 + x0, tmp12, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_11(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_poi_fused_add_reflection_pad2d_relu_12(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    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')
    tmp1 = tl.load(in_ptr1 + (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')
    tmp2 = tl.load(in_ptr2 + x2, None, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp8 = tl.load(in_ptr5 + x2, None, eviction_policy='evict_last')
    tmp3 = tmp1 - tmp2
    tmp5 = tmp3 * tmp4
    tmp7 = tmp5 * tmp6
    tmp9 = tmp7 + tmp8
    tmp10 = tl.full([1], 0, tl.int32)
    tmp11 = triton_helpers.maximum(tmp10, tmp9)
    tmp12 = tmp0 + tmp11
    tl.store(out_ptr0 + x3, tmp12, None)


@triton.jit
def triton_poi_fused_arange_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
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_arange_mul_14(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.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp4, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 32 % 34
    x0 = xindex % 32
    x2 = xindex // 1088
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (31 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x1))), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp13 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr5 + x2, None, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr6 + x2, 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_ptr1 + (255 + -1 * tl_math.abs(-15 + tmp8) + -16 *
        tl_math.abs(-15 + tmp4) + 256 * x2), None, eviction_policy='evict_last'
        )
    tmp10 = tl.load(in_ptr2 + (255 + -1 * tl_math.abs(-15 + tmp8) + -16 *
        tl_math.abs(-15 + tmp4) + 256 * x2), None, eviction_policy='evict_last'
        )
    tmp12 = tmp10 - tmp11
    tmp14 = tmp12 * tmp13
    tmp16 = tmp14 * tmp15
    tmp18 = tmp16 + tmp17
    tmp19 = tl.full([1], 0, tl.int32)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp21 = tmp9 + tmp20
    tl.store(out_ptr0 + x4, tmp21, None)


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


@triton.jit
def triton_per_fused__native_batch_norm_legit_convolution_17(in_out_ptr0,
    in_out_ptr1, in_ptr0, out_ptr0, 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 = tl.broadcast_to(tmp2, [RBLOCK])
    tmp5 = tl.broadcast_to(tmp3, [RBLOCK])
    tmp7 = triton_helpers.promote_to_tensor(tl.sum(tmp5, 0))
    tmp8 = tl.full([1], 1024, tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = tmp3 - tmp10
    tmp12 = tmp11 * tmp11
    tmp13 = tl.broadcast_to(tmp12, [RBLOCK])
    tmp15 = triton_helpers.promote_to_tensor(tl.sum(tmp13, 0))
    tmp16 = 1024.0
    tmp17 = tmp15 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.store(in_out_ptr0 + (r2 + 1024 * x3), tmp2, None)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x3, tmp20, None)
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_poi_fused_arange_18(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + x0, tmp0, xmask)


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


@triton.jit
def triton_poi_fused__unsafe_index_reflection_pad2d_relu_20(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 1115136
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 66 % 66
    x0 = xindex % 66
    x2 = xindex // 4356
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x1))), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0))), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr2 + x2, xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr3 + x2, xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr4 + x2, xmask, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr5 + x2, xmask, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 32, 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_ptr1 + (1023 + -1 * tl_math.abs(-31 + tmp8) + -32 *
        tl_math.abs(-31 + tmp4) + 1024 * x2), xmask, eviction_policy=
        'evict_last')
    tmp11 = tmp9 - tmp10
    tmp13 = tmp11 * tmp12
    tmp15 = tmp13 * tmp14
    tmp17 = tmp15 + tmp16
    tmp18 = tl.full([1], 0, tl.int32)
    tmp19 = triton_helpers.maximum(tmp18, tmp17)
    tl.store(out_ptr0 + x5, tmp19, xmask)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_21(in_out_ptr0,
    in_out_ptr1, in_ptr0, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr,
    RBLOCK: tl.constexpr):
    xnumel = 128
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x3 = xindex
    x0 = xindex % 32
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp4_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp4_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = tl.load(in_out_ptr0 + (r2 + 4096 * x3), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp2 = tmp0 + tmp1
        tmp3 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
        tmp4_mean_next, tmp4_m2_next, tmp4_weight_next = (triton_helpers.
            welford_reduce(tmp3, tmp4_mean, tmp4_m2, tmp4_weight, roffset == 0)
            )
        tmp4_mean = tl.where(rmask & xmask, tmp4_mean_next, tmp4_mean)
        tmp4_m2 = tl.where(rmask & xmask, tmp4_m2_next, tmp4_m2)
        tmp4_weight = tl.where(rmask & xmask, tmp4_weight_next, tmp4_weight)
        tl.store(in_out_ptr0 + (r2 + 4096 * x3), tmp2, rmask & xmask)
    tmp4_tmp, tmp5_tmp, tmp6_tmp = triton_helpers.welford(tmp4_mean,
        tmp4_m2, tmp4_weight, 1)
    tmp4 = tmp4_tmp[:, None]
    tmp5 = tmp5_tmp[:, None]
    tmp6_tmp[:, None]
    tl.store(out_ptr0 + x3, tmp4, xmask)
    tmp7 = 4096.0
    tmp8 = tmp5 / tmp7
    tmp9 = 1e-05
    tmp10 = tmp8 + tmp9
    tmp11 = libdevice.rsqrt(tmp10)
    tl.debug_barrier()
    tl.store(in_out_ptr1 + x3, tmp11, xmask)


@triton.jit
def triton_poi_fused_reflection_pad2d_relu_22(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, in_ptr4, 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 % 72
    x1 = xindex // 72 % 72
    x2 = xindex // 5184
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-4 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-4 + x1)) + 4096 * x2),
        None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x2, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + x2, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full([1], 0, tl.int32)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23(
    in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, out_ptr3,
    out_ptr4, xnumel, rnumel, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 12
    rnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0 % 3, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)
    x1 = xindex % 3
    tmp2 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp5_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp5_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp5_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp1 = tl.load(in_out_ptr0 + (r3 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_last', other=0.0)
        tmp3 = tmp1 + tmp2
        tmp4 = tl.broadcast_to(tmp3, [XBLOCK, RBLOCK])
        tmp5_mean_next, tmp5_m2_next, tmp5_weight_next = (triton_helpers.
            welford_reduce(tmp4, tmp5_mean, tmp5_m2, tmp5_weight, roffset == 0)
            )
        tmp5_mean = tl.where(rmask & xmask, tmp5_mean_next, tmp5_mean)
        tmp5_m2 = tl.where(rmask & xmask, tmp5_m2_next, tmp5_m2)
        tmp5_weight = tl.where(rmask & xmask, tmp5_weight_next, tmp5_weight)
        tl.store(in_out_ptr0 + (r3 + 4096 * x0), tmp3, rmask & xmask)
    tmp5_tmp, tmp6_tmp, tmp7_tmp = triton_helpers.welford(tmp5_mean,
        tmp5_m2, tmp5_weight, 1)
    tmp5 = tmp5_tmp[:, None]
    tmp6 = tmp6_tmp[:, None]
    tmp7_tmp[:, None]
    tl.store(out_ptr1 + x0, tmp5, xmask)
    tmp17 = tl.load(in_ptr2 + x1, xmask, eviction_policy='evict_last')
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r3 = rindex
        tmp8 = tl.load(in_out_ptr0 + (r3 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp9 = tmp8 - tmp5
        tmp10 = 4096.0
        tmp11 = tmp6 / tmp10
        tmp12 = 1e-05
        tmp13 = tmp11 + tmp12
        tmp14 = libdevice.rsqrt(tmp13)
        tmp15 = tmp9 * tmp14
        tmp16 = tmp15 * tmp0
        tmp18 = tmp16 + tmp17
        tmp19 = tl.sigmoid(tmp18)
        tl.store(out_ptr3 + (r3 + 4096 * x0), tmp19, rmask & xmask)
    tmp20 = 4096.0
    tmp21 = tmp6 / tmp20
    tmp22 = 1e-05
    tmp23 = tmp21 + tmp22
    tmp24 = libdevice.rsqrt(tmp23)
    tl.store(out_ptr4 + x0, tmp24, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30, primals_31, primals_32,
        primals_33, primals_34, primals_35, primals_36, primals_37,
        primals_38, primals_39, primals_40, primals_41, primals_42,
        primals_43, primals_44, primals_45, primals_46, primals_47,
        primals_48, primals_49, primals_50, primals_51, primals_52,
        primals_53, primals_54, primals_55, primals_56, primals_57,
        primals_58, primals_59, primals_60, primals_61, primals_62,
        primals_63, primals_64, primals_65) = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_2, (32, 3, 9, 9), (243, 81, 9, 1))
    assert_size_stride(primals_3, (32,), (1,))
    assert_size_stride(primals_4, (32,), (1,))
    assert_size_stride(primals_5, (32,), (1,))
    assert_size_stride(primals_6, (64, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_7, (64,), (1,))
    assert_size_stride(primals_8, (64,), (1,))
    assert_size_stride(primals_9, (64,), (1,))
    assert_size_stride(primals_10, (128, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_11, (128,), (1,))
    assert_size_stride(primals_12, (128,), (1,))
    assert_size_stride(primals_13, (128,), (1,))
    assert_size_stride(primals_14, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_15, (128,), (1,))
    assert_size_stride(primals_16, (128,), (1,))
    assert_size_stride(primals_17, (128,), (1,))
    assert_size_stride(primals_18, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_19, (128,), (1,))
    assert_size_stride(primals_20, (128,), (1,))
    assert_size_stride(primals_21, (128,), (1,))
    assert_size_stride(primals_22, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_23, (128,), (1,))
    assert_size_stride(primals_24, (128,), (1,))
    assert_size_stride(primals_25, (128,), (1,))
    assert_size_stride(primals_26, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_27, (128,), (1,))
    assert_size_stride(primals_28, (128,), (1,))
    assert_size_stride(primals_29, (128,), (1,))
    assert_size_stride(primals_30, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_31, (128,), (1,))
    assert_size_stride(primals_32, (128,), (1,))
    assert_size_stride(primals_33, (128,), (1,))
    assert_size_stride(primals_34, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_35, (128,), (1,))
    assert_size_stride(primals_36, (128,), (1,))
    assert_size_stride(primals_37, (128,), (1,))
    assert_size_stride(primals_38, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_39, (128,), (1,))
    assert_size_stride(primals_40, (128,), (1,))
    assert_size_stride(primals_41, (128,), (1,))
    assert_size_stride(primals_42, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_43, (128,), (1,))
    assert_size_stride(primals_44, (128,), (1,))
    assert_size_stride(primals_45, (128,), (1,))
    assert_size_stride(primals_46, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_47, (128,), (1,))
    assert_size_stride(primals_48, (128,), (1,))
    assert_size_stride(primals_49, (128,), (1,))
    assert_size_stride(primals_50, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_51, (128,), (1,))
    assert_size_stride(primals_52, (128,), (1,))
    assert_size_stride(primals_53, (128,), (1,))
    assert_size_stride(primals_54, (64, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_55, (64,), (1,))
    assert_size_stride(primals_56, (64,), (1,))
    assert_size_stride(primals_57, (64,), (1,))
    assert_size_stride(primals_58, (32, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_59, (32,), (1,))
    assert_size_stride(primals_60, (32,), (1,))
    assert_size_stride(primals_61, (32,), (1,))
    assert_size_stride(primals_62, (3, 32, 9, 9), (2592, 81, 9, 1))
    assert_size_stride(primals_63, (3,), (1,))
    assert_size_stride(primals_64, (3,), (1,))
    assert_size_stride(primals_65, (3,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 3, 74, 74), (16428, 5476, 74, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_reflection_pad2d_0[grid(65712)](primals_1, buf0, 
            65712, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_1
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 32, 66, 66), (139392, 4356, 66, 1))
        buf2 = buf1
        del buf1
        buf5 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.float32
            )
        buf6 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128), torch
            .float32)
        buf8 = reinterpret_tensor(buf6, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf6
        triton_red_fused__native_batch_norm_legit_convolution_1[grid(128)](buf2
            , buf8, primals_3, buf5, 128, 4356, XBLOCK=1, RBLOCK=2048,
            num_warps=16, num_stages=1)
        del primals_3
        buf3 = empty_strided_cuda((128,), (1,), torch.float32)
        triton_poi_fused_repeat_2[grid(128)](primals_4, buf3, 128, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_4
        buf4 = empty_strided_cuda((128,), (1,), torch.float32)
        triton_poi_fused_repeat_2[grid(128)](primals_5, buf4, 128, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_5
        buf9 = empty_strided_cuda((4, 32, 67, 67), (143648, 4489, 67, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_relu_3[grid(574592)](buf2, buf5,
            buf8, buf3, buf4, buf9, 574592, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf10 = extern_kernels.convolution(buf9, primals_6, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf10, (4, 64, 33, 33), (69696, 1089, 33, 1))
        buf11 = buf10
        del buf10
        buf14 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 1, 1), torch.
            float32)
        buf15 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf17 = reinterpret_tensor(buf15, (1, 256, 1, 1), (256, 1, 1, 1), 0)
        del buf15
        triton_red_fused__native_batch_norm_legit_convolution_4[grid(256)](
            buf11, buf17, primals_7, buf14, 256, 1089, XBLOCK=1, RBLOCK=
            2048, num_warps=16, num_stages=1)
        del primals_7
        buf12 = empty_strided_cuda((256,), (1,), torch.float32)
        triton_poi_fused_repeat_5[grid(256)](primals_8, buf12, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del primals_8
        buf13 = empty_strided_cuda((256,), (1,), torch.float32)
        triton_poi_fused_repeat_5[grid(256)](primals_9, buf13, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del primals_9
        buf18 = empty_strided_cuda((4, 64, 34, 34), (73984, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_relu_6[grid(295936)](buf11, buf14,
            buf17, buf12, buf13, buf18, 295936, XBLOCK=1024, num_warps=4,
            num_stages=1)
        buf19 = extern_kernels.convolution(buf18, primals_10, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf19, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf20 = buf19
        del buf19
        buf23 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf24 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf26 = reinterpret_tensor(buf24, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf24
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf20, buf26, primals_11, buf23, 512, 256, num_warps=2,
            num_stages=1)
        del primals_11
        buf21 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_12, buf21, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_12
        buf22 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_13, buf22, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_13
        buf27 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_relu_9[grid(165888)](buf20, buf23,
            buf26, buf21, buf22, buf27, 165888, XBLOCK=512, num_warps=8,
            num_stages=1)
        buf28 = extern_kernels.convolution(buf27, primals_14, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf28, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf30 = empty_strided_cuda((512,), (1,), torch.float32)
        buf31 = empty_strided_cuda((512,), (1,), torch.float32)
        buf29 = buf28
        del buf28
        buf32 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf33 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf35 = reinterpret_tensor(buf33, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf33
        buf36 = empty_strided_cuda((4, 128, 16, 16), (32768, 256, 16, 1),
            torch.float32)
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10[
            grid(512)](buf29, buf35, primals_16, primals_17, primals_15,
            buf30, buf31, buf32, buf36, 512, 256, num_warps=2, num_stages=1)
        del primals_15
        del primals_16
        del primals_17
        buf37 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_11[grid(165888)](buf36, buf37, 
            165888, XBLOCK=512, num_warps=8, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_18, 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
        buf42 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf43 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf45 = reinterpret_tensor(buf43, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf43
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf39, buf45, primals_19, buf42, 512, 256, num_warps=2,
            num_stages=1)
        del primals_19
        buf40 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_20, buf40, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_20
        buf41 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_21, buf41, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_21
        buf46 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_add_reflection_pad2d_relu_12[grid(165888)](buf36,
            buf39, buf42, buf45, buf40, buf41, buf46, 165888, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf47 = extern_kernels.convolution(buf46, primals_22, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf47, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf49 = empty_strided_cuda((512,), (1,), torch.float32)
        buf50 = empty_strided_cuda((512,), (1,), torch.float32)
        buf48 = buf47
        del buf47
        buf51 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf52 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf54 = reinterpret_tensor(buf52, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf52
        buf55 = buf36
        del buf36
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10[
            grid(512)](buf48, buf54, primals_24, primals_25, primals_23,
            buf49, buf50, buf51, buf55, 512, 256, num_warps=2, num_stages=1)
        del primals_23
        del primals_24
        del primals_25
        buf56 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_11[grid(165888)](buf55, buf56, 
            165888, XBLOCK=512, num_warps=8, num_stages=1)
        buf57 = extern_kernels.convolution(buf56, primals_26, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf57, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf58 = buf57
        del buf57
        buf61 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf62 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf64 = reinterpret_tensor(buf62, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf62
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf58, buf64, primals_27, buf61, 512, 256, num_warps=2,
            num_stages=1)
        del primals_27
        buf59 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_28, buf59, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_28
        buf60 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_29, buf60, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_29
        buf65 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_add_reflection_pad2d_relu_12[grid(165888)](buf55,
            buf58, buf61, buf64, buf59, buf60, buf65, 165888, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf66 = extern_kernels.convolution(buf65, primals_30, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf66, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf68 = empty_strided_cuda((512,), (1,), torch.float32)
        buf69 = empty_strided_cuda((512,), (1,), torch.float32)
        buf67 = buf66
        del buf66
        buf70 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf71 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf73 = reinterpret_tensor(buf71, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf71
        buf74 = buf55
        del buf55
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10[
            grid(512)](buf67, buf73, primals_32, primals_33, primals_31,
            buf68, buf69, buf70, buf74, 512, 256, num_warps=2, num_stages=1)
        del primals_31
        del primals_32
        del primals_33
        buf75 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_11[grid(165888)](buf74, buf75, 
            165888, XBLOCK=512, num_warps=8, num_stages=1)
        buf76 = extern_kernels.convolution(buf75, primals_34, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf76, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf77 = buf76
        del buf76
        buf80 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf81 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf83 = reinterpret_tensor(buf81, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf81
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf77, buf83, primals_35, buf80, 512, 256, num_warps=2,
            num_stages=1)
        del primals_35
        buf78 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_36, buf78, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_36
        buf79 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_37, buf79, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_37
        buf84 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_add_reflection_pad2d_relu_12[grid(165888)](buf74,
            buf77, buf80, buf83, buf78, buf79, buf84, 165888, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf85 = extern_kernels.convolution(buf84, primals_38, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf85, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf87 = empty_strided_cuda((512,), (1,), torch.float32)
        buf88 = empty_strided_cuda((512,), (1,), torch.float32)
        buf86 = buf85
        del buf85
        buf89 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf90 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf92 = reinterpret_tensor(buf90, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf90
        buf93 = buf74
        del buf74
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10[
            grid(512)](buf86, buf92, primals_40, primals_41, primals_39,
            buf87, buf88, buf89, buf93, 512, 256, num_warps=2, num_stages=1)
        del primals_39
        del primals_40
        del primals_41
        buf94 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_11[grid(165888)](buf93, buf94, 
            165888, XBLOCK=512, num_warps=8, num_stages=1)
        buf95 = extern_kernels.convolution(buf94, primals_42, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf95, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf96 = buf95
        del buf95
        buf99 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf100 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf102 = reinterpret_tensor(buf100, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf100
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf96, buf102, primals_43, buf99, 512, 256, num_warps=2,
            num_stages=1)
        del primals_43
        buf97 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_44, buf97, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_44
        buf98 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_45, buf98, 512, XBLOCK
            =256, num_warps=4, num_stages=1)
        del primals_45
        buf103 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_add_reflection_pad2d_relu_12[grid(165888)](buf93,
            buf96, buf99, buf102, buf97, buf98, buf103, 165888, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf104 = extern_kernels.convolution(buf103, primals_46, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf104, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf106 = empty_strided_cuda((512,), (1,), torch.float32)
        buf107 = empty_strided_cuda((512,), (1,), torch.float32)
        buf105 = buf104
        del buf104
        buf108 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf109 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf111 = reinterpret_tensor(buf109, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf109
        buf112 = buf93
        del buf93
        triton_per_fused__native_batch_norm_legit_convolution_relu_repeat_10[
            grid(512)](buf105, buf111, primals_48, primals_49, primals_47,
            buf106, buf107, buf108, buf112, 512, 256, num_warps=2, num_stages=1
            )
        del primals_47
        del primals_48
        del primals_49
        buf113 = empty_strided_cuda((4, 128, 18, 18), (41472, 324, 18, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_11[grid(165888)](buf112, buf113, 
            165888, XBLOCK=512, num_warps=8, num_stages=1)
        buf114 = extern_kernels.convolution(buf113, primals_50, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf114, (4, 128, 16, 16), (32768, 256, 16, 1))
        buf115 = buf114
        del buf114
        buf118 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 1, 1), torch.
            float32)
        buf119 = empty_strided_cuda((1, 512, 1, 1), (512, 1, 512, 512),
            torch.float32)
        buf121 = reinterpret_tensor(buf119, (1, 512, 1, 1), (512, 1, 1, 1), 0)
        del buf119
        triton_per_fused__native_batch_norm_legit_convolution_7[grid(512)](
            buf115, buf121, primals_51, buf118, 512, 256, num_warps=2,
            num_stages=1)
        del primals_51
        buf116 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_52, buf116, 512,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_52
        buf117 = empty_strided_cuda((512,), (1,), torch.float32)
        triton_poi_fused_repeat_8[grid(512)](primals_53, buf117, 512,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_53
        buf122 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused_arange_13[grid(32)](buf122, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf123 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_14[grid(32)](buf123, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf124 = empty_strided_cuda((4, 128, 34, 32), (139264, 1088, 32, 1),
            torch.float32)
        triton_poi_fused__unsafe_index_add_reflection_pad2d_relu_15[grid(
            557056)](buf123, buf112, buf115, buf118, buf121, buf116, buf117,
            buf124, 557056, XBLOCK=1024, num_warps=4, num_stages=1)
        del buf112
        buf125 = empty_strided_cuda((4, 128, 34, 34), (147968, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_16[grid(591872)](buf124, buf125, 
            591872, XBLOCK=512, num_warps=8, num_stages=1)
        del buf124
        buf126 = extern_kernels.convolution(buf125, primals_54, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf126, (4, 64, 32, 32), (65536, 1024, 32, 1))
        buf127 = buf126
        del buf126
        buf130 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 1, 1), torch.
            float32)
        buf131 = empty_strided_cuda((1, 256, 1, 1), (256, 1, 256, 256),
            torch.float32)
        buf133 = reinterpret_tensor(buf131, (1, 256, 1, 1), (256, 1, 1, 1), 0)
        del buf131
        triton_per_fused__native_batch_norm_legit_convolution_17[grid(256)](
            buf127, buf133, primals_55, buf130, 256, 1024, num_warps=8,
            num_stages=1)
        del primals_55
        buf128 = empty_strided_cuda((256,), (1,), torch.float32)
        triton_poi_fused_repeat_5[grid(256)](primals_56, buf128, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_56
        buf129 = empty_strided_cuda((256,), (1,), torch.float32)
        triton_poi_fused_repeat_5[grid(256)](primals_57, buf129, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_57
        buf134 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused_arange_18[grid(64)](buf134, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf135 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused__to_copy_add_arange_mul_19[grid(64)](buf135, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf136 = empty_strided_cuda((4, 64, 66, 66), (278784, 4356, 66, 1),
            torch.float32)
        triton_poi_fused__unsafe_index_reflection_pad2d_relu_20[grid(1115136)](
            buf135, buf127, buf130, buf133, buf128, buf129, buf136, 1115136,
            XBLOCK=512, num_warps=8, num_stages=1)
        buf137 = extern_kernels.convolution(buf136, primals_58, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf137, (4, 32, 64, 64), (131072, 4096, 64, 1))
        buf138 = buf137
        del buf137
        buf141 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        buf142 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 128, 128),
            torch.float32)
        buf144 = reinterpret_tensor(buf142, (1, 128, 1, 1), (128, 1, 1, 1), 0)
        del buf142
        triton_red_fused__native_batch_norm_legit_convolution_21[grid(128)](
            buf138, buf144, primals_59, buf141, 128, 4096, XBLOCK=1, RBLOCK
            =2048, num_warps=16, num_stages=1)
        del primals_59
        buf139 = empty_strided_cuda((128,), (1,), torch.float32)
        triton_poi_fused_repeat_2[grid(128)](primals_60, buf139, 128,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_60
        buf140 = empty_strided_cuda((128,), (1,), torch.float32)
        triton_poi_fused_repeat_2[grid(128)](primals_61, buf140, 128,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_61
        buf145 = empty_strided_cuda((4, 32, 72, 72), (165888, 5184, 72, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_relu_22[grid(663552)](buf138,
            buf141, buf144, buf139, buf140, buf145, 663552, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf146 = extern_kernels.convolution(buf145, primals_62, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf146, (4, 3, 64, 64), (12288, 4096, 64, 1))
        buf148 = empty_strided_cuda((12,), (1,), torch.float32)
        buf147 = buf146
        del buf146
        buf149 = empty_strided_cuda((1, 12, 1, 1), (12, 1, 12, 12), torch.
            float32)
        buf153 = empty_strided_cuda((4, 3, 64, 64), (12288, 4096, 64, 1),
            torch.float32)
        buf152 = empty_strided_cuda((1, 12, 1, 1), (12, 1, 12, 12), torch.
            float32)
        triton_red_fused__native_batch_norm_legit_convolution_repeat_sigmoid_23[
            grid(12)](buf147, primals_64, primals_63, primals_65, buf148,
            buf149, buf153, buf152, 12, 4096, XBLOCK=1, RBLOCK=2048,
            num_warps=16, num_stages=1)
        del primals_63
        del primals_64
        del primals_65
    return (buf153, primals_2, primals_6, primals_10, primals_14,
        primals_18, primals_22, primals_26, primals_30, primals_34,
        primals_38, primals_42, primals_46, primals_50, primals_54,
        primals_58, primals_62, buf0, buf2, buf3, buf4, buf5, buf8, buf9,
        buf11, buf12, buf13, buf14, buf17, buf18, buf20, buf21, buf22,
        buf23, buf26, buf27, buf29, buf30, buf31, buf32, buf35, buf37,
        buf39, buf40, buf41, buf42, buf45, buf46, buf48, buf49, buf50,
        buf51, buf54, buf56, buf58, buf59, buf60, buf61, buf64, buf65,
        buf67, buf68, buf69, buf70, buf73, buf75, buf77, buf78, buf79,
        buf80, buf83, buf84, buf86, buf87, buf88, buf89, buf92, buf94,
        buf96, buf97, buf98, buf99, buf102, buf103, buf105, buf106, buf107,
        buf108, buf111, buf113, buf115, buf116, buf117, buf118, buf121,
        buf122, buf123, buf125, buf127, buf128, buf129, buf130, buf133,
        buf134, buf135, buf136, buf138, buf139, buf140, buf141, buf144,
        buf145, buf147, buf148, reinterpret_tensor(buf152, (12,), (1,), 0),
        buf153, reinterpret_tensor(buf149, (1, 12, 1, 1), (12, 1, 1, 1), 0))


class GenericLayer(nn.Module):

    def __init__(self, layer, out_channels, padding=(0, 0, 0, 0),
        activation=None):
        super(GenericLayer, self).__init__()
        self._act = activation
        self._layer = layer
        self._norm = nn.InstanceNorm2d(out_channels, affine=True)
        self._pad = nn.ReflectionPad2d(padding)

    def forward(self, x):
        x = self._pad(x)
        x = self._layer(x)
        x = self._norm(x)
        if self._act is not None:
            x = self._act(x)
        return x


class ResidualBlock(nn.Module):

    def __init__(self, channels, kernel_size, stride, padding=(0, 0, 0, 0)):
        super(ResidualBlock, self).__init__()
        self._conv_1 = GenericLayer(nn.Conv2d(128, 128, 3, 1), 128, (1, 1, 
            1, 1), nn.ReLU())
        self._conv_2 = GenericLayer(nn.Conv2d(128, 128, 3, 1), 128, (1, 1, 
            1, 1), nn.ReLU())

    def forward(self, x):
        x = self._conv_1(x)
        x = x + self._conv_2(x)
        return x


class UpsampleConvLayer(nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size, stride,
        scale_factor):
        super(UpsampleConvLayer, self).__init__()
        self._scale_factor = scale_factor
        self._reflection_pad = nn.ReflectionPad2d(kernel_size // 2)
        self._conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride)

    def forward(self, x):
        x = nn.functional.interpolate(x, mode='nearest', scale_factor=self.
            _scale_factor)
        x = self._reflection_pad(x)
        x = self._conv(x)
        return x


class TransferNetNew(nn.Module):

    def __init__(self):
        super(TransferNetNew, self).__init__()
        self._conv_1 = GenericLayer(nn.Conv2d(3, 32, 9, 1), 32, (5, 5, 5, 5
            ), nn.ReLU())
        self._conv_2 = GenericLayer(nn.Conv2d(32, 64, 3, 2), 64, (1, 0, 1, 
            0), nn.ReLU())
        self._conv_3 = GenericLayer(nn.Conv2d(64, 128, 3, 2), 128, (1, 0, 1,
            0), nn.ReLU())
        self._res_1 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_2 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_3 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_4 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._res_5 = ResidualBlock(128, 3, 1, (1, 1, 1, 1))
        self._conv_4 = GenericLayer(UpsampleConvLayer(128, 64, 3, 1, 2), 64,
            (0, 0, 0, 0), nn.ReLU())
        self._conv_5 = GenericLayer(UpsampleConvLayer(64, 32, 3, 1, 2), 32,
            (0, 0, 0, 0), nn.ReLU())
        self._conv_6 = GenericLayer(nn.Conv2d(32, 3, 9, 1), 3, (4, 4, 4, 4),
            nn.Sigmoid())

    def forward(self, input_0):
        primals_2 = self._conv_1._layer.weight
        primals_3 = self._conv_1._layer.bias
        primals_4 = self._conv_1._norm.weight
        primals_5 = self._conv_1._norm.bias
        primals_6 = self._conv_2._layer.weight
        primals_7 = self._conv_2._layer.bias
        primals_8 = self._conv_2._norm.weight
        primals_9 = self._conv_2._norm.bias
        primals_10 = self._conv_3._layer.weight
        primals_11 = self._conv_3._layer.bias
        primals_12 = self._conv_3._norm.weight
        primals_13 = self._conv_3._norm.bias
        primals_14 = self._res_1._conv_1._layer.weight
        primals_15 = self._res_1._conv_1._layer.bias
        primals_16 = self._res_1._conv_1._norm.weight
        primals_17 = self._res_1._conv_1._norm.bias
        primals_18 = self._res_1._conv_2._layer.weight
        primals_19 = self._res_1._conv_2._layer.bias
        primals_20 = self._res_1._conv_2._norm.weight
        primals_21 = self._res_1._conv_2._norm.bias
        primals_22 = self._res_2._conv_1._layer.weight
        primals_23 = self._res_2._conv_1._layer.bias
        primals_24 = self._res_2._conv_1._norm.weight
        primals_25 = self._res_2._conv_1._norm.bias
        primals_26 = self._res_2._conv_2._layer.weight
        primals_27 = self._res_2._conv_2._layer.bias
        primals_28 = self._res_2._conv_2._norm.weight
        primals_29 = self._res_2._conv_2._norm.bias
        primals_30 = self._res_3._conv_1._layer.weight
        primals_31 = self._res_3._conv_1._layer.bias
        primals_32 = self._res_3._conv_1._norm.weight
        primals_33 = self._res_3._conv_1._norm.bias
        primals_34 = self._res_3._conv_2._layer.weight
        primals_35 = self._res_3._conv_2._layer.bias
        primals_36 = self._res_3._conv_2._norm.weight
        primals_37 = self._res_3._conv_2._norm.bias
        primals_38 = self._res_4._conv_1._layer.weight
        primals_39 = self._res_4._conv_1._layer.bias
        primals_40 = self._res_4._conv_1._norm.weight
        primals_41 = self._res_4._conv_1._norm.bias
        primals_42 = self._res_4._conv_2._layer.weight
        primals_43 = self._res_4._conv_2._layer.bias
        primals_44 = self._res_4._conv_2._norm.weight
        primals_45 = self._res_4._conv_2._norm.bias
        primals_46 = self._res_5._conv_1._layer.weight
        primals_47 = self._res_5._conv_1._layer.bias
        primals_48 = self._res_5._conv_1._norm.weight
        primals_49 = self._res_5._conv_1._norm.bias
        primals_50 = self._res_5._conv_2._layer.weight
        primals_51 = self._res_5._conv_2._layer.bias
        primals_52 = self._res_5._conv_2._norm.weight
        primals_53 = self._res_5._conv_2._norm.bias
        primals_54 = self._conv_4._layer._conv.weight
        primals_55 = self._conv_4._layer._conv.bias
        primals_56 = self._conv_4._norm.weight
        primals_57 = self._conv_4._norm.bias
        primals_58 = self._conv_5._layer._conv.weight
        primals_59 = self._conv_5._layer._conv.bias
        primals_60 = self._conv_5._norm.weight
        primals_61 = self._conv_5._norm.bias
        primals_62 = self._conv_6._layer.weight
        primals_63 = self._conv_6._layer.bias
        primals_64 = self._conv_6._norm.weight
        primals_65 = self._conv_6._norm.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, primals_26, primals_27, primals_28, primals_29,
            primals_30, primals_31, primals_32, primals_33, primals_34,
            primals_35, primals_36, primals_37, primals_38, primals_39,
            primals_40, primals_41, primals_42, primals_43, primals_44,
            primals_45, primals_46, primals_47, primals_48, primals_49,
            primals_50, primals_51, primals_52, primals_53, primals_54,
            primals_55, primals_56, primals_57, primals_58, primals_59,
            primals_60, primals_61, primals_62, primals_63, primals_64,
            primals_65])
        return output[0]
