import torch
import torch.nn as nn

class Linear_sigmoid(nn.Module):

    def __init__(self, dim_in, dim_out, bias=True):
        super().__init__()
        self.linear = nn.Linear(dim_in, dim_out, bias=bias)
        self.activation = nn.Sigmoid()

    def forward(self, x):
        out = self.linear(x)
        out = self.activation(out)
        return out

batch_size = 16
channels = 64
height = 32
width = 224

def get_inputs():
    a = torch.rand(batch_size, channels, height, width)
    return [a]

def get_init_inputs():
    return [[], {'dim_in': 224, 'dim_out': 4}]

# AOT ID: ['106_inference']
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: /tmp/triton_gen_ene3tz6k/65/c65p3yzml4ui3ycsbwqqybc6cm7fyx45f6zo2j4dbvpohi4cjrqx.py
# Topologically Sorted Source Nodes: [out_1], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   out_1 => sigmoid
# Graph fragment:
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%view_1,), kwargs = {})
triton_poi_fused_sigmoid_0 = async_compile.triton('triton_', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[131072],
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_0', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'ACB470BEFDE58A90F00079B5434325E87B6B4313CA4901D1EAFBC23641D24150', '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_(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 131072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 4
    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):
    arg0_1, arg1_1, arg2_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 224), (224, 1))
    assert_size_stride(arg1_1, (4, ), (1, ))
    assert_size_stride(arg2_1, (16, 64, 32, 224), (458752, 7168, 224, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((32768, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(reinterpret_tensor(arg2_1, (32768, 224), (224, 1), 0), reinterpret_tensor(arg0_1, (224, 4), (1, 224), 0), out=buf0)
        del arg0_1
        del arg2_1
        buf1 = reinterpret_tensor(buf0, (16, 64, 32, 4), (8192, 128, 4, 1), 0); del buf0  # reuse
        # Topologically Sorted Source Nodes: [out_1], Original ATen: [aten.sigmoid]
        stream0 = get_raw_stream(0)
        triton_poi_fused_sigmoid_0.run(buf1, arg1_1, 131072, grid=grid(131072), stream=stream0)
        del arg1_1
    return (buf1, )

def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    arg0_1 = rand_strided((4, 224), (224, 1), device='cuda:0', dtype=torch.float32)
    arg1_1 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg2_1 = rand_strided((16, 64, 32, 224), (458752, 7168, 224, 1), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([arg0_1, arg1_1, arg2_1])
    return print_performance(fn, times=times, repeat=repeat)

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

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
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_sigmoid_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 131072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 4
    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):
    arg0_1, arg1_1, arg2_1 = args
    args.clear()
    assert_size_stride(arg0_1, (4, 224), (224, 1))
    assert_size_stride(arg1_1, (4, ), (1, ))
    assert_size_stride(arg2_1, (16, 64, 32, 224), (458752, 7168, 224, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((32768, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(arg2_1, (32768, 224), (224, 1), 0), reinterpret_tensor(arg0_1, (224, 4), (1, 224), 0), out=buf0)
        del arg0_1
        del arg2_1
        buf1 = reinterpret_tensor(buf0, (16, 64, 32, 4), (8192, 128, 4, 1), 0); del buf0  # reuse
        stream0 = get_raw_stream(0)
        triton_poi_fused_sigmoid_0[grid(131072)](buf1, arg1_1, 131072, XBLOCK=1024)
        del arg1_1
    return (buf1, )

class Linear_sigmoid(nn.Module):

    def __init__(self, dim_in, dim_out, bias=True):
        super().__init__()
        self.linear = nn.Linear(dim_in, dim_out, bias=bias)
        self.activation = nn.Sigmoid()

    def forward(self, x):
        out = self.linear(x)
        out = self.activation(out)
        return out


import math
import torch
from torch import nn
import torch.nn.functional as F

class MaxPool2dDynamicSamePadding(nn.MaxPool2d):
    """2D MaxPooling like TensorFlow's 'SAME' mode, with a dynamic image size.
       The padding is operated in forward function by calculating dynamically.
    """

    def __init__(self, kernel_size, stride, padding=0, dilation=1,
        return_indices=False, ceil_mode=False):
        super().__init__(kernel_size, stride, padding, dilation,
            return_indices, ceil_mode)
        self.stride = [self.stride] * 2 if isinstance(self.stride, int
            ) else self.stride
        self.kernel_size = [self.kernel_size] * 2 if isinstance(self.
            kernel_size, int) else self.kernel_size
        self.dilation = [self.dilation] * 2 if isinstance(self.dilation, int
            ) else self.dilation

    def forward(self, x):
        ih, iw = x.size()[-2:]
        kh, kw = self.kernel_size
        sh, sw = self.stride
        oh, ow = math.ceil(ih / sh), math.ceil(iw / sw)
        pad_h = max((oh - 1) * self.stride[0] + (kh - 1) * self.dilation[0] +
            1 - ih, 0)
        pad_w = max((ow - 1) * self.stride[1] + (kw - 1) * self.dilation[1] +
            1 - iw, 0)
        if pad_h > 0 or pad_w > 0:
            x = F.pad(x, [pad_w // 2, pad_w - pad_w // 2, pad_h // 2, pad_h -
                pad_h // 2])
        return F.max_pool2d(x, self.kernel_size, self.stride, self.padding,
            self.dilation, self.ceil_mode, self.return_indices)

batch_size = 32
channels = 16
height = 128
width = 16

def get_inputs():
    a = torch.rand(batch_size, channels, height, width)
    return [a]

def get_init_inputs():
    return [[], {'kernel_size': 4, 'stride': 1}]

# AOT ID: ['111_inference']
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: /tmp/triton_gen_2d_soaf1/xd/cxdqj6tarww7awlygbxeglfufduxm6n5mnyncnhr7fmf2xgyzn62.py
# Topologically Sorted Source Nodes: [max_pool2d], Original ATen: [aten.max_pool2d_with_indices]
# Source node to ATen node mapping:
#   max_pool2d => getitem
# Graph fragment:
#   %getitem : [num_users=1] = call_function[target=operator.getitem](args = (%_low_memory_max_pool2d_with_offsets, 0), kwargs = {})
triton_poi_fused_max_pool2d_with_indices_0 = async_compile.triton('triton_', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[1048576],
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=90, major=9, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=132), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_pool2d_with_indices_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 16, 'num_reduction': 0, 'backend_hash': 'ACB470BEFDE58A90F00079B5434325E87B6B4313CA4901D1EAFBC23641D24150', '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_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1048576
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 16) % 128
    x0 = xindex % 16
    x4 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 128, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = (-1) + x0
    tmp6 = tmp5 >= tmp1
    tmp7 = tl.full([1], 16, tl.int64)
    tmp8 = tmp5 < tmp7
    tmp9 = tmp2 & tmp4
    tmp10 = tmp9 & tmp6
    tmp11 = tmp10 & tmp8
    tmp12 = tl.load(in_ptr0 + ((-17) + x4), tmp11, other=0.0)
    tmp13 = x0
    tmp14 = tmp13 >= tmp1
    tmp15 = tmp13 < tmp7
    tmp16 = tmp9 & tmp14
    tmp17 = tmp16 & tmp15
    tmp18 = tl.load(in_ptr0 + ((-16) + x4), tmp17, other=0.0)
    tmp19 = triton_helpers.maximum(tmp18, tmp12)
    tmp20 = 1 + x0
    tmp21 = tmp20 >= tmp1
    tmp22 = tmp20 < tmp7
    tmp23 = tmp9 & tmp21
    tmp24 = tmp23 & tmp22
    tmp25 = tl.load(in_ptr0 + ((-15) + x4), tmp24, other=0.0)
    tmp26 = triton_helpers.maximum(tmp25, tmp19)
    tmp27 = 2 + x0
    tmp28 = tmp27 >= tmp1
    tmp29 = tmp27 < tmp7
    tmp30 = tmp9 & tmp28
    tmp31 = tmp30 & tmp29
    tmp32 = tl.load(in_ptr0 + ((-14) + x4), tmp31, other=0.0)
    tmp33 = triton_helpers.maximum(tmp32, tmp26)
    tmp34 = x1
    tmp35 = tmp34 >= tmp1
    tmp36 = tmp34 < tmp3
    tmp37 = tmp35 & tmp36
    tmp38 = tmp37 & tmp6
    tmp39 = tmp38 & tmp8
    tmp40 = tl.load(in_ptr0 + ((-1) + x4), tmp39, other=0.0)
    tmp41 = triton_helpers.maximum(tmp40, tmp33)
    tmp42 = tmp37 & tmp14
    tmp43 = tmp42 & tmp15
    tmp44 = tl.load(in_ptr0 + (x4), tmp43, other=0.0)
    tmp45 = triton_helpers.maximum(tmp44, tmp41)
    tmp46 = tmp37 & tmp21
    tmp47 = tmp46 & tmp22
    tmp48 = tl.load(in_ptr0 + (1 + x4), tmp47, other=0.0)
    tmp49 = triton_helpers.maximum(tmp48, tmp45)
    tmp50 = tmp37 & tmp28
    tmp51 = tmp50 & tmp29
    tmp52 = tl.load(in_ptr0 + (2 + x4), tmp51, other=0.0)
    tmp53 = triton_helpers.maximum(tmp52, tmp49)
    tmp54 = 1 + x1
    tmp55 = tmp54 >= tmp1
    tmp56 = tmp54 < tmp3
    tmp57 = tmp55 & tmp56
    tmp58 = tmp57 & tmp6
    tmp59 = tmp58 & tmp8
    tmp60 = tl.load(in_ptr0 + (15 + x4), tmp59, other=0.0)
    tmp61 = triton_helpers.maximum(tmp60, tmp53)
    tmp62 = tmp57 & tmp14
    tmp63 = tmp62 & tmp15
    tmp64 = tl.load(in_ptr0 + (16 + x4), tmp63, other=0.0)
    tmp65 = triton_helpers.maximum(tmp64, tmp61)
    tmp66 = tmp57 & tmp21
    tmp67 = tmp66 & tmp22
    tmp68 = tl.load(in_ptr0 + (17 + x4), tmp67, other=0.0)
    tmp69 = triton_helpers.maximum(tmp68, tmp65)
    tmp70 = tmp57 & tmp28
    tmp71 = tmp70 & tmp29
    tmp72 = tl.load(in_ptr0 + (18 + x4), tmp71, other=0.0)
    tmp73 = triton_helpers.maximum(tmp72, tmp69)
    tmp74 = 2 + x1
    tmp75 = tmp74 >= tmp1
    tmp76 = tmp74 < tmp3
    tmp77 = tmp75 & tmp76
    tmp78 = tmp77 & tmp6
    tmp79 = tmp78 & tmp8
    tmp80 = tl.load(in_ptr0 + (31 + x4), tmp79, other=0.0)
    tmp81 = triton_helpers.maximum(tmp80, tmp73)
    tmp82 = tmp77 & tmp14
    tmp83 = tmp82 & tmp15
    tmp84 = tl.load(in_ptr0 + (32 + x4), tmp83, other=0.0)
    tmp85 = triton_helpers.maximum(tmp84, tmp81)
    tmp86 = tmp77 & tmp21
    tmp87 = tmp86 & tmp22
    tmp88 = tl.load(in_ptr0 + (33 + x4), tmp87, other=0.0)
    tmp89 = triton_helpers.maximum(tmp88, tmp85)
    tmp90 = tmp77 & tmp28
    tmp91 = tmp90 & tmp29
    tmp92 = tl.load(in_ptr0 + (34 + x4), tmp91, other=0.0)
    tmp93 = triton_helpers.maximum(tmp92, tmp89)
    tl.store(out_ptr0 + (x4), tmp93, None)
''', device_str='cuda')

async_compile.wait(globals())
del async_compile

def call(args):
    arg0_1, = args
    args.clear()
    assert_size_stride(arg0_1, (32, 16, 128, 16), (32768, 2048, 16, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((32, 16, 128, 16), (32768, 2048, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [max_pool2d], Original ATen: [aten.max_pool2d_with_indices]
        stream0 = get_raw_stream(0)
        triton_poi_fused_max_pool2d_with_indices_0.run(arg0_1, buf0, 1048576, grid=grid(1048576), stream=stream0)
        del arg0_1
    return (buf0, )

def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    arg0_1 = rand_strided((32, 16, 128, 16), (32768, 2048, 16, 1), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([arg0_1])
    return print_performance(fn, times=times, repeat=repeat)

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

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
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_max_pool2d_with_indices_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1048576
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x1 = (xindex // 16) % 128
    x0 = xindex % 16
    x4 = xindex
    tmp0 = (-1) + x1
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 128, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = (-1) + x0
    tmp6 = tmp5 >= tmp1
    tmp7 = tl.full([1], 16, tl.int64)
    tmp8 = tmp5 < tmp7
    tmp9 = tmp2 & tmp4
    tmp10 = tmp9 & tmp6
    tmp11 = tmp10 & tmp8
    tmp12 = tl.load(in_ptr0 + ((-17) + x4), tmp11, other=0.0)
    tmp13 = x0
    tmp14 = tmp13 >= tmp1
    tmp15 = tmp13 < tmp7
    tmp16 = tmp9 & tmp14
    tmp17 = tmp16 & tmp15
    tmp18 = tl.load(in_ptr0 + ((-16) + x4), tmp17, other=0.0)
    tmp19 = triton_helpers.maximum(tmp18, tmp12)
    tmp20 = 1 + x0
    tmp21 = tmp20 >= tmp1
    tmp22 = tmp20 < tmp7
    tmp23 = tmp9 & tmp21
    tmp24 = tmp23 & tmp22
    tmp25 = tl.load(in_ptr0 + ((-15) + x4), tmp24, other=0.0)
    tmp26 = triton_helpers.maximum(tmp25, tmp19)
    tmp27 = 2 + x0
    tmp28 = tmp27 >= tmp1
    tmp29 = tmp27 < tmp7
    tmp30 = tmp9 & tmp28
    tmp31 = tmp30 & tmp29
    tmp32 = tl.load(in_ptr0 + ((-14) + x4), tmp31, other=0.0)
    tmp33 = triton_helpers.maximum(tmp32, tmp26)
    tmp34 = x1
    tmp35 = tmp34 >= tmp1
    tmp36 = tmp34 < tmp3
    tmp37 = tmp35 & tmp36
    tmp38 = tmp37 & tmp6
    tmp39 = tmp38 & tmp8
    tmp40 = tl.load(in_ptr0 + ((-1) + x4), tmp39, other=0.0)
    tmp41 = triton_helpers.maximum(tmp40, tmp33)
    tmp42 = tmp37 & tmp14
    tmp43 = tmp42 & tmp15
    tmp44 = tl.load(in_ptr0 + (x4), tmp43, other=0.0)
    tmp45 = triton_helpers.maximum(tmp44, tmp41)
    tmp46 = tmp37 & tmp21
    tmp47 = tmp46 & tmp22
    tmp48 = tl.load(in_ptr0 + (1 + x4), tmp47, other=0.0)
    tmp49 = triton_helpers.maximum(tmp48, tmp45)
    tmp50 = tmp37 & tmp28
    tmp51 = tmp50 & tmp29
    tmp52 = tl.load(in_ptr0 + (2 + x4), tmp51, other=0.0)
    tmp53 = triton_helpers.maximum(tmp52, tmp49)
    tmp54 = 1 + x1
    tmp55 = tmp54 >= tmp1
    tmp56 = tmp54 < tmp3
    tmp57 = tmp55 & tmp56
    tmp58 = tmp57 & tmp6
    tmp59 = tmp58 & tmp8
    tmp60 = tl.load(in_ptr0 + (15 + x4), tmp59, other=0.0)
    tmp61 = triton_helpers.maximum(tmp60, tmp53)
    tmp62 = tmp57 & tmp14
    tmp63 = tmp62 & tmp15
    tmp64 = tl.load(in_ptr0 + (16 + x4), tmp63, other=0.0)
    tmp65 = triton_helpers.maximum(tmp64, tmp61)
    tmp66 = tmp57 & tmp21
    tmp67 = tmp66 & tmp22
    tmp68 = tl.load(in_ptr0 + (17 + x4), tmp67, other=0.0)
    tmp69 = triton_helpers.maximum(tmp68, tmp65)
    tmp70 = tmp57 & tmp28
    tmp71 = tmp70 & tmp29
    tmp72 = tl.load(in_ptr0 + (18 + x4), tmp71, other=0.0)
    tmp73 = triton_helpers.maximum(tmp72, tmp69)
    tmp74 = 2 + x1
    tmp75 = tmp74 >= tmp1
    tmp76 = tmp74 < tmp3
    tmp77 = tmp75 & tmp76
    tmp78 = tmp77 & tmp6
    tmp79 = tmp78 & tmp8
    tmp80 = tl.load(in_ptr0 + (31 + x4), tmp79, other=0.0)
    tmp81 = triton_helpers.maximum(tmp80, tmp73)
    tmp82 = tmp77 & tmp14
    tmp83 = tmp82 & tmp15
    tmp84 = tl.load(in_ptr0 + (32 + x4), tmp83, other=0.0)
    tmp85 = triton_helpers.maximum(tmp84, tmp81)
    tmp86 = tmp77 & tmp21
    tmp87 = tmp86 & tmp22
    tmp88 = tl.load(in_ptr0 + (33 + x4), tmp87, other=0.0)
    tmp89 = triton_helpers.maximum(tmp88, tmp85)
    tmp90 = tmp77 & tmp28
    tmp91 = tmp90 & tmp29
    tmp92 = tl.load(in_ptr0 + (34 + x4), tmp91, other=0.0)
    tmp93 = triton_helpers.maximum(tmp92, tmp89)
    tl.store(out_ptr0 + (x4), tmp93, None)

def call(args):
    arg0_1, = args
    args.clear()
    assert_size_stride(arg0_1, (32, 16, 128, 16), (32768, 2048, 16, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((32, 16, 128, 16), (32768, 2048, 16, 1), torch.float32)
        stream0 = get_raw_stream(0)
        triton_poi_fused_max_pool2d_with_indices_0[grid(1048576)](arg0_1, buf0, 1048576, XBLOCK=1024)
        del arg0_1
    return (buf0, )