# 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_4/inductor_cache/7p/c7pwxf56d2hkkgnvgzzrs2qvt53cs64ryf4taqzjeu5lh5kz3mmv.py
# Topologically Sorted Source Nodes: [conv2d], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv2d => convolution
# Graph fragment:
#   %convolution : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%primals_1, %primals_2, %primals_3, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_0 = async_compile.triton('triton_poi_fused_convolution_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=[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_convolution_0', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 952576
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 3721) % 64
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + (x3), tmp2, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/jl/cjl6dwxrffvlkgggii27cxcanagq3wstn3z6xrualv3tjbmvwrdx.py
# Topologically Sorted Source Nodes: [x_1], Original ATen: [aten.bernoulli]
# Source node to ATen node mapping:
#   x_1 => bernoulli
# Graph fragment:
#   %bernoulli : [num_users=2] = call_function[target=torch.ops.aten.bernoulli.p](args = (%empty, 0.5), kwargs = {})
triton_poi_fused_bernoulli_1 = async_compile.triton('triton_poi_fused_bernoulli_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bernoulli_1', '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_bernoulli_1(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 = float("nan")
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/nh/cnhec2zmuvcsvny2nncaltcm5a42fmwin2l7dj3ma2bz7ig2pdsj.py
# Topologically Sorted Source Nodes: [max_pool2d, x, x_1], Original ATen: [aten.max_pool2d_with_indices, aten.relu, aten.div, aten.mul, aten.threshold_backward]
# Source node to ATen node mapping:
#   max_pool2d => _low_memory_max_pool2d_with_offsets, getitem_1
#   x => relu
#   x_1 => div, mul
# Graph fragment:
#   %_low_memory_max_pool2d_with_offsets : [num_users=2] = call_function[target=torch.ops.prims._low_memory_max_pool2d_with_offsets.default](args = (%convolution, [4, 4], [1, 1], [0, 0], [1, 1], False), kwargs = {})
#   %getitem_1 : [num_users=1] = call_function[target=operator.getitem](args = (%_low_memory_max_pool2d_with_offsets, 1), kwargs = {})
#   %relu : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%getitem,), kwargs = {})
#   %div : [num_users=1] = call_function[target=torch.ops.aten.div.Scalar](args = (%bernoulli, 0.5), kwargs = {})
#   %mul : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%relu, %div), kwargs = {})
#   %le_4 : [num_users=1] = call_function[target=torch.ops.aten.le.Scalar](args = (%relu, 0), kwargs = {})
triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_2 = async_compile.triton('triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_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=[1048576], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*i8', 3: '*fp32', 4: '*i1', 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_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 17, '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_div_max_pool2d_with_indices_mul_relu_threshold_backward_2(in_ptr0, in_ptr1, out_ptr1, out_ptr2, out_ptr3, xnumel, XBLOCK : tl.constexpr):
    xnumel = 861184
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 58
    x1 = (xindex // 58) % 58
    x2 = (xindex // 3364)
    x3 = xindex % 3364
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (61*x1) + (3721*x2)), xmask)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp7 = tl.load(in_ptr0 + (61 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp9 = tl.load(in_ptr0 + (62 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp11 = tl.load(in_ptr0 + (63 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp13 = tl.load(in_ptr0 + (64 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp15 = tl.load(in_ptr0 + (122 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp17 = tl.load(in_ptr0 + (123 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp19 = tl.load(in_ptr0 + (124 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp21 = tl.load(in_ptr0 + (125 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp23 = tl.load(in_ptr0 + (183 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp25 = tl.load(in_ptr0 + (184 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp27 = tl.load(in_ptr0 + (185 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp29 = tl.load(in_ptr0 + (186 + x0 + (61*x1) + (3721*x2)), xmask)
    tmp79 = tl.load(in_ptr1 + (x2), xmask, eviction_policy='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp22 = triton_helpers.maximum(tmp21, tmp20)
    tmp24 = triton_helpers.maximum(tmp23, tmp22)
    tmp26 = triton_helpers.maximum(tmp25, tmp24)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tmp30 = triton_helpers.maximum(tmp29, tmp28)
    tmp31 = tmp1 > tmp0
    tmp32 = tl.full([1], 1, tl.int8)
    tmp33 = tl.full([1], 0, tl.int8)
    tmp34 = tl.where(tmp31, tmp32, tmp33)
    tmp35 = tmp3 > tmp2
    tmp36 = tl.full([1], 2, tl.int8)
    tmp37 = tl.where(tmp35, tmp36, tmp34)
    tmp38 = tmp5 > tmp4
    tmp39 = tl.full([1], 3, tl.int8)
    tmp40 = tl.where(tmp38, tmp39, tmp37)
    tmp41 = tmp7 > tmp6
    tmp42 = tl.full([1], 4, tl.int8)
    tmp43 = tl.where(tmp41, tmp42, tmp40)
    tmp44 = tmp9 > tmp8
    tmp45 = tl.full([1], 5, tl.int8)
    tmp46 = tl.where(tmp44, tmp45, tmp43)
    tmp47 = tmp11 > tmp10
    tmp48 = tl.full([1], 6, tl.int8)
    tmp49 = tl.where(tmp47, tmp48, tmp46)
    tmp50 = tmp13 > tmp12
    tmp51 = tl.full([1], 7, tl.int8)
    tmp52 = tl.where(tmp50, tmp51, tmp49)
    tmp53 = tmp15 > tmp14
    tmp54 = tl.full([1], 8, tl.int8)
    tmp55 = tl.where(tmp53, tmp54, tmp52)
    tmp56 = tmp17 > tmp16
    tmp57 = tl.full([1], 9, tl.int8)
    tmp58 = tl.where(tmp56, tmp57, tmp55)
    tmp59 = tmp19 > tmp18
    tmp60 = tl.full([1], 10, tl.int8)
    tmp61 = tl.where(tmp59, tmp60, tmp58)
    tmp62 = tmp21 > tmp20
    tmp63 = tl.full([1], 11, tl.int8)
    tmp64 = tl.where(tmp62, tmp63, tmp61)
    tmp65 = tmp23 > tmp22
    tmp66 = tl.full([1], 12, tl.int8)
    tmp67 = tl.where(tmp65, tmp66, tmp64)
    tmp68 = tmp25 > tmp24
    tmp69 = tl.full([1], 13, tl.int8)
    tmp70 = tl.where(tmp68, tmp69, tmp67)
    tmp71 = tmp27 > tmp26
    tmp72 = tl.full([1], 14, tl.int8)
    tmp73 = tl.where(tmp71, tmp72, tmp70)
    tmp74 = tmp29 > tmp28
    tmp75 = tl.full([1], 15, tl.int8)
    tmp76 = tl.where(tmp74, tmp75, tmp73)
    tmp77 = tl.full([1], 0, tl.int32)
    tmp78 = triton_helpers.maximum(tmp77, tmp30)
    tmp80 = 2.0
    tmp81 = tmp79 * tmp80
    tmp82 = tmp78 * tmp81
    tmp83 = 0.0
    tmp84 = tmp78 <= tmp83
    tl.store(out_ptr1 + (x3 + (3456*x2)), tmp76, xmask)
    tl.store(out_ptr2 + (x4), tmp82, xmask)
    tl.store(out_ptr3 + (x3 + (3456*x2)), tmp84, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/vb/cvbrjpmxxhjhkj64pt3j3gyja7ep7mslmmxwykci7y3izu36im3d.py
# Topologically Sorted Source Nodes: [conv2d_1], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv2d_1 => convolution_1
# Graph fragment:
#   %convolution_1 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%mul, %primals_4, %primals_5, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_3 = async_compile.triton('triton_poi_fused_convolution_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=[2097152], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_3', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_3(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1548800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 3025) % 128
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + (x3), tmp2, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/ht/chtnebfwoh5bwjbfyltkvba6l626ornsdteusxke5my5hvlqhz4l.py
# Topologically Sorted Source Nodes: [x_3], Original ATen: [aten.bernoulli]
# Source node to ATen node mapping:
#   x_3 => bernoulli_1
# Graph fragment:
#   %bernoulli_1 : [num_users=2] = call_function[target=torch.ops.aten.bernoulli.p](args = (%empty_1, 0.8), kwargs = {})
triton_poi_fused_bernoulli_4 = async_compile.triton('triton_poi_fused_bernoulli_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=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bernoulli_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_bernoulli_4(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 = float("nan")
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/bw/cbwb2zqdgsw5gembbwepx73ba4re4jyvkqfgbe57ohs5sxalcbmg.py
# Topologically Sorted Source Nodes: [max_pool2d_1, x_2, x_3], Original ATen: [aten.max_pool2d_with_indices, aten.relu, aten.div, aten.mul, aten.threshold_backward]
# Source node to ATen node mapping:
#   max_pool2d_1 => _low_memory_max_pool2d_with_offsets_1, getitem_3
#   x_2 => relu_1
#   x_3 => div_1, mul_1
# Graph fragment:
#   %_low_memory_max_pool2d_with_offsets_1 : [num_users=2] = call_function[target=torch.ops.prims._low_memory_max_pool2d_with_offsets.default](args = (%convolution_1, [4, 4], [1, 1], [0, 0], [1, 1], False), kwargs = {})
#   %getitem_3 : [num_users=1] = call_function[target=operator.getitem](args = (%_low_memory_max_pool2d_with_offsets_1, 1), kwargs = {})
#   %relu_1 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%getitem_2,), kwargs = {})
#   %div_1 : [num_users=1] = call_function[target=torch.ops.aten.div.Scalar](args = (%bernoulli_1, 0.8), kwargs = {})
#   %mul_1 : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%relu_1, %div_1), kwargs = {})
#   %le_3 : [num_users=1] = call_function[target=torch.ops.aten.le.Scalar](args = (%relu_1, 0), kwargs = {})
triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_5 = async_compile.triton('triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_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=[2097152], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*i8', 3: '*fp32', 4: '*i1', 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_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_5', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 17, '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_div_max_pool2d_with_indices_mul_relu_threshold_backward_5(in_ptr0, in_ptr1, out_ptr1, out_ptr2, out_ptr3, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1384448
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 52
    x1 = (xindex // 52) % 52
    x2 = (xindex // 2704)
    x3 = xindex % 2704
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (55*x1) + (3025*x2)), None)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + (55*x1) + (3025*x2)), None)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + (55*x1) + (3025*x2)), None)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + (55*x1) + (3025*x2)), None)
    tmp7 = tl.load(in_ptr0 + (55 + x0 + (55*x1) + (3025*x2)), None)
    tmp9 = tl.load(in_ptr0 + (56 + x0 + (55*x1) + (3025*x2)), None)
    tmp11 = tl.load(in_ptr0 + (57 + x0 + (55*x1) + (3025*x2)), None)
    tmp13 = tl.load(in_ptr0 + (58 + x0 + (55*x1) + (3025*x2)), None)
    tmp15 = tl.load(in_ptr0 + (110 + x0 + (55*x1) + (3025*x2)), None)
    tmp17 = tl.load(in_ptr0 + (111 + x0 + (55*x1) + (3025*x2)), None)
    tmp19 = tl.load(in_ptr0 + (112 + x0 + (55*x1) + (3025*x2)), None)
    tmp21 = tl.load(in_ptr0 + (113 + x0 + (55*x1) + (3025*x2)), None)
    tmp23 = tl.load(in_ptr0 + (165 + x0 + (55*x1) + (3025*x2)), None)
    tmp25 = tl.load(in_ptr0 + (166 + x0 + (55*x1) + (3025*x2)), None)
    tmp27 = tl.load(in_ptr0 + (167 + x0 + (55*x1) + (3025*x2)), None)
    tmp29 = tl.load(in_ptr0 + (168 + x0 + (55*x1) + (3025*x2)), None)
    tmp79 = tl.load(in_ptr1 + (x2), None, eviction_policy='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp22 = triton_helpers.maximum(tmp21, tmp20)
    tmp24 = triton_helpers.maximum(tmp23, tmp22)
    tmp26 = triton_helpers.maximum(tmp25, tmp24)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tmp30 = triton_helpers.maximum(tmp29, tmp28)
    tmp31 = tmp1 > tmp0
    tmp32 = tl.full([1], 1, tl.int8)
    tmp33 = tl.full([1], 0, tl.int8)
    tmp34 = tl.where(tmp31, tmp32, tmp33)
    tmp35 = tmp3 > tmp2
    tmp36 = tl.full([1], 2, tl.int8)
    tmp37 = tl.where(tmp35, tmp36, tmp34)
    tmp38 = tmp5 > tmp4
    tmp39 = tl.full([1], 3, tl.int8)
    tmp40 = tl.where(tmp38, tmp39, tmp37)
    tmp41 = tmp7 > tmp6
    tmp42 = tl.full([1], 4, tl.int8)
    tmp43 = tl.where(tmp41, tmp42, tmp40)
    tmp44 = tmp9 > tmp8
    tmp45 = tl.full([1], 5, tl.int8)
    tmp46 = tl.where(tmp44, tmp45, tmp43)
    tmp47 = tmp11 > tmp10
    tmp48 = tl.full([1], 6, tl.int8)
    tmp49 = tl.where(tmp47, tmp48, tmp46)
    tmp50 = tmp13 > tmp12
    tmp51 = tl.full([1], 7, tl.int8)
    tmp52 = tl.where(tmp50, tmp51, tmp49)
    tmp53 = tmp15 > tmp14
    tmp54 = tl.full([1], 8, tl.int8)
    tmp55 = tl.where(tmp53, tmp54, tmp52)
    tmp56 = tmp17 > tmp16
    tmp57 = tl.full([1], 9, tl.int8)
    tmp58 = tl.where(tmp56, tmp57, tmp55)
    tmp59 = tmp19 > tmp18
    tmp60 = tl.full([1], 10, tl.int8)
    tmp61 = tl.where(tmp59, tmp60, tmp58)
    tmp62 = tmp21 > tmp20
    tmp63 = tl.full([1], 11, tl.int8)
    tmp64 = tl.where(tmp62, tmp63, tmp61)
    tmp65 = tmp23 > tmp22
    tmp66 = tl.full([1], 12, tl.int8)
    tmp67 = tl.where(tmp65, tmp66, tmp64)
    tmp68 = tmp25 > tmp24
    tmp69 = tl.full([1], 13, tl.int8)
    tmp70 = tl.where(tmp68, tmp69, tmp67)
    tmp71 = tmp27 > tmp26
    tmp72 = tl.full([1], 14, tl.int8)
    tmp73 = tl.where(tmp71, tmp72, tmp70)
    tmp74 = tmp29 > tmp28
    tmp75 = tl.full([1], 15, tl.int8)
    tmp76 = tl.where(tmp74, tmp75, tmp73)
    tmp77 = tl.full([1], 0, tl.int32)
    tmp78 = triton_helpers.maximum(tmp77, tmp30)
    tmp80 = 1.25
    tmp81 = tmp79 * tmp80
    tmp82 = tmp78 * tmp81
    tmp83 = 0.0
    tmp84 = tmp78 <= tmp83
    tl.store(out_ptr1 + (x3 + (2816*x2)), tmp76, None)
    tl.store(out_ptr2 + (x4), tmp82, None)
    tl.store(out_ptr3 + (x3 + (2816*x2)), tmp84, None)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/px/cpx7b5kbi2az6idrqrqye3gbzcsofkxgkadgqq7l4h5uzsqhgjwr.py
# Topologically Sorted Source Nodes: [conv2d_2], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv2d_2 => convolution_2
# Graph fragment:
#   %convolution_2 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%mul_1, %primals_6, %primals_7, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_6 = async_compile.triton('triton_poi_fused_convolution_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=[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_convolution_6', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_6(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 614656
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 2401) % 64
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + (x3), tmp2, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/gb/cgbjfl3uoarkxaduyjy7chioeckc4igywl4k2a7ocatzisatny44.py
# Topologically Sorted Source Nodes: [avg_pool2d, x_4, x_5], Original ATen: [aten.avg_pool2d, aten.relu, aten.div, aten.mul, aten.threshold_backward]
# Source node to ATen node mapping:
#   avg_pool2d => avg_pool2d
#   x_4 => relu_2
#   x_5 => div_2, mul_2
# Graph fragment:
#   %avg_pool2d : [num_users=1] = call_function[target=torch.ops.aten.avg_pool2d.default](args = (%convolution_2, [4, 4], [1, 1]), kwargs = {})
#   %relu_2 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%avg_pool2d,), kwargs = {})
#   %div_2 : [num_users=1] = call_function[target=torch.ops.aten.div.Scalar](args = (%bernoulli_2, 0.9), kwargs = {})
#   %mul_2 : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%relu_2, %div_2), kwargs = {})
#   %le_2 : [num_users=1] = call_function[target=torch.ops.aten.le.Scalar](args = (%relu_2, 0), kwargs = {})
triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7 = async_compile.triton('triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[1048576], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*i1', 4: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 17, '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_pool2d_div_mul_relu_threshold_backward_7(in_ptr0, in_ptr1, out_ptr1, out_ptr2, xnumel, XBLOCK : tl.constexpr):
    xnumel = 541696
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 46
    x1 = (xindex // 46) % 46
    x2 = (xindex // 2116)
    x3 = xindex % 2116
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + (49*x1) + (2401*x2)), xmask)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp7 = tl.load(in_ptr0 + (49 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp9 = tl.load(in_ptr0 + (50 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp11 = tl.load(in_ptr0 + (51 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp13 = tl.load(in_ptr0 + (52 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp15 = tl.load(in_ptr0 + (98 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp17 = tl.load(in_ptr0 + (99 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp19 = tl.load(in_ptr0 + (100 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp21 = tl.load(in_ptr0 + (101 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp23 = tl.load(in_ptr0 + (147 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp25 = tl.load(in_ptr0 + (148 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp27 = tl.load(in_ptr0 + (149 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp29 = tl.load(in_ptr0 + (150 + x0 + (49*x1) + (2401*x2)), xmask)
    tmp35 = tl.load(in_ptr1 + (x2), xmask, 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
    tmp16 = tmp15 + tmp14
    tmp18 = tmp17 + tmp16
    tmp20 = tmp19 + tmp18
    tmp22 = tmp21 + tmp20
    tmp24 = tmp23 + tmp22
    tmp26 = tmp25 + tmp24
    tmp28 = tmp27 + tmp26
    tmp30 = tmp29 + tmp28
    tmp31 = 0.0625
    tmp32 = tmp30 * tmp31
    tmp33 = tl.full([1], 0, tl.int32)
    tmp34 = triton_helpers.maximum(tmp33, tmp32)
    tmp36 = 1.1111111111111112
    tmp37 = tmp35 * tmp36
    tmp38 = tmp34 * tmp37
    tmp39 = 0.0
    tmp40 = tmp34 <= tmp39
    tl.store(out_ptr1 + (x4), tmp38, xmask)
    tl.store(out_ptr2 + (x3 + (2176*x2)), tmp40, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/6f/c6fnjlbcou2s22iusn7thngj72lkjna5hlpio3j3hstnmk6h3eki.py
# Topologically Sorted Source Nodes: [conv2d_3], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv2d_3 => convolution_3
# Graph fragment:
#   %convolution_3 : [num_users=2] = call_function[target=torch.ops.aten.convolution.default](args = (%mul_2, %primals_8, %primals_9, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
triton_poi_fused_convolution_8 = async_compile.triton('triton_poi_fused_convolution_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=[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_convolution_8', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_8(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 236672
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 1849) % 32
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + (x3), tmp2, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/mw/cmwamdxl3cynqtvmli6qboba4clt7cnclvtmgabto6teyfiz5jte.py
# Topologically Sorted Source Nodes: [avg_pool2d_1, x_6], Original ATen: [aten.avg_pool2d, aten.relu, aten.threshold_backward]
# Source node to ATen node mapping:
#   avg_pool2d_1 => avg_pool2d_1
#   x_6 => relu_3
# Graph fragment:
#   %avg_pool2d_1 : [num_users=1] = call_function[target=torch.ops.aten.avg_pool2d.default](args = (%convolution_3, [4, 4], [1, 1]), kwargs = {})
#   %relu_3 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%avg_pool2d_1,), kwargs = {})
#   %le_1 : [num_users=1] = call_function[target=torch.ops.aten.le.Scalar](args = (%relu_3, 0), kwargs = {})
triton_poi_fused_avg_pool2d_relu_threshold_backward_9 = async_compile.triton('triton_poi_fused_avg_pool2d_relu_threshold_backward_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: '*i1', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_avg_pool2d_relu_threshold_backward_9', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 16, '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_pool2d_relu_threshold_backward_9(in_out_ptr0, in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 204800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 40
    x1 = (xindex // 40) % 40
    x2 = (xindex // 1600)
    x3 = xindex
    x4 = xindex % 1600
    tmp0 = tl.load(in_ptr0 + (x0 + (43*x1) + (1849*x2)), None)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + (43*x1) + (1849*x2)), None)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + (43*x1) + (1849*x2)), None)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + (43*x1) + (1849*x2)), None)
    tmp7 = tl.load(in_ptr0 + (43 + x0 + (43*x1) + (1849*x2)), None)
    tmp9 = tl.load(in_ptr0 + (44 + x0 + (43*x1) + (1849*x2)), None)
    tmp11 = tl.load(in_ptr0 + (45 + x0 + (43*x1) + (1849*x2)), None)
    tmp13 = tl.load(in_ptr0 + (46 + x0 + (43*x1) + (1849*x2)), None)
    tmp15 = tl.load(in_ptr0 + (86 + x0 + (43*x1) + (1849*x2)), None)
    tmp17 = tl.load(in_ptr0 + (87 + x0 + (43*x1) + (1849*x2)), None)
    tmp19 = tl.load(in_ptr0 + (88 + x0 + (43*x1) + (1849*x2)), None)
    tmp21 = tl.load(in_ptr0 + (89 + x0 + (43*x1) + (1849*x2)), None)
    tmp23 = tl.load(in_ptr0 + (129 + x0 + (43*x1) + (1849*x2)), None)
    tmp25 = tl.load(in_ptr0 + (130 + x0 + (43*x1) + (1849*x2)), None)
    tmp27 = tl.load(in_ptr0 + (131 + x0 + (43*x1) + (1849*x2)), None)
    tmp29 = tl.load(in_ptr0 + (132 + x0 + (43*x1) + (1849*x2)), None)
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp8 = tmp7 + tmp6
    tmp10 = tmp9 + tmp8
    tmp12 = tmp11 + tmp10
    tmp14 = tmp13 + tmp12
    tmp16 = tmp15 + tmp14
    tmp18 = tmp17 + tmp16
    tmp20 = tmp19 + tmp18
    tmp22 = tmp21 + tmp20
    tmp24 = tmp23 + tmp22
    tmp26 = tmp25 + tmp24
    tmp28 = tmp27 + tmp26
    tmp30 = tmp29 + tmp28
    tmp31 = 0.0625
    tmp32 = tmp30 * tmp31
    tmp33 = tl.full([1], 0, tl.int32)
    tmp34 = triton_helpers.maximum(tmp33, tmp32)
    tmp35 = 0.0
    tmp36 = tmp34 <= tmp35
    tl.store(in_out_ptr0 + (x3), tmp34, None)
    tl.store(out_ptr0 + (x4 + (1664*x2)), tmp36, None)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/b7/cb7b4xxsrgsflzk7wy3g23vpuvdyzzdaxzvboxb36pe4pxxbzfyl.py
# Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.relu]
# Source node to ATen node mapping:
#   x_8 => relu_4
# Graph fragment:
#   %add_tensor_1 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mm_default_1, %primals_11), kwargs = {})
#   %relu_4 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%add_tensor_1,), kwargs = {})
triton_poi_fused_relu_10 = async_compile.triton('triton_poi_fused_relu_10', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[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_relu_10', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_relu_10(in_out_ptr0, in_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)
    x2 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_out_ptr0 + (x2), None)
    tmp1 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + (x2), tmp4, None)
''', device_str='cuda')


# kernel path: runs/run_shard_4/inductor_cache/c6/cc6k2tzcobacndv5pxyl2svet2jkaujhgohdb4me3hv6wqaw6mi7.py
# Topologically Sorted Source Nodes: [x_9], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   x_9 => sigmoid
# Graph fragment:
#   %add_tensor : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mm_default, %primals_13), kwargs = {})
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%add_tensor,), kwargs = {})
triton_poi_fused_sigmoid_11 = async_compile.triton('triton_poi_fused_sigmoid_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=[2048], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_11', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_sigmoid_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 2048
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + (x2), None)
    tmp1 = tl.load(in_ptr0 + (x0), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.sigmoid(tmp2)
    tl.store(in_out_ptr0 + (x2), tmp3, None)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13 = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_2, (64, 3, 4, 4), (48, 16, 4, 1))
    assert_size_stride(primals_3, (64, ), (1, ))
    assert_size_stride(primals_4, (128, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_5, (128, ), (1, ))
    assert_size_stride(primals_6, (64, 128, 4, 4), (2048, 16, 4, 1))
    assert_size_stride(primals_7, (64, ), (1, ))
    assert_size_stride(primals_8, (32, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_9, (32, ), (1, ))
    assert_size_stride(primals_10, (256, 12800), (12800, 1))
    assert_size_stride(primals_11, (256, ), (1, ))
    assert_size_stride(primals_12, (128, 256), (256, 1))
    assert_size_stride(primals_13, (128, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        # Topologically Sorted Source Nodes: [conv2d], Original ATen: [aten.convolution]
        buf0 = extern_kernels.convolution(primals_1, primals_2, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 64, 61, 61), (238144, 3721, 61, 1))
        buf1 = buf0; del buf0  # reuse
        # Topologically Sorted Source Nodes: [conv2d], Original ATen: [aten.convolution]
        stream0 = get_raw_stream(0)
        triton_poi_fused_convolution_0.run(buf1, primals_3, 952576, grid=grid(952576), stream=stream0)
        del primals_3
        buf5 = empty_strided_cuda((4, 64, 1, 1), (64, 1, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_1], Original ATen: [aten.bernoulli]
        triton_poi_fused_bernoulli_1.run(buf5, 256, grid=grid(256), stream=stream0)
        torch.ops.aten.bernoulli_.float(buf5, 0.5)
        buf3 = empty_strided_cuda((4, 64, 58, 58), (221184, 3456, 58, 1), torch.int8)
        buf7 = empty_strided_cuda((4, 64, 58, 58), (215296, 3364, 58, 1), torch.float32)
        buf34 = empty_strided_cuda((4, 64, 58, 58), (221184, 3456, 58, 1), torch.bool)
        # Topologically Sorted Source Nodes: [max_pool2d, x, x_1], Original ATen: [aten.max_pool2d_with_indices, aten.relu, aten.div, aten.mul, aten.threshold_backward]
        triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_2.run(buf1, buf5, buf3, buf7, buf34, 861184, grid=grid(861184), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_1], Original ATen: [aten.convolution]
        buf8 = extern_kernels.convolution(buf7, primals_4, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 128, 55, 55), (387200, 3025, 55, 1))
        buf9 = buf8; del buf8  # reuse
        # Topologically Sorted Source Nodes: [conv2d_1], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_3.run(buf9, primals_5, 1548800, grid=grid(1548800), stream=stream0)
        del primals_5
        buf13 = empty_strided_cuda((4, 128, 1, 1), (128, 1, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_3], Original ATen: [aten.bernoulli]
        triton_poi_fused_bernoulli_4.run(buf13, 512, grid=grid(512), stream=stream0)
        torch.ops.aten.bernoulli_.float(buf13, 0.8)
        buf11 = empty_strided_cuda((4, 128, 52, 52), (360448, 2816, 52, 1), torch.int8)
        buf15 = empty_strided_cuda((4, 128, 52, 52), (346112, 2704, 52, 1), torch.float32)
        buf33 = empty_strided_cuda((4, 128, 52, 52), (360448, 2816, 52, 1), torch.bool)
        # Topologically Sorted Source Nodes: [max_pool2d_1, x_2, x_3], Original ATen: [aten.max_pool2d_with_indices, aten.relu, aten.div, aten.mul, aten.threshold_backward]
        triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_5.run(buf9, buf13, buf11, buf15, buf33, 1384448, grid=grid(1384448), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_2], Original ATen: [aten.convolution]
        buf16 = extern_kernels.convolution(buf15, primals_6, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 64, 49, 49), (153664, 2401, 49, 1))
        buf17 = buf16; del buf16  # reuse
        # Topologically Sorted Source Nodes: [conv2d_2], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_6.run(buf17, primals_7, 614656, grid=grid(614656), stream=stream0)
        del primals_7
        buf20 = empty_strided_cuda((4, 64, 1, 1), (64, 1, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_5], Original ATen: [aten.bernoulli]
        triton_poi_fused_bernoulli_1.run(buf20, 256, grid=grid(256), stream=stream0)
        torch.ops.aten.bernoulli_.float(buf20, 0.9)
        buf22 = empty_strided_cuda((4, 64, 46, 46), (135424, 2116, 46, 1), torch.float32)
        buf32 = empty_strided_cuda((4, 64, 46, 46), (139264, 2176, 46, 1), torch.bool)
        # Topologically Sorted Source Nodes: [avg_pool2d, x_4, x_5], Original ATen: [aten.avg_pool2d, aten.relu, aten.div, aten.mul, aten.threshold_backward]
        triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7.run(buf17, buf20, buf22, buf32, 541696, grid=grid(541696), stream=stream0)
        # Topologically Sorted Source Nodes: [conv2d_3], Original ATen: [aten.convolution]
        buf23 = extern_kernels.convolution(buf22, primals_8, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 32, 43, 43), (59168, 1849, 43, 1))
        buf24 = buf23; del buf23  # reuse
        # Topologically Sorted Source Nodes: [conv2d_3], Original ATen: [aten.convolution]
        triton_poi_fused_convolution_8.run(buf24, primals_9, 236672, grid=grid(236672), stream=stream0)
        del primals_9
        buf25 = empty_strided_cuda((4, 32, 40, 40), (51200, 1600, 40, 1), torch.float32)
        buf26 = buf25; del buf25  # reuse
        buf31 = empty_strided_cuda((4, 32, 40, 40), (53248, 1664, 40, 1), torch.bool)
        # Topologically Sorted Source Nodes: [avg_pool2d_1, x_6], Original ATen: [aten.avg_pool2d, aten.relu, aten.threshold_backward]
        triton_poi_fused_avg_pool2d_relu_threshold_backward_9.run(buf26, buf24, buf31, 204800, grid=grid(204800), stream=stream0)
        buf27 = empty_strided_cuda((16, 256), (256, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(reinterpret_tensor(buf26, (16, 12800), (12800, 1), 0), reinterpret_tensor(primals_10, (12800, 256), (1, 12800), 0), out=buf27)
        buf28 = buf27; del buf27  # reuse
        # Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.relu]
        triton_poi_fused_relu_10.run(buf28, primals_11, 4096, grid=grid(4096), stream=stream0)
        del primals_11
        buf29 = empty_strided_cuda((16, 128), (128, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf28, reinterpret_tensor(primals_12, (256, 128), (1, 256), 0), out=buf29)
        buf30 = buf29; del buf29  # reuse
        # Topologically Sorted Source Nodes: [x_9], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_11.run(buf30, primals_13, 2048, grid=grid(2048), stream=stream0)
        del primals_13
    return (buf30, primals_1, primals_2, primals_4, primals_6, primals_8, buf1, buf3, buf5, buf7, buf9, buf11, buf13, buf15, buf17, buf20, buf22, buf24, reinterpret_tensor(buf26, (16, 12800), (12800, 1), 0), buf28, buf30, primals_12, primals_10, buf31, buf32, buf33, buf34, )


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((64, 3, 4, 4), (48, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((128, 64, 4, 4), (1024, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((64, 128, 4, 4), (2048, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((32, 64, 4, 4), (1024, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((32, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((256, 12800), (12800, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((256, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((128, 256), (256, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((128, ), (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])
    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)

from torch.nn import Module
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import functional


class Embedder(Module):

    def __init__(self, input_size, kernel_sizes):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 64, kernel_size=kernel_sizes[0])
        self.pool1 = nn.MaxPool2d(kernel_size=kernel_sizes[1], stride=1)
        self.conv2 = nn.Conv2d(64, 128, kernel_size=kernel_sizes[2])
        self.pool2 = nn.MaxPool2d(kernel_size=kernel_sizes[3], stride=1)
        self.conv3 = nn.Conv2d(128, 64, kernel_size=kernel_sizes[4])
        self.pool3 = nn.AvgPool2d(kernel_size=kernel_sizes[5], stride=1)
        self.conv4 = nn.Conv2d(64, 32, kernel_size=kernel_sizes[6])
        self.pool4 = nn.AvgPool2d(kernel_size=kernel_sizes[7], stride=1)
        size_reduction = sum(kernel_sizes) - len(kernel_sizes)
        self.fc_input_dimension = (input_size[0] - size_reduction) * (
            input_size[1] - size_reduction) * 32
        self.fc1 = nn.Linear(self.fc_input_dimension, 256)
        self.fc2 = nn.Linear(256, 128)

    def forward(self, x):
        x = Variable(x, requires_grad=False)
        x = functional.relu(self.pool1(self.conv1(x)))
        x = functional.dropout2d(x, p=0.5)
        x = functional.relu(self.pool2(self.conv2(x)))
        x = functional.dropout2d(x, p=0.2)
        x = functional.relu(self.pool3(self.conv3(x)))
        x = functional.dropout2d(x, p=0.1)
        x = functional.relu(self.pool4(self.conv4(x)))
        x = x.view(-1, self.fc_input_dimension)
        x = functional.relu(self.fc1(x))
        x = functional.sigmoid(self.fc2(x))
        return x


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


def get_init_inputs():
    return [[], {'input_size': [4, 4], 'kernel_sizes': [4, 4, 4, 4, 4, 4, 4,
        4]}]

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.nn import Module
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_convolution_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 952576
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 3721 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, xmask)


@triton.jit
def triton_poi_fused_bernoulli_1(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 = float('nan')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_2(
    in_ptr0, in_ptr1, out_ptr1, out_ptr2, out_ptr3, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 861184
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 58
    x1 = xindex // 58 % 58
    x2 = xindex // 3364
    x3 = xindex % 3364
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 61 * x1 + 3721 * x2), xmask)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp7 = tl.load(in_ptr0 + (61 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp9 = tl.load(in_ptr0 + (62 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp11 = tl.load(in_ptr0 + (63 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp13 = tl.load(in_ptr0 + (64 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp15 = tl.load(in_ptr0 + (122 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp17 = tl.load(in_ptr0 + (123 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp19 = tl.load(in_ptr0 + (124 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp21 = tl.load(in_ptr0 + (125 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp23 = tl.load(in_ptr0 + (183 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp25 = tl.load(in_ptr0 + (184 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp27 = tl.load(in_ptr0 + (185 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp29 = tl.load(in_ptr0 + (186 + x0 + 61 * x1 + 3721 * x2), xmask)
    tmp79 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp22 = triton_helpers.maximum(tmp21, tmp20)
    tmp24 = triton_helpers.maximum(tmp23, tmp22)
    tmp26 = triton_helpers.maximum(tmp25, tmp24)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tmp30 = triton_helpers.maximum(tmp29, tmp28)
    tmp31 = tmp1 > tmp0
    tmp32 = tl.full([1], 1, tl.int8)
    tmp33 = tl.full([1], 0, tl.int8)
    tmp34 = tl.where(tmp31, tmp32, tmp33)
    tmp35 = tmp3 > tmp2
    tmp36 = tl.full([1], 2, tl.int8)
    tmp37 = tl.where(tmp35, tmp36, tmp34)
    tmp38 = tmp5 > tmp4
    tmp39 = tl.full([1], 3, tl.int8)
    tmp40 = tl.where(tmp38, tmp39, tmp37)
    tmp41 = tmp7 > tmp6
    tmp42 = tl.full([1], 4, tl.int8)
    tmp43 = tl.where(tmp41, tmp42, tmp40)
    tmp44 = tmp9 > tmp8
    tmp45 = tl.full([1], 5, tl.int8)
    tmp46 = tl.where(tmp44, tmp45, tmp43)
    tmp47 = tmp11 > tmp10
    tmp48 = tl.full([1], 6, tl.int8)
    tmp49 = tl.where(tmp47, tmp48, tmp46)
    tmp50 = tmp13 > tmp12
    tmp51 = tl.full([1], 7, tl.int8)
    tmp52 = tl.where(tmp50, tmp51, tmp49)
    tmp53 = tmp15 > tmp14
    tmp54 = tl.full([1], 8, tl.int8)
    tmp55 = tl.where(tmp53, tmp54, tmp52)
    tmp56 = tmp17 > tmp16
    tmp57 = tl.full([1], 9, tl.int8)
    tmp58 = tl.where(tmp56, tmp57, tmp55)
    tmp59 = tmp19 > tmp18
    tmp60 = tl.full([1], 10, tl.int8)
    tmp61 = tl.where(tmp59, tmp60, tmp58)
    tmp62 = tmp21 > tmp20
    tmp63 = tl.full([1], 11, tl.int8)
    tmp64 = tl.where(tmp62, tmp63, tmp61)
    tmp65 = tmp23 > tmp22
    tmp66 = tl.full([1], 12, tl.int8)
    tmp67 = tl.where(tmp65, tmp66, tmp64)
    tmp68 = tmp25 > tmp24
    tmp69 = tl.full([1], 13, tl.int8)
    tmp70 = tl.where(tmp68, tmp69, tmp67)
    tmp71 = tmp27 > tmp26
    tmp72 = tl.full([1], 14, tl.int8)
    tmp73 = tl.where(tmp71, tmp72, tmp70)
    tmp74 = tmp29 > tmp28
    tmp75 = tl.full([1], 15, tl.int8)
    tmp76 = tl.where(tmp74, tmp75, tmp73)
    tmp77 = tl.full([1], 0, tl.int32)
    tmp78 = triton_helpers.maximum(tmp77, tmp30)
    tmp80 = 2.0
    tmp81 = tmp79 * tmp80
    tmp82 = tmp78 * tmp81
    tmp83 = 0.0
    tmp84 = tmp78 <= tmp83
    tl.store(out_ptr1 + (x3 + 3456 * x2), tmp76, xmask)
    tl.store(out_ptr2 + x4, tmp82, xmask)
    tl.store(out_ptr3 + (x3 + 3456 * x2), tmp84, xmask)


@triton.jit
def triton_poi_fused_convolution_3(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 1548800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 3025 % 128
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, xmask)


@triton.jit
def triton_poi_fused_bernoulli_4(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 = float('nan')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_5(
    in_ptr0, in_ptr1, out_ptr1, out_ptr2, out_ptr3, xnumel, XBLOCK: tl.
    constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex % 52
    x1 = xindex // 52 % 52
    x2 = xindex // 2704
    x3 = xindex % 2704
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 55 * x1 + 3025 * x2), None)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + 55 * x1 + 3025 * x2), None)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + 55 * x1 + 3025 * x2), None)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + 55 * x1 + 3025 * x2), None)
    tmp7 = tl.load(in_ptr0 + (55 + x0 + 55 * x1 + 3025 * x2), None)
    tmp9 = tl.load(in_ptr0 + (56 + x0 + 55 * x1 + 3025 * x2), None)
    tmp11 = tl.load(in_ptr0 + (57 + x0 + 55 * x1 + 3025 * x2), None)
    tmp13 = tl.load(in_ptr0 + (58 + x0 + 55 * x1 + 3025 * x2), None)
    tmp15 = tl.load(in_ptr0 + (110 + x0 + 55 * x1 + 3025 * x2), None)
    tmp17 = tl.load(in_ptr0 + (111 + x0 + 55 * x1 + 3025 * x2), None)
    tmp19 = tl.load(in_ptr0 + (112 + x0 + 55 * x1 + 3025 * x2), None)
    tmp21 = tl.load(in_ptr0 + (113 + x0 + 55 * x1 + 3025 * x2), None)
    tmp23 = tl.load(in_ptr0 + (165 + x0 + 55 * x1 + 3025 * x2), None)
    tmp25 = tl.load(in_ptr0 + (166 + x0 + 55 * x1 + 3025 * x2), None)
    tmp27 = tl.load(in_ptr0 + (167 + x0 + 55 * x1 + 3025 * x2), None)
    tmp29 = tl.load(in_ptr0 + (168 + x0 + 55 * x1 + 3025 * x2), None)
    tmp79 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp2 = triton_helpers.maximum(tmp1, tmp0)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = triton_helpers.maximum(tmp5, tmp4)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = triton_helpers.maximum(tmp9, tmp8)
    tmp12 = triton_helpers.maximum(tmp11, tmp10)
    tmp14 = triton_helpers.maximum(tmp13, tmp12)
    tmp16 = triton_helpers.maximum(tmp15, tmp14)
    tmp18 = triton_helpers.maximum(tmp17, tmp16)
    tmp20 = triton_helpers.maximum(tmp19, tmp18)
    tmp22 = triton_helpers.maximum(tmp21, tmp20)
    tmp24 = triton_helpers.maximum(tmp23, tmp22)
    tmp26 = triton_helpers.maximum(tmp25, tmp24)
    tmp28 = triton_helpers.maximum(tmp27, tmp26)
    tmp30 = triton_helpers.maximum(tmp29, tmp28)
    tmp31 = tmp1 > tmp0
    tmp32 = tl.full([1], 1, tl.int8)
    tmp33 = tl.full([1], 0, tl.int8)
    tmp34 = tl.where(tmp31, tmp32, tmp33)
    tmp35 = tmp3 > tmp2
    tmp36 = tl.full([1], 2, tl.int8)
    tmp37 = tl.where(tmp35, tmp36, tmp34)
    tmp38 = tmp5 > tmp4
    tmp39 = tl.full([1], 3, tl.int8)
    tmp40 = tl.where(tmp38, tmp39, tmp37)
    tmp41 = tmp7 > tmp6
    tmp42 = tl.full([1], 4, tl.int8)
    tmp43 = tl.where(tmp41, tmp42, tmp40)
    tmp44 = tmp9 > tmp8
    tmp45 = tl.full([1], 5, tl.int8)
    tmp46 = tl.where(tmp44, tmp45, tmp43)
    tmp47 = tmp11 > tmp10
    tmp48 = tl.full([1], 6, tl.int8)
    tmp49 = tl.where(tmp47, tmp48, tmp46)
    tmp50 = tmp13 > tmp12
    tmp51 = tl.full([1], 7, tl.int8)
    tmp52 = tl.where(tmp50, tmp51, tmp49)
    tmp53 = tmp15 > tmp14
    tmp54 = tl.full([1], 8, tl.int8)
    tmp55 = tl.where(tmp53, tmp54, tmp52)
    tmp56 = tmp17 > tmp16
    tmp57 = tl.full([1], 9, tl.int8)
    tmp58 = tl.where(tmp56, tmp57, tmp55)
    tmp59 = tmp19 > tmp18
    tmp60 = tl.full([1], 10, tl.int8)
    tmp61 = tl.where(tmp59, tmp60, tmp58)
    tmp62 = tmp21 > tmp20
    tmp63 = tl.full([1], 11, tl.int8)
    tmp64 = tl.where(tmp62, tmp63, tmp61)
    tmp65 = tmp23 > tmp22
    tmp66 = tl.full([1], 12, tl.int8)
    tmp67 = tl.where(tmp65, tmp66, tmp64)
    tmp68 = tmp25 > tmp24
    tmp69 = tl.full([1], 13, tl.int8)
    tmp70 = tl.where(tmp68, tmp69, tmp67)
    tmp71 = tmp27 > tmp26
    tmp72 = tl.full([1], 14, tl.int8)
    tmp73 = tl.where(tmp71, tmp72, tmp70)
    tmp74 = tmp29 > tmp28
    tmp75 = tl.full([1], 15, tl.int8)
    tmp76 = tl.where(tmp74, tmp75, tmp73)
    tmp77 = tl.full([1], 0, tl.int32)
    tmp78 = triton_helpers.maximum(tmp77, tmp30)
    tmp80 = 1.25
    tmp81 = tmp79 * tmp80
    tmp82 = tmp78 * tmp81
    tmp83 = 0.0
    tmp84 = tmp78 <= tmp83
    tl.store(out_ptr1 + (x3 + 2816 * x2), tmp76, None)
    tl.store(out_ptr2 + x4, tmp82, None)
    tl.store(out_ptr3 + (x3 + 2816 * x2), tmp84, None)


@triton.jit
def triton_poi_fused_convolution_6(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 614656
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 2401 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, xmask)


@triton.jit
def triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7(in_ptr0,
    in_ptr1, out_ptr1, out_ptr2, xnumel, XBLOCK: tl.constexpr):
    xnumel = 541696
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 46
    x1 = xindex // 46 % 46
    x2 = xindex // 2116
    x3 = xindex % 2116
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (x0 + 49 * x1 + 2401 * x2), xmask)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp7 = tl.load(in_ptr0 + (49 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp9 = tl.load(in_ptr0 + (50 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp11 = tl.load(in_ptr0 + (51 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp13 = tl.load(in_ptr0 + (52 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp15 = tl.load(in_ptr0 + (98 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp17 = tl.load(in_ptr0 + (99 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp19 = tl.load(in_ptr0 + (100 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp21 = tl.load(in_ptr0 + (101 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp23 = tl.load(in_ptr0 + (147 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp25 = tl.load(in_ptr0 + (148 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp27 = tl.load(in_ptr0 + (149 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp29 = tl.load(in_ptr0 + (150 + x0 + 49 * x1 + 2401 * x2), xmask)
    tmp35 = tl.load(in_ptr1 + x2, xmask, 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
    tmp16 = tmp15 + tmp14
    tmp18 = tmp17 + tmp16
    tmp20 = tmp19 + tmp18
    tmp22 = tmp21 + tmp20
    tmp24 = tmp23 + tmp22
    tmp26 = tmp25 + tmp24
    tmp28 = tmp27 + tmp26
    tmp30 = tmp29 + tmp28
    tmp31 = 0.0625
    tmp32 = tmp30 * tmp31
    tmp33 = tl.full([1], 0, tl.int32)
    tmp34 = triton_helpers.maximum(tmp33, tmp32)
    tmp36 = 1.1111111111111112
    tmp37 = tmp35 * tmp36
    tmp38 = tmp34 * tmp37
    tmp39 = 0.0
    tmp40 = tmp34 <= tmp39
    tl.store(out_ptr1 + x4, tmp38, xmask)
    tl.store(out_ptr2 + (x3 + 2176 * x2), tmp40, xmask)


@triton.jit
def triton_poi_fused_convolution_8(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 236672
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 1849 % 32
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, xmask)


@triton.jit
def triton_poi_fused_avg_pool2d_relu_threshold_backward_9(in_out_ptr0,
    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 % 40
    x1 = xindex // 40 % 40
    x2 = xindex // 1600
    x3 = xindex
    x4 = xindex % 1600
    tmp0 = tl.load(in_ptr0 + (x0 + 43 * x1 + 1849 * x2), None)
    tmp1 = tl.load(in_ptr0 + (1 + x0 + 43 * x1 + 1849 * x2), None)
    tmp3 = tl.load(in_ptr0 + (2 + x0 + 43 * x1 + 1849 * x2), None)
    tmp5 = tl.load(in_ptr0 + (3 + x0 + 43 * x1 + 1849 * x2), None)
    tmp7 = tl.load(in_ptr0 + (43 + x0 + 43 * x1 + 1849 * x2), None)
    tmp9 = tl.load(in_ptr0 + (44 + x0 + 43 * x1 + 1849 * x2), None)
    tmp11 = tl.load(in_ptr0 + (45 + x0 + 43 * x1 + 1849 * x2), None)
    tmp13 = tl.load(in_ptr0 + (46 + x0 + 43 * x1 + 1849 * x2), None)
    tmp15 = tl.load(in_ptr0 + (86 + x0 + 43 * x1 + 1849 * x2), None)
    tmp17 = tl.load(in_ptr0 + (87 + x0 + 43 * x1 + 1849 * x2), None)
    tmp19 = tl.load(in_ptr0 + (88 + x0 + 43 * x1 + 1849 * x2), None)
    tmp21 = tl.load(in_ptr0 + (89 + x0 + 43 * x1 + 1849 * x2), None)
    tmp23 = tl.load(in_ptr0 + (129 + x0 + 43 * x1 + 1849 * x2), None)
    tmp25 = tl.load(in_ptr0 + (130 + x0 + 43 * x1 + 1849 * x2), None)
    tmp27 = tl.load(in_ptr0 + (131 + x0 + 43 * x1 + 1849 * x2), None)
    tmp29 = tl.load(in_ptr0 + (132 + x0 + 43 * x1 + 1849 * x2), None)
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp8 = tmp7 + tmp6
    tmp10 = tmp9 + tmp8
    tmp12 = tmp11 + tmp10
    tmp14 = tmp13 + tmp12
    tmp16 = tmp15 + tmp14
    tmp18 = tmp17 + tmp16
    tmp20 = tmp19 + tmp18
    tmp22 = tmp21 + tmp20
    tmp24 = tmp23 + tmp22
    tmp26 = tmp25 + tmp24
    tmp28 = tmp27 + tmp26
    tmp30 = tmp29 + tmp28
    tmp31 = 0.0625
    tmp32 = tmp30 * tmp31
    tmp33 = tl.full([1], 0, tl.int32)
    tmp34 = triton_helpers.maximum(tmp33, tmp32)
    tmp35 = 0.0
    tmp36 = tmp34 <= tmp35
    tl.store(in_out_ptr0 + x3, tmp34, None)
    tl.store(out_ptr0 + (x4 + 1664 * x2), tmp36, None)


@triton.jit
def triton_poi_fused_relu_10(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x2, tmp4, None)


@triton.jit
def triton_poi_fused_sigmoid_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + x0, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.sigmoid(tmp2)
    tl.store(in_out_ptr0 + x2, tmp3, None)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13) = args
    args.clear()
    assert_size_stride(primals_1, (4, 3, 64, 64), (12288, 4096, 64, 1))
    assert_size_stride(primals_2, (64, 3, 4, 4), (48, 16, 4, 1))
    assert_size_stride(primals_3, (64,), (1,))
    assert_size_stride(primals_4, (128, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_5, (128,), (1,))
    assert_size_stride(primals_6, (64, 128, 4, 4), (2048, 16, 4, 1))
    assert_size_stride(primals_7, (64,), (1,))
    assert_size_stride(primals_8, (32, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_9, (32,), (1,))
    assert_size_stride(primals_10, (256, 12800), (12800, 1))
    assert_size_stride(primals_11, (256,), (1,))
    assert_size_stride(primals_12, (128, 256), (256, 1))
    assert_size_stride(primals_13, (128,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_1, primals_2, stride=(1, 
            1), padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 64, 61, 61), (238144, 3721, 61, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_0[grid(952576)](buf1, primals_3, 
            952576, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_3
        buf5 = empty_strided_cuda((4, 64, 1, 1), (64, 1, 1, 1), torch.float32)
        triton_poi_fused_bernoulli_1[grid(256)](buf5, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        torch.ops.aten.bernoulli_.float(buf5, 0.5)
        buf3 = empty_strided_cuda((4, 64, 58, 58), (221184, 3456, 58, 1),
            torch.int8)
        buf7 = empty_strided_cuda((4, 64, 58, 58), (215296, 3364, 58, 1),
            torch.float32)
        buf34 = empty_strided_cuda((4, 64, 58, 58), (221184, 3456, 58, 1),
            torch.bool)
        triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_2[
            grid(861184)](buf1, buf5, buf3, buf7, buf34, 861184, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf8 = extern_kernels.convolution(buf7, primals_4, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 128, 55, 55), (387200, 3025, 55, 1))
        buf9 = buf8
        del buf8
        triton_poi_fused_convolution_3[grid(1548800)](buf9, primals_5, 
            1548800, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_5
        buf13 = empty_strided_cuda((4, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        triton_poi_fused_bernoulli_4[grid(512)](buf13, 512, XBLOCK=128,
            num_warps=4, num_stages=1)
        torch.ops.aten.bernoulli_.float(buf13, 0.8)
        buf11 = empty_strided_cuda((4, 128, 52, 52), (360448, 2816, 52, 1),
            torch.int8)
        buf15 = empty_strided_cuda((4, 128, 52, 52), (346112, 2704, 52, 1),
            torch.float32)
        buf33 = empty_strided_cuda((4, 128, 52, 52), (360448, 2816, 52, 1),
            torch.bool)
        triton_poi_fused_div_max_pool2d_with_indices_mul_relu_threshold_backward_5[
            grid(1384448)](buf9, buf13, buf11, buf15, buf33, 1384448,
            XBLOCK=512, num_warps=8, num_stages=1)
        buf16 = extern_kernels.convolution(buf15, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 64, 49, 49), (153664, 2401, 49, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_convolution_6[grid(614656)](buf17, primals_7, 
            614656, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_7
        buf20 = empty_strided_cuda((4, 64, 1, 1), (64, 1, 1, 1), torch.float32)
        triton_poi_fused_bernoulli_1[grid(256)](buf20, 256, XBLOCK=128,
            num_warps=4, num_stages=1)
        torch.ops.aten.bernoulli_.float(buf20, 0.9)
        buf22 = empty_strided_cuda((4, 64, 46, 46), (135424, 2116, 46, 1),
            torch.float32)
        buf32 = empty_strided_cuda((4, 64, 46, 46), (139264, 2176, 46, 1),
            torch.bool)
        triton_poi_fused_avg_pool2d_div_mul_relu_threshold_backward_7[grid(
            541696)](buf17, buf20, buf22, buf32, 541696, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf23 = extern_kernels.convolution(buf22, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 32, 43, 43), (59168, 1849, 43, 1))
        buf24 = buf23
        del buf23
        triton_poi_fused_convolution_8[grid(236672)](buf24, primals_9, 
            236672, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_9
        buf25 = empty_strided_cuda((4, 32, 40, 40), (51200, 1600, 40, 1),
            torch.float32)
        buf26 = buf25
        del buf25
        buf31 = empty_strided_cuda((4, 32, 40, 40), (53248, 1664, 40, 1),
            torch.bool)
        triton_poi_fused_avg_pool2d_relu_threshold_backward_9[grid(204800)](
            buf26, buf24, buf31, 204800, XBLOCK=512, num_warps=8, num_stages=1)
        buf27 = empty_strided_cuda((16, 256), (256, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf26, (16, 12800), (12800, 1),
            0), reinterpret_tensor(primals_10, (12800, 256), (1, 12800), 0),
            out=buf27)
        buf28 = buf27
        del buf27
        triton_poi_fused_relu_10[grid(4096)](buf28, primals_11, 4096,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_11
        buf29 = empty_strided_cuda((16, 128), (128, 1), torch.float32)
        extern_kernels.mm(buf28, reinterpret_tensor(primals_12, (256, 128),
            (1, 256), 0), out=buf29)
        buf30 = buf29
        del buf29
        triton_poi_fused_sigmoid_11[grid(2048)](buf30, primals_13, 2048,
            XBLOCK=256, num_warps=4, num_stages=1)
        del primals_13
    return (buf30, primals_1, primals_2, primals_4, primals_6, primals_8,
        buf1, buf3, buf5, buf7, buf9, buf11, buf13, buf15, buf17, buf20,
        buf22, buf24, reinterpret_tensor(buf26, (16, 12800), (12800, 1), 0),
        buf28, buf30, primals_12, primals_10, buf31, buf32, buf33, buf34)


class EmbedderNew(Module):

    def __init__(self, input_size, kernel_sizes):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 64, kernel_size=kernel_sizes[0])
        self.pool1 = nn.MaxPool2d(kernel_size=kernel_sizes[1], stride=1)
        self.conv2 = nn.Conv2d(64, 128, kernel_size=kernel_sizes[2])
        self.pool2 = nn.MaxPool2d(kernel_size=kernel_sizes[3], stride=1)
        self.conv3 = nn.Conv2d(128, 64, kernel_size=kernel_sizes[4])
        self.pool3 = nn.AvgPool2d(kernel_size=kernel_sizes[5], stride=1)
        self.conv4 = nn.Conv2d(64, 32, kernel_size=kernel_sizes[6])
        self.pool4 = nn.AvgPool2d(kernel_size=kernel_sizes[7], stride=1)
        size_reduction = sum(kernel_sizes) - len(kernel_sizes)
        self.fc_input_dimension = (input_size[0] - size_reduction) * (
            input_size[1] - size_reduction) * 32
        self.fc1 = nn.Linear(self.fc_input_dimension, 256)
        self.fc2 = nn.Linear(256, 128)

    def forward(self, input_0):
        primals_2 = self.conv1.weight
        primals_3 = self.conv1.bias
        primals_4 = self.conv2.weight
        primals_5 = self.conv2.bias
        primals_6 = self.conv3.weight
        primals_7 = self.conv3.bias
        primals_8 = self.conv4.weight
        primals_9 = self.conv4.bias
        primals_10 = self.fc1.weight
        primals_11 = self.fc1.bias
        primals_12 = self.fc2.weight
        primals_13 = self.fc2.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])
        return output[0]
