# 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_7/inductor_cache/lu/cluznd6mcssryycrrxyrun3thcx37iyatgrin4volajsy7rmbgly.py
# Topologically Sorted Source Nodes: [pad], Original ATen: [aten.replication_pad3d]
# Source node to ATen node mapping:
#   pad => _unsafe_index, _unsafe_index_1, _unsafe_index_2
# Graph fragment:
#   %_unsafe_index : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%primals_2, [None, None, %clamp_max, None, None]), kwargs = {})
#   %_unsafe_index_1 : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index, [None, None, None, %clamp_max, None]), kwargs = {})
#   %_unsafe_index_2 : [num_users=2] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%_unsafe_index_1, [None, None, None, None, %clamp_max]), kwargs = {})
triton_poi_fused_replication_pad3d_0 = async_compile.triton('triton_poi_fused_replication_pad3d_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=[4194304], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_replication_pad3d_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_replication_pad3d_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2299968
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 66
    x1 = (xindex // 66) % 66
    x2 = (xindex // 4356) % 66
    x3 = (xindex // 287496)
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + ((64*((63) * ((63) <= (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0))))) + (((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) * ((((0) * ((0) >= ((-1) + x1)) + ((-1) + x1) * (((-1) + x1) > (0)))) < (63)))) + (4096*((63) * ((63) <= (((0) * ((0) >= ((-1) + x2)) + ((-1) + x2) * (((-1) + x2) > (0))))) + (((0) * ((0) >= ((-1) + x2)) + ((-1) + x2) * (((-1) + x2) > (0)))) * ((((0) * ((0) >= ((-1) + x2)) + ((-1) + x2) * (((-1) + x2) > (0)))) < (63)))) + (262144*x3) + ((63) * ((63) <= (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0))))) + (((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) * ((((0) * ((0) >= ((-1) + x0)) + ((-1) + x0) * (((-1) + x0) > (0)))) < (63)))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x4), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/me/cme4fiodyseceoiaqotpbppmkhgcmw5qh545wuq6s3eddheyio2u.py
# Topologically Sorted Source Nodes: [output_1], Original ATen: [aten.native_group_norm]
# Source node to ATen node mapping:
#   output_1 => var_mean
# Graph fragment:
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view, [2, 3]), kwargs = {correction: 0, keepdim: True})
triton_red_fused_native_group_norm_1 = async_compile.triton('triton_red_fused_native_group_norm_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=[32, 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, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused_native_group_norm_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 3, '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_group_norm_1(in_ptr0, out_ptr0, out_ptr1, out_ptr2, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 32
    rnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp2_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp2_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp2_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + (8192*x0)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp2_mean_next, tmp2_m2_next, tmp2_weight_next = triton_helpers.welford_reduce(
            tmp1, tmp2_mean, tmp2_m2, tmp2_weight, roffset == 0
        )
        tmp2_mean = tl.where(rmask & xmask, tmp2_mean_next, tmp2_mean)
        tmp2_m2 = tl.where(rmask & xmask, tmp2_m2_next, tmp2_m2)
        tmp2_weight = tl.where(rmask & xmask, tmp2_weight_next, tmp2_weight)
    tmp2_tmp, tmp3_tmp, tmp4_tmp = triton_helpers.welford(
        tmp2_mean, tmp2_m2, tmp2_weight, 1
    )
    tmp2 = tmp2_tmp[:, None]
    tmp3 = tmp3_tmp[:, None]
    tmp4 = tmp4_tmp[:, None]
    tl.store(out_ptr0 + (x0), tmp2, xmask)
    tl.store(out_ptr1 + (x0), tmp3, xmask)
    tl.store(out_ptr2 + (x0), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/bv/cbvolr7jvlzbzlmnm5267acxusvkinldk4rkup4ifssehwjmkwb2.py
# Topologically Sorted Source Nodes: [output_1], Original ATen: [aten.native_group_norm]
# Source node to ATen node mapping:
#   output_1 => add, rsqrt, var_mean
# Graph fragment:
#   %var_mean : [num_users=2] = call_function[target=torch.ops.aten.var_mean.correction](args = (%view, [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_per_fused_native_group_norm_2 = async_compile.triton('triton_per_fused_native_group_norm_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.persistent_reduction(
    size_hints=[8, 4],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32', 6: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_per_fused_native_group_norm_2', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 3, '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_per_fused_native_group_norm_2(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr):
    xnumel = 8
    rnumel = 4
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    roffset = 0
    rmask = tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + (4*x0)), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + (4*x0)), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + (4*x0)), 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(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp15 = tmp12[:, None]
    tmp16 = 32768.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp20, xmask)
    tl.store(out_ptr0 + (x0), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/lw/clwxbjrozyrufclp6lspsimcypqk4c45zkolg6wwxvnj3474halb.py
# Topologically Sorted Source Nodes: [output_1, output_2], Original ATen: [aten.native_group_norm, aten.leaky_relu]
# Source node to ATen node mapping:
#   output_1 => add_1, mul_1
#   output_2 => gt, mul_2, where
# Graph fragment:
#   %mul_1 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view_1, %unsqueeze_7), kwargs = {})
#   %add_1 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul_1, %unsqueeze_3), kwargs = {})
#   %gt : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%add_1, 0), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_1, 0.02), kwargs = {})
#   %where : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt, %add_1, %mul_2), kwargs = {})
triton_poi_fused_leaky_relu_native_group_norm_3 = async_compile.triton('triton_poi_fused_leaky_relu_native_group_norm_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=[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_leaky_relu_native_group_norm_3', 'mutated_arg_names': ['in_out_ptr0'], '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_leaky_relu_native_group_norm_3(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, xnumel, XBLOCK : tl.constexpr):
    xnumel = 262144
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = (xindex // 32768)
    x1 = (xindex // 32768) % 2
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x4), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + (x1), None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + (x1), None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = 0.0
    tmp10 = tmp8 > tmp9
    tmp11 = 0.02
    tmp12 = tmp8 * tmp11
    tmp13 = tl.where(tmp10, tmp8, tmp12)
    tl.store(in_out_ptr0 + (x3), tmp13, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/w4/cw4htj27jyad6revrg52vfqvuwh2yfl5ehkfap2qfnolhs7penho.py
# Topologically Sorted Source Nodes: [output_3], Original ATen: [aten.avg_pool3d]
# Source node to ATen node mapping:
#   output_3 => avg_pool3d
# Graph fragment:
#   %avg_pool3d : [num_users=2] = call_function[target=torch.ops.aten.avg_pool3d.default](args = (%where, [2, 2, 2], [4, 4, 4]), kwargs = {})
triton_poi_fused_avg_pool3d_4 = async_compile.triton('triton_poi_fused_avg_pool3d_4', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_avg_pool3d_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 8, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_avg_pool3d_4(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 8
    x1 = (xindex // 8) % 8
    x2 = (xindex // 64)
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + ((4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (32 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (33 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (1024 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr0 + (1025 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr0 + (1056 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp13 = tl.load(in_ptr0 + (1057 + (4*x0) + (128*x1) + (4096*x2)), None, eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp8 = tmp7 + tmp6
    tmp10 = tmp9 + tmp8
    tmp12 = tmp11 + tmp10
    tmp14 = tmp13 + tmp12
    tmp15 = 0.125
    tmp16 = tmp14 * tmp15
    tl.store(out_ptr0 + (x3), tmp16, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/wr/cwre7zhat33dgo5f4kaggrzhykjbos6x3ww64ahisdtl4iydsusr.py
# Topologically Sorted Source Nodes: [output_5], Original ATen: [aten.mean]
# Source node to ATen node mapping:
#   output_5 => mean
# Graph fragment:
#   %mean : [num_users=1] = call_function[target=torch.ops.aten.mean.dim](args = (%_adaptive_avg_pool3d, [-1, -2, -3], True), kwargs = {})
triton_red_fused_mean_5 = async_compile.triton('triton_red_fused_mean_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.reduction(
    size_hints=[8, 4096],
    reduction_hint=ReductionHint.INNER,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_red_fused_mean_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 1, '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_mean_5(in_out_ptr0, in_ptr0, xnumel, rnumel, XBLOCK : tl.constexpr, RBLOCK : tl.constexpr):
    xnumel = 8
    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
    _tmp2 = tl.full([XBLOCK, RBLOCK], 0, tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + (4096*x0)), rmask & xmask, eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp3 = _tmp2 + tmp1
        _tmp2 = tl.where(rmask & xmask, tmp3, _tmp2)
    tmp2 = tl.sum(_tmp2, 1)[:, None]
    tmp4 = 4096.0
    tmp5 = tmp2 / tmp4
    tl.debug_barrier()
    tl.store(in_out_ptr0 + (x0), tmp5, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4 = args
    args.clear()
    assert_size_stride(primals_1, (2, 2, 3, 3, 3), (54, 27, 9, 3, 1))
    assert_size_stride(primals_2, (4, 2, 64, 64, 64), (524288, 262144, 4096, 64, 1))
    assert_size_stride(primals_3, (2, ), (1, ))
    assert_size_stride(primals_4, (2, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 2, 66, 66, 66), (574992, 287496, 4356, 66, 1), torch.float32)
        # Topologically Sorted Source Nodes: [pad], Original ATen: [aten.replication_pad3d]
        stream0 = get_raw_stream(0)
        triton_poi_fused_replication_pad3d_0.run(primals_2, buf0, 2299968, grid=grid(2299968), stream=stream0)
        del primals_2
        # Topologically Sorted Source Nodes: [output], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_1, stride=(2, 2, 2), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False, output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 2, 32, 32, 32), (65536, 32768, 1024, 32, 1))
        buf2 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch.float32)
        buf3 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch.float32)
        buf4 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch.float32)
        # Topologically Sorted Source Nodes: [output_1], Original ATen: [aten.native_group_norm]
        triton_red_fused_native_group_norm_1.run(buf1, buf2, buf3, buf4, 32, 8192, grid=grid(32), stream=stream0)
        buf5 = empty_strided_cuda((4, 2, 1, 1), (2, 1, 1, 1), torch.float32)
        buf6 = empty_strided_cuda((4, 2, 1, 1), (2, 1, 8, 8), torch.float32)
        buf8 = reinterpret_tensor(buf6, (4, 2, 1, 1), (2, 1, 1, 1), 0); del buf6  # reuse
        # Topologically Sorted Source Nodes: [output_1], Original ATen: [aten.native_group_norm]
        triton_per_fused_native_group_norm_2.run(buf8, buf2, buf3, buf4, buf5, 8, 4, grid=grid(8), stream=stream0)
        del buf2
        del buf3
        del buf4
        buf9 = empty_strided_cuda((4, 2, 32, 32, 32), (65536, 32768, 1024, 32, 1), torch.float32)
        buf10 = buf9; del buf9  # reuse
        # Topologically Sorted Source Nodes: [output_1, output_2], Original ATen: [aten.native_group_norm, aten.leaky_relu]
        triton_poi_fused_leaky_relu_native_group_norm_3.run(buf10, buf1, buf5, buf8, primals_3, primals_4, 262144, grid=grid(262144), stream=stream0)
        buf11 = empty_strided_cuda((4, 2, 8, 8, 8), (1024, 512, 64, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [output_3], Original ATen: [aten.avg_pool3d]
        triton_poi_fused_avg_pool3d_4.run(buf10, buf11, 4096, grid=grid(4096), stream=stream0)
        # Topologically Sorted Source Nodes: [output_4], Original ATen: [aten._adaptive_avg_pool3d]
        buf12 = torch.ops.aten._adaptive_avg_pool3d.default(buf11, [16, 16, 16])
        buf13 = buf12
        del buf12
        buf14 = empty_strided_cuda((4, 2, 1, 1, 1), (2, 1, 8, 8, 8), torch.float32)
        buf15 = reinterpret_tensor(buf14, (4, 2, 1, 1, 1), (2, 1, 1, 1, 1), 0); del buf14  # reuse
        # Topologically Sorted Source Nodes: [output_5], Original ATen: [aten.mean]
        triton_red_fused_mean_5.run(buf15, buf13, 8, 4096, grid=grid(8), stream=stream0)
        del buf13
    return (buf15, primals_1, primals_3, primals_4, buf0, buf1, buf5, buf8, buf10, buf11, )


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((2, 2, 3, 3, 3), (54, 27, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 2, 64, 64, 64), (524288, 262144, 4096, 64, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((2, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((2, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4])
    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.functional as F


class RefModel3d2(torch.nn.Module):
    """The 3D reference model."""

    def __init__(self):
        super().__init__()
        self.l1 = torch.nn.Conv3d(2, 2, 3, padding=1, stride=2,
            padding_mode='replicate', bias=False)
        self.l2 = torch.nn.GroupNorm(2, 2)
        self.l3 = torch.nn.LeakyReLU(0.02)
        self.l4 = torch.nn.Identity()
        self.l5 = torch.nn.AvgPool3d(2, stride=4)
        self.l7 = torch.nn.AdaptiveAvgPool3d(1)

    def forward(self, x):
        output = self.l1(x)
        output = self.l2(output)
        output = self.l3(output)
        output = self.l4(output)
        output = self.l5(output)
        output = F.interpolate(output, mode='area', scale_factor=2)
        output = self.l7(output)
        return output


def get_inputs():
    return [torch.rand([4, 2, 64, 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
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_replication_pad3d_0(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 2299968
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 66
    x1 = xindex // 66 % 66
    x2 = xindex // 4356 % 66
    x3 = xindex // 287496
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (64 * (63 * (63 <= 0 * (0 >= -1 + x1) + (-1 +
        x1) * (-1 + x1 > 0)) + (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 >
        0)) * (0 * (0 >= -1 + x1) + (-1 + x1) * (-1 + x1 > 0) < 63)) + 4096 *
        (63 * (63 <= 0 * (0 >= -1 + x2) + (-1 + x2) * (-1 + x2 > 0)) + (0 *
        (0 >= -1 + x2) + (-1 + x2) * (-1 + x2 > 0)) * (0 * (0 >= -1 + x2) +
        (-1 + x2) * (-1 + x2 > 0) < 63)) + 262144 * x3 + (63 * (63 <= 0 * (
        0 >= -1 + x0) + (-1 + x0) * (-1 + x0 > 0)) + (0 * (0 >= -1 + x0) + 
        (-1 + x0) * (-1 + x0 > 0)) * (0 * (0 >= -1 + x0) + (-1 + x0) * (-1 +
        x0 > 0) < 63))), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x4, tmp0, xmask)


@triton.jit
def triton_red_fused_native_group_norm_1(in_ptr0, out_ptr0, out_ptr1,
    out_ptr2, xnumel, rnumel, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 32
    rnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    tmp2_mean = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp2_m2 = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    tmp2_weight = tl.zeros([XBLOCK, RBLOCK], tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + 8192 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp2_mean_next, tmp2_m2_next, tmp2_weight_next = (triton_helpers.
            welford_reduce(tmp1, tmp2_mean, tmp2_m2, tmp2_weight, roffset == 0)
            )
        tmp2_mean = tl.where(rmask & xmask, tmp2_mean_next, tmp2_mean)
        tmp2_m2 = tl.where(rmask & xmask, tmp2_m2_next, tmp2_m2)
        tmp2_weight = tl.where(rmask & xmask, tmp2_weight_next, tmp2_weight)
    tmp2_tmp, tmp3_tmp, tmp4_tmp = triton_helpers.welford(tmp2_mean,
        tmp2_m2, tmp2_weight, 1)
    tmp2 = tmp2_tmp[:, None]
    tmp3 = tmp3_tmp[:, None]
    tmp4 = tmp4_tmp[:, None]
    tl.store(out_ptr0 + x0, tmp2, xmask)
    tl.store(out_ptr1 + x0, tmp3, xmask)
    tl.store(out_ptr2 + x0, tmp4, xmask)


@triton.jit
def triton_per_fused_native_group_norm_2(in_out_ptr0, in_ptr0, in_ptr1,
    in_ptr2, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    xnumel = 8
    RBLOCK: tl.constexpr = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 4 * x0), xmask, other=0.0)
    tmp1 = tl.load(in_ptr1 + (r1 + 4 * x0), xmask, other=0.0)
    tmp2 = tl.load(in_ptr2 + (r1 + 4 * x0), 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(xmask, tmp3, 0)
    tmp8 = tl.where(xmask, tmp4, 0)
    tmp9 = tl.where(xmask, tmp5, 0)
    tmp10, tmp11, tmp12 = triton_helpers.welford(tmp7, tmp8, tmp9, 1)
    tmp13 = tmp10[:, None]
    tmp14 = tmp11[:, None]
    tmp12[:, None]
    tmp16 = 32768.0
    tmp17 = tmp14 / tmp16
    tmp18 = 1e-05
    tmp19 = tmp17 + tmp18
    tmp20 = libdevice.rsqrt(tmp19)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp20, xmask)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused_leaky_relu_native_group_norm_3(in_out_ptr0, in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x4 = xindex // 32768
    x1 = xindex // 32768 % 2
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x4, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x4, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr3 + x1, None, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr4 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 - tmp1
    tmp4 = tmp2 * tmp3
    tmp6 = tmp4 * tmp5
    tmp8 = tmp6 + tmp7
    tmp9 = 0.0
    tmp10 = tmp8 > tmp9
    tmp11 = 0.02
    tmp12 = tmp8 * tmp11
    tmp13 = tl.where(tmp10, tmp8, tmp12)
    tl.store(in_out_ptr0 + x3, tmp13, None)


@triton.jit
def triton_poi_fused_avg_pool3d_4(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 % 8
    x1 = xindex // 8 % 8
    x2 = xindex // 64
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (1 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (32 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (33 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (1024 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr0 + (1025 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr0 + (1056 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp13 = tl.load(in_ptr0 + (1057 + 4 * x0 + 128 * x1 + 4096 * x2), None,
        eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp8 = tmp7 + tmp6
    tmp10 = tmp9 + tmp8
    tmp12 = tmp11 + tmp10
    tmp14 = tmp13 + tmp12
    tmp15 = 0.125
    tmp16 = tmp14 * tmp15
    tl.store(out_ptr0 + x3, tmp16, None)


@triton.jit
def triton_red_fused_mean_5(in_out_ptr0, in_ptr0, xnumel, rnumel, XBLOCK:
    tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 8
    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
    _tmp2 = tl.full([XBLOCK, RBLOCK], 0, tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + 4096 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp1 = tl.broadcast_to(tmp0, [XBLOCK, RBLOCK])
        tmp3 = _tmp2 + tmp1
        _tmp2 = tl.where(rmask & xmask, tmp3, _tmp2)
    tmp2 = tl.sum(_tmp2, 1)[:, None]
    tmp4 = 4096.0
    tmp5 = tmp2 / tmp4
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp5, xmask)


def call(args):
    primals_1, primals_2, primals_3, primals_4 = args
    args.clear()
    assert_size_stride(primals_1, (2, 2, 3, 3, 3), (54, 27, 9, 3, 1))
    assert_size_stride(primals_2, (4, 2, 64, 64, 64), (524288, 262144, 4096,
        64, 1))
    assert_size_stride(primals_3, (2,), (1,))
    assert_size_stride(primals_4, (2,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 2, 66, 66, 66), (574992, 287496, 4356,
            66, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_replication_pad3d_0[grid(2299968)](primals_2, buf0,
            2299968, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_2
        buf1 = extern_kernels.convolution(buf0, primals_1, stride=(2, 2, 2),
            padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 2, 32, 32, 32), (65536, 32768, 1024, 
            32, 1))
        buf2 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch
            .float32)
        buf3 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch
            .float32)
        buf4 = empty_strided_cuda((4, 2, 1, 1, 4), (8, 4, 32, 32, 1), torch
            .float32)
        triton_red_fused_native_group_norm_1[grid(32)](buf1, buf2, buf3,
            buf4, 32, 8192, XBLOCK=1, RBLOCK=2048, num_warps=16, num_stages=1)
        buf5 = empty_strided_cuda((4, 2, 1, 1), (2, 1, 1, 1), torch.float32)
        buf6 = empty_strided_cuda((4, 2, 1, 1), (2, 1, 8, 8), torch.float32)
        buf8 = reinterpret_tensor(buf6, (4, 2, 1, 1), (2, 1, 1, 1), 0)
        del buf6
        triton_per_fused_native_group_norm_2[grid(8)](buf8, buf2, buf3,
            buf4, buf5, 8, 4, XBLOCK=8, num_warps=2, num_stages=1)
        del buf2
        del buf3
        del buf4
        buf9 = empty_strided_cuda((4, 2, 32, 32, 32), (65536, 32768, 1024, 
            32, 1), torch.float32)
        buf10 = buf9
        del buf9
        triton_poi_fused_leaky_relu_native_group_norm_3[grid(262144)](buf10,
            buf1, buf5, buf8, primals_3, primals_4, 262144, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf11 = empty_strided_cuda((4, 2, 8, 8, 8), (1024, 512, 64, 8, 1),
            torch.float32)
        triton_poi_fused_avg_pool3d_4[grid(4096)](buf10, buf11, 4096,
            XBLOCK=128, num_warps=4, num_stages=1)
        buf12 = torch.ops.aten._adaptive_avg_pool3d.default(buf11, [16, 16, 16]
            )
        buf13 = buf12
        del buf12
        buf14 = empty_strided_cuda((4, 2, 1, 1, 1), (2, 1, 8, 8, 8), torch.
            float32)
        buf15 = reinterpret_tensor(buf14, (4, 2, 1, 1, 1), (2, 1, 1, 1, 1), 0)
        del buf14
        triton_red_fused_mean_5[grid(8)](buf15, buf13, 8, 4096, XBLOCK=1,
            RBLOCK=2048, num_warps=16, num_stages=1)
        del buf13
    return (buf15, primals_1, primals_3, primals_4, buf0, buf1, buf5, buf8,
        buf10, buf11)


class RefModel3d2New(torch.nn.Module):
    """The 3D reference model."""

    def __init__(self):
        super().__init__()
        self.l1 = torch.nn.Conv3d(2, 2, 3, padding=1, stride=2,
            padding_mode='replicate', bias=False)
        self.l2 = torch.nn.GroupNorm(2, 2)
        self.l3 = torch.nn.LeakyReLU(0.02)
        self.l4 = torch.nn.Identity()
        self.l5 = torch.nn.AvgPool3d(2, stride=4)
        self.l7 = torch.nn.AdaptiveAvgPool3d(1)

    def forward(self, input_0):
        primals_1 = self.l1.weight
        primals_3 = self.l2.weight
        primals_4 = self.l2.bias
        primals_2 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4])
        return output[0]
