# AOT ID: ['18_inference']
from ctypes import c_void_p, c_long
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

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
alloc_from_pool = torch.ops.inductor._alloc_from_pool
reinterpret_tensor = torch.ops.inductor._reinterpret_tensor
async_compile = AsyncCompile()


# kernel path: /tmp/torchinductor_root/g2/cg2dlstotbqjlzkeiqeok6w7wttft3odrbrgnvlmvbwyqs676yi2.py
# Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
# r => convert_element_type, convert_element_type_1, convert_element_type_2, convolution
# relu => relu
triton_poi_fused__to_copy_convolution_relu_0 = async_compile.triton('triton_', '''
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=[16777216], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp16', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_convolution_relu_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = tl.full([1], 0, tl.int32)
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp3 = tmp2.to(tl.float32)
    tl.store(out_ptr0 + (x0), tmp3, xmask)
''', device_str='cuda')

import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid, split_scan_grid, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_raw_stream


# kernel path: /tmp/torchinductor_root/jv/cjvkn36xpm6ptydlc6vncx4hsrtdtoqp3urscmap5yv2c47epk2c.py
# Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
# r => convert_element_type, convert_element_type_1, convert_element_type_2, convolution
# relu => relu
triton_poi_fused__to_copy_convolution_relu_1 = async_compile.triton('triton_', '''
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: '*fp16', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_convolution_relu_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 147456
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), None)
    tmp1 = tmp0.to(tl.float32)
    tl.store(out_ptr0 + (x0), tmp1, None)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/qx/cqxpfv7cmuudq4jif3yzob2xcbc5ep2tsnlv2fniclvolbbhvnvw.py
# Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
# r => convert_element_type, convert_element_type_1, convert_element_type_2, convolution
# relu => relu
triton_poi_fused__to_copy_convolution_relu_2 = async_compile.triton('triton_', '''
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: '*fp16', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_convolution_relu_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(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), xmask)
    tmp1 = tmp0.to(tl.float32)
    tl.store(out_ptr0 + (x0), tmp1, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/jo/cjomhvgnym67cqipvwryy7lyu5bavamzwur5llrb3z35wgiottmr.py
# Source Nodes: [r_1], Original ATen: [aten.native_group_norm]
# r_1 => var_mean
triton_red_fused_native_group_norm_3 = async_compile.triton('triton_', '''
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=[512, 65536],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp16', 1: '*fp16', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32', 7: 'i32', 8: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 7), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused_native_group_norm_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, in_ptr1, out_ptr0, out_ptr1, out_ptr2, ks0, ks1, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 272
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex % 34
    x1 = (xindex // 34)
    tmp18_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp18_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp18_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    x3 = xindex
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = r2 + (x0*((33 + (16*ks0*ks1)) // 34))
        tmp1 = 16*ks0*ks1
        tmp2 = tmp0 < tmp1
        tmp3 = tl.load(in_ptr0 + ((16*ks0*ks1*x1) + ((r2 + (x0*((33 + (16*ks0*ks1)) // 34))) % (16*ks0*ks1))), rmask & tmp2 & xmask, eviction_policy='evict_last', other=0.0).to(tl.float32)
        tmp4 = tl.load(in_ptr1 + ((16*x1) + (((r2 + (x0*((33 + (16*ks0*ks1)) // 34))) // (ks0*ks1)) % 16)), rmask & tmp2 & xmask, eviction_policy='evict_last', other=0.0).to(tl.float32)
        tmp5 = tmp3 + tmp4
        tmp6 = tmp5.to(tl.float32)
        tmp7 = tl.full(tmp6.shape, 0, tmp6.dtype)
        tmp8 = tl.where(tmp2, tmp6, tmp7)
        tmp9 = 0.0
        tmp10 = tl.full(tmp9.shape, 0, tmp9.dtype)
        tmp11 = tl.where(tmp2, tmp9, tmp10)
        tmp12 = 1.0
        tmp13 = tl.full(tmp12.shape, 0, tmp12.dtype)
        tmp14 = tl.where(tmp2, tmp12, tmp13)
        tmp15 = tl.broadcast_to(tmp8, [XBLOCK, RBLOCK])
        tmp16 = tl.broadcast_to(tmp11, [XBLOCK, RBLOCK])
        tmp17 = tl.broadcast_to(tmp14, [XBLOCK, RBLOCK])
        tmp18_mean_next, tmp18_m2_next, tmp18_weight_next = triton_helpers.welford_combine(
            tmp18_mean, tmp18_m2, tmp18_weight,
            tmp15, tmp16, tmp17
        )
        tmp18_mean = tl.where(rmask & xmask, tmp18_mean_next, tmp18_mean)
        tmp18_m2 = tl.where(rmask & xmask, tmp18_m2_next, tmp18_m2)
        tmp18_weight = tl.where(rmask & xmask, tmp18_weight_next, tmp18_weight)
    tmp18_tmp, tmp19_tmp, tmp20_tmp = triton_helpers.welford(
        tmp18_mean, tmp18_m2, tmp18_weight, 1
    )
    tmp18 = tmp18_tmp[:, None]
    tmp19 = tmp19_tmp[:, None]
    tmp20 = tmp20_tmp[:, None]
    tl.store(out_ptr0 + (x3), tmp18, xmask)
    tl.store(out_ptr1 + (x3), tmp19, xmask)
    tl.store(out_ptr2 + (x3), tmp20, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/la/clakhngne6m3sjak4ocga4ldepnpwp4rbhmswzfmpsdtfzjmzjtt.py
# Source Nodes: [r_1], Original ATen: [aten.native_group_norm]
# r_1 => var_mean
triton_per_fused_native_group_norm_4 = async_compile.triton('triton_', '''
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=[8, 64],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused_native_group_norm_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 3, 'num_reduction': 2, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 8
    rnumel = 34
    RBLOCK: tl.constexpr = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (34*x0)), rmask & xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (34*x0)), rmask & xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (34*x0)), rmask & xmask, other=0.0)
    tmp3 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
    tmp4 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp5 = tl.broadcast_to(tmp2, [XBLOCK, RBLOCK])
    tmp7 = tl.where(rmask & xmask, tmp3, 0)
    tmp8 = tl.where(rmask & xmask, tmp4, 0)
    tmp9 = tl.where(rmask & xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tl.store(out_ptr0 + (x0), tmp13, xmask)
    tl.store(out_ptr1 + (x0), tmp14, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/yy/cyy4bumprtccpl5agfju5gw6ywt6cblzixqrezwgu7ab2qwvxj7w.py
# Source Nodes: [r_1, r_2, relu_1], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
# r_1 => add_1, mul_2
# r_2 => convert_element_type_4, convert_element_type_5, convert_element_type_6, convolution_1
# relu_1 => relu_1
triton_poi_fused__to_copy_convolution_native_group_norm_relu_5 = async_compile.triton('triton_', '''
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=[16777216], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp16', 1: '*fp16', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: 'i32', 7: 'i32', 8: 'i32', 9: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 9), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_convolution_native_group_norm_relu_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 6, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, ks0, ks1, ks2, xnumel, XBLOCK : tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x1 = (xindex // ks0)
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp4 = tl.load(in_ptr1 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr2 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr3 + (x1), xmask, eviction_policy='evict_last')
    tmp16 = tl.load(in_ptr4 + (x1), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tmp2.to(tl.float32)
    tmp5 = tmp3 - tmp4
    tmp7 = 16*ks1*ks2
    tmp8 = tmp7.to(tl.float32)
    tmp9 = tmp6 / tmp8
    tmp10 = 1e-05
    tmp11 = tmp9 + tmp10
    tmp12 = libdevice.rsqrt(tmp11)
    tmp13 = tmp5 * tmp12
    tmp15 = tmp13 * tmp14
    tmp17 = tmp15 + tmp16
    tmp18 = tl.full([1], 0, tl.int32)
    tmp19 = triton_helpers.maximum(tmp18, tmp17)
    tmp20 = tmp19.to(tl.float32)
    tl.store(in_out_ptr0 + (x2), tmp20, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/du/cduwbfbpfujo3wtvyfjg24uz2dxr6xbg6a5qze3h7hvqntoshli7.py
# Source Nodes: [r_3], Original ATen: [aten.native_group_norm]
# r_3 => var_mean_1
triton_red_fused_native_group_norm_6 = async_compile.triton('triton_', '''
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=[512, 65536],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp16', 1: '*fp16', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32', 7: 'i32', 8: 'i32', 9: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 8), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused_native_group_norm_6', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 3, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, in_ptr1, out_ptr0, out_ptr1, out_ptr2, ks0, ks1, ks2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 272
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex % 34
    x1 = (xindex // 34)
    tmp18_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp18_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp18_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    x3 = xindex
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r2 = rindex
        tmp0 = r2 + (x0*((33 + (16*ks0*ks1)) // 34))
        tmp1 = 16*ks0*ks1
        tmp2 = tmp0 < tmp1
        tmp3 = tl.load(in_ptr0 + ((16*ks0*ks1*x1) + ((r2 + (x0*((33 + (16*ks0*ks1)) // 34))) % (16*ks0*ks1))), rmask & tmp2 & xmask, eviction_policy='evict_last', other=0.0).to(tl.float32)
        tmp4 = tl.load(in_ptr1 + ((16*x1) + (((r2 + (x0*((33 + (16*ks0*ks1)) // 34))) // ks2) % 16)), rmask & tmp2 & xmask, eviction_policy='evict_last', other=0.0).to(tl.float32)
        tmp5 = tmp3 + tmp4
        tmp6 = tmp5.to(tl.float32)
        tmp7 = tl.full(tmp6.shape, 0, tmp6.dtype)
        tmp8 = tl.where(tmp2, tmp6, tmp7)
        tmp9 = 0.0
        tmp10 = tl.full(tmp9.shape, 0, tmp9.dtype)
        tmp11 = tl.where(tmp2, tmp9, tmp10)
        tmp12 = 1.0
        tmp13 = tl.full(tmp12.shape, 0, tmp12.dtype)
        tmp14 = tl.where(tmp2, tmp12, tmp13)
        tmp15 = tl.broadcast_to(tmp8, [XBLOCK, RBLOCK])
        tmp16 = tl.broadcast_to(tmp11, [XBLOCK, RBLOCK])
        tmp17 = tl.broadcast_to(tmp14, [XBLOCK, RBLOCK])
        tmp18_mean_next, tmp18_m2_next, tmp18_weight_next = triton_helpers.welford_combine(
            tmp18_mean, tmp18_m2, tmp18_weight,
            tmp15, tmp16, tmp17
        )
        tmp18_mean = tl.where(rmask & xmask, tmp18_mean_next, tmp18_mean)
        tmp18_m2 = tl.where(rmask & xmask, tmp18_m2_next, tmp18_m2)
        tmp18_weight = tl.where(rmask & xmask, tmp18_weight_next, tmp18_weight)
    tmp18_tmp, tmp19_tmp, tmp20_tmp = triton_helpers.welford(
        tmp18_mean, tmp18_m2, tmp18_weight, 1
    )
    tmp18 = tmp18_tmp[:, None]
    tmp19 = tmp19_tmp[:, None]
    tmp20 = tmp20_tmp[:, None]
    tl.store(out_ptr0 + (x3), tmp18, xmask)
    tl.store(out_ptr1 + (x3), tmp19, xmask)
    tl.store(out_ptr2 + (x3), tmp20, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/ms/cms3yiqpdcysegpk2vd5uoiimmyigljvaxzoofoxiz4ow2hjwyuq.py
# Source Nodes: [add, r_3, r_4, relu_2], Original ATen: [aten._to_copy, aten.add, aten.convolution, aten.native_group_norm, aten.relu]
# add => add_4
# r_3 => add_3, mul_5
# r_4 => convert_element_type_10, convert_element_type_8, convert_element_type_9, convolution_2
# relu_2 => relu_2
triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7 = async_compile.triton('triton_', '''
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=[16777216], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp16', 2: '*fp16', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: '*fp32', 8: '*fp16', 9: 'i32', 10: 'i32', 11: 'i32', 12: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 7, 8, 12), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 7, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, in_ptr6, out_ptr0, out_ptr1, ks0, ks1, ks2, xnumel, XBLOCK : tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x1 = (xindex // ks0)
    tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x2), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp2 = tl.load(in_ptr2 + (x1), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp5 = tl.load(in_ptr3 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr5 + (x1), xmask, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr6 + (x1), xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3.to(tl.float32)
    tmp6 = tmp4 - tmp5
    tmp8 = 16*ks1*ks2
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp6 * tmp13
    tmp16 = tmp14 * tmp15
    tmp18 = tmp16 + tmp17
    tmp19 = tmp0 + tmp18
    tmp20 = tl.full([1], 0, tl.int32)
    tmp21 = triton_helpers.maximum(tmp20, tmp19)
    tmp22 = tmp21.to(tl.float32)
    tl.store(out_ptr0 + (x2), tmp19, xmask)
    tl.store(out_ptr1 + (x2), tmp22, xmask)
''', device_str='cuda')


# kernel path: /tmp/torchinductor_root/e7/ce7qnafrwcbxu25ua33g3miiw64m76yyfum27kbp53s32laqw3v5.py
# Source Nodes: [add_1, r_7], Original ATen: [aten.add, aten.native_group_norm]
# add_1 => add_9
# r_7 => add_8, mul_11
triton_poi_fused_add_native_group_norm_8 = async_compile.triton('triton_', '''
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=[16777216], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp16', 2: '*fp16', 3: '*fp32', 4: '*fp32', 5: '*fp32', 6: '*fp32', 7: 'i32', 8: 'i32', 9: 'i32', 10: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=89, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=1536, multi_processor_count=58), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5, 6, 10), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_native_group_norm_8', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 7, 'num_reduction': 0, 'backend_hash': '72c34bdb145549777ca2f0838f26abe42bb446cf528c78d229508b5a55e67a78', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': False, '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_(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5, ks0, ks1, ks2, xnumel, XBLOCK : tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x1 = (xindex // ks0)
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp2 = tl.load(in_ptr1 + (x1), xmask, eviction_policy='evict_last').to(tl.float32)
    tmp5 = tl.load(in_ptr2 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr3 + ((x1 // 16)), xmask, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr4 + (x1), xmask, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr5 + (x1), xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3.to(tl.float32)
    tmp6 = tmp4 - tmp5
    tmp8 = 16*ks1*ks2
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 / tmp9
    tmp11 = 1e-05
    tmp12 = tmp10 + tmp11
    tmp13 = libdevice.rsqrt(tmp12)
    tmp14 = tmp6 * tmp13
    tmp16 = tmp14 * tmp15
    tmp18 = tmp16 + tmp17
    tmp19 = tmp0 + tmp18
    tl.store(in_out_ptr0 + (x2), tmp19, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1, arg10_1, arg11_1, arg12_1, arg13_1, arg14_1, arg15_1, arg16_1, arg17_1, arg18_1 = args
    args.clear()
    s1 = arg0_1
    s2 = arg1_1
    assert_size_stride(arg2_1, (1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1))
    assert_size_stride(arg3_1, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(arg4_1, (128, ), (1, ))
    assert_size_stride(arg5_1, (128, ), (1, ))
    assert_size_stride(arg6_1, (128, ), (1, ))
    assert_size_stride(arg7_1, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(arg8_1, (128, ), (1, ))
    assert_size_stride(arg9_1, (128, ), (1, ))
    assert_size_stride(arg10_1, (128, ), (1, ))
    assert_size_stride(arg11_1, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(arg12_1, (128, ), (1, ))
    assert_size_stride(arg13_1, (128, ), (1, ))
    assert_size_stride(arg14_1, (128, ), (1, ))
    assert_size_stride(arg15_1, (128, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(arg16_1, (128, ), (1, ))
    assert_size_stride(arg17_1, (128, ), (1, ))
    assert_size_stride(arg18_1, (128, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1), torch.float16)
        # Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_0_xnumel = 128*s1*s2
        stream0 = get_raw_stream(0)
        triton_poi_fused__to_copy_convolution_relu_0.run(arg2_1, buf0, triton_poi_fused__to_copy_convolution_relu_0_xnumel, grid=grid(triton_poi_fused__to_copy_convolution_relu_0_xnumel), stream=stream0)
        buf1 = empty_strided_cuda((128, 128, 3, 3), (1152, 9, 3, 1), torch.float16)
        # Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_1.run(arg3_1, buf1, 147456, grid=grid(147456), stream=stream0)
        del arg3_1
        buf2 = empty_strided_cuda((128, ), (1, ), torch.float16)
        # Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_2.run(arg4_1, buf2, 128, grid=grid(128), stream=stream0)
        del arg4_1
        # Source Nodes: [r, relu], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        buf3 = extern_kernels.convolution(buf0, buf1, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1))
        del buf0
        buf4 = empty_strided_cuda((1, 8, 1, 1, 34), (272, 34, 272, 272, 1), torch.float32)
        buf5 = empty_strided_cuda((1, 8, 1, 1, 34), (272, 34, 272, 272, 1), torch.float32)
        buf6 = empty_strided_cuda((1, 8, 1, 1, 34), (272, 34, 272, 272, 1), torch.float32)
        # Source Nodes: [r_1], Original ATen: [aten.native_group_norm]
        triton_red_fused_native_group_norm_3_rnumel = ((33 + (16*s1*s2)) // 34)
        triton_red_fused_native_group_norm_3.run(buf3, buf2, buf4, buf5, buf6, s1, s2, 272, triton_red_fused_native_group_norm_3_rnumel, grid=grid(272), stream=stream0)
        buf7 = empty_strided_cuda((1, 8, 1, 1), (8, 1, 8, 8), torch.float32)
        buf8 = empty_strided_cuda((1, 8, 1, 1), (8, 1, 8, 8), torch.float32)
        # Source Nodes: [r_1], Original ATen: [aten.native_group_norm]
        triton_per_fused_native_group_norm_4.run(buf4, buf5, buf6, buf7, buf8, 8, 34, grid=grid(8), stream=stream0)
        ps0 = s1*s2
        buf10 = buf3; del buf3  # reuse
        # Source Nodes: [r_1, r_2, relu_1], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel = 128*s1*s2
        triton_poi_fused__to_copy_convolution_native_group_norm_relu_5.run(buf10, buf2, buf7, buf8, arg5_1, arg6_1, ps0, s1, s2, triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel, grid=grid(triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel), stream=stream0)
        del arg5_1
        del arg6_1
        buf11 = buf1; del buf1  # reuse
        # Source Nodes: [r_1, r_2, relu_1], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_1.run(arg7_1, buf11, 147456, grid=grid(147456), stream=stream0)
        del arg7_1
        buf12 = buf2; del buf2  # reuse
        # Source Nodes: [r_1, r_2, relu_1], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_2.run(arg8_1, buf12, 128, grid=grid(128), stream=stream0)
        del arg8_1
        # Source Nodes: [r_1, r_2, relu_1], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        buf13 = extern_kernels.convolution(buf10, buf11, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1))
        buf14 = buf6; del buf6  # reuse
        buf15 = buf5; del buf5  # reuse
        buf16 = buf4; del buf4  # reuse
        # Source Nodes: [r_3], Original ATen: [aten.native_group_norm]
        triton_red_fused_native_group_norm_6_rnumel = ((33 + (16*s1*s2)) // 34)
        triton_red_fused_native_group_norm_6.run(buf13, buf12, buf14, buf15, buf16, s1, s2, ps0, 272, triton_red_fused_native_group_norm_6_rnumel, grid=grid(272), stream=stream0)
        buf17 = buf8; del buf8  # reuse
        buf18 = buf7; del buf7  # reuse
        # Source Nodes: [r_3], Original ATen: [aten.native_group_norm]
        triton_per_fused_native_group_norm_4.run(buf14, buf15, buf16, buf17, buf18, 8, 34, grid=grid(8), stream=stream0)
        buf20 = empty_strided_cuda((1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1), torch.float32)
        buf21 = buf10; del buf10  # reuse
        # Source Nodes: [add, r_3, r_4, relu_2], Original ATen: [aten._to_copy, aten.add, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7_xnumel = 128*s1*s2
        triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7.run(arg2_1, buf13, buf12, buf17, buf18, arg9_1, arg10_1, buf20, buf21, ps0, s1, s2, triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7_xnumel, grid=grid(triton_poi_fused__to_copy_add_convolution_native_group_norm_relu_7_xnumel), stream=stream0)
        del arg10_1
        del arg2_1
        del arg9_1
        del buf13
        buf22 = buf11; del buf11  # reuse
        # Source Nodes: [r_4, relu_2], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_1.run(arg11_1, buf22, 147456, grid=grid(147456), stream=stream0)
        del arg11_1
        buf23 = buf12; del buf12  # reuse
        # Source Nodes: [r_4, relu_2], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_2.run(arg12_1, buf23, 128, grid=grid(128), stream=stream0)
        del arg12_1
        # Source Nodes: [r_4, relu_2], Original ATen: [aten._to_copy, aten.convolution, aten.relu]
        buf24 = extern_kernels.convolution(buf21, buf22, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1))
        del buf21
        buf25 = buf16; del buf16  # reuse
        buf26 = buf15; del buf15  # reuse
        buf27 = buf14; del buf14  # reuse
        # Source Nodes: [r_5], Original ATen: [aten.native_group_norm]
        triton_red_fused_native_group_norm_6_rnumel = ((33 + (16*s1*s2)) // 34)
        triton_red_fused_native_group_norm_6.run(buf24, buf23, buf25, buf26, buf27, s1, s2, ps0, 272, triton_red_fused_native_group_norm_6_rnumel, grid=grid(272), stream=stream0)
        buf28 = buf18; del buf18  # reuse
        buf29 = buf17; del buf17  # reuse
        # Source Nodes: [r_5], Original ATen: [aten.native_group_norm]
        triton_per_fused_native_group_norm_4.run(buf25, buf26, buf27, buf28, buf29, 8, 34, grid=grid(8), stream=stream0)
        buf31 = buf24; del buf24  # reuse
        # Source Nodes: [r_5, r_6, relu_3], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel = 128*s1*s2
        triton_poi_fused__to_copy_convolution_native_group_norm_relu_5.run(buf31, buf23, buf28, buf29, arg13_1, arg14_1, ps0, s1, s2, triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel, grid=grid(triton_poi_fused__to_copy_convolution_native_group_norm_relu_5_xnumel), stream=stream0)
        del arg13_1
        del arg14_1
        buf32 = buf22; del buf22  # reuse
        # Source Nodes: [r_5, r_6, relu_3], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_1.run(arg15_1, buf32, 147456, grid=grid(147456), stream=stream0)
        del arg15_1
        buf33 = buf23; del buf23  # reuse
        # Source Nodes: [r_5, r_6, relu_3], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        triton_poi_fused__to_copy_convolution_relu_2.run(arg16_1, buf33, 128, grid=grid(128), stream=stream0)
        del arg16_1
        # Source Nodes: [r_5, r_6, relu_3], Original ATen: [aten._to_copy, aten.convolution, aten.native_group_norm, aten.relu]
        buf34 = extern_kernels.convolution(buf31, buf32, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (1, 128, s1, s2), (128*s1*s2, s1*s2, s2, 1))
        del buf31
        del buf32
        buf35 = buf27; del buf27  # reuse
        buf36 = buf26; del buf26  # reuse
        buf37 = buf25; del buf25  # reuse
        # Source Nodes: [r_7], Original ATen: [aten.native_group_norm]
        triton_red_fused_native_group_norm_6_rnumel = ((33 + (16*s1*s2)) // 34)
        triton_red_fused_native_group_norm_6.run(buf34, buf33, buf35, buf36, buf37, s1, s2, ps0, 272, triton_red_fused_native_group_norm_6_rnumel, grid=grid(272), stream=stream0)
        buf38 = buf29; del buf29  # reuse
        buf39 = buf28; del buf28  # reuse
        # Source Nodes: [r_7], Original ATen: [aten.native_group_norm]
        triton_per_fused_native_group_norm_4.run(buf35, buf36, buf37, buf38, buf39, 8, 34, grid=grid(8), stream=stream0)
        del buf35
        del buf36
        del buf37
        buf41 = buf20; del buf20  # reuse
        # Source Nodes: [add_1, r_7], Original ATen: [aten.add, aten.native_group_norm]
        triton_poi_fused_add_native_group_norm_8_xnumel = 128*s1*s2
        triton_poi_fused_add_native_group_norm_8.run(buf41, buf34, buf33, buf38, buf39, arg17_1, arg18_1, ps0, s1, s2, triton_poi_fused_add_native_group_norm_8_xnumel, grid=grid(triton_poi_fused_add_native_group_norm_8_xnumel), stream=stream0)
        del arg17_1
        del arg18_1
        del buf33
        del buf34
        del buf38
        del buf39
    return (buf41, )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    arg0_1 = 272
    arg1_1 = 272
    arg2_1 = rand_strided((1, 128, 272, 272), (9469952, 73984, 272, 1), device='cuda:0', dtype=torch.float32)
    arg3_1 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    arg4_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg5_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg6_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg7_1 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    arg8_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg9_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg10_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg11_1 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    arg12_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg13_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg14_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg15_1 = rand_strided((128, 128, 3, 3), (1152, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    arg16_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg17_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg18_1 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1, arg10_1, arg11_1, arg12_1, arg13_1, arg14_1, arg15_1, arg16_1, arg17_1, arg18_1])
    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)