# AOT ID: ['0_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: runs/run_shard_7/inductor_cache/qz/cqza6p5fjiie2hfiu5dfjqqugrnzziwuwxzlhzy2aa7khopxjbym.py
# Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_1 => amax, exp, sub
# Graph fragment:
#   %amax : [num_users=1] = call_function[target=torch.ops.aten.amax.default](args = (%arg0_1, [1], True), kwargs = {})
#   %sub : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg0_1, %amax), kwargs = {})
#   %exp : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%sub,), kwargs = {})
triton_poi_fused__softmax_0 = async_compile.triton('triton_poi_fused__softmax_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=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__softmax_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__softmax_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = (xindex // 64)
    tmp0 = tl.load(in_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp9 = tl_math.exp(tmp8)
    tl.store(out_ptr0 + (x3), tmp9, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ga/cgahq34yrt3v74l236yedk7764k7jrezl35evmzcje2yan25jd5e.py
# Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_1 => sum_1
# Graph fragment:
#   %sum_1 : [num_users=2] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp, [1], True), kwargs = {})
#   %ge_scalar_8 : [num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%sum_1, 0), kwargs = {})
#   %scalar_tensor_default_8 : [num_users=2] = call_function[target=torch.ops.aten.scalar_tensor.default](args = (1,), kwargs = {dtype: torch.float32, device: cuda:0, pin_memory: False})
#   %neg_default_8 : [num_users=1] = call_function[target=torch.ops.aten.neg.default](args = (%scalar_tensor_default_8,), kwargs = {})
#   %where_self_8 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%ge_scalar_8, %scalar_tensor_default_8, %neg_default_8), kwargs = {})
#   %mul_tensor_16 : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%exp, %where_self_8), kwargs = {})
triton_poi_fused__softmax_1 = async_compile.triton('triton_poi_fused__softmax_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: '*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__softmax_1', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__softmax_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = (xindex // 64)
    tmp0 = tl.load(in_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 + tmp4
    tmp7 = tmp5 + tmp6
    tmp8 = 0.0
    tmp9 = tmp7 >= tmp8
    tmp10 = 1.0
    tmp11 = -1.0
    tmp12 = tl.where(tmp9, tmp10, tmp11)
    tmp13 = tmp0 * tmp12
    tl.store(out_ptr0 + (x3), tmp13, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/sc/cscqzjutvxo35wa6di2g5kqpqbvvxhhqcwgn2ydegnc5lda4qhlq.py
# Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_1 => sum_1
# Graph fragment:
#   %sum_1 : [num_users=2] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp, [1], True), kwargs = {})
#   %ge_scalar_8 : [num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%sum_1, 0), kwargs = {})
#   %scalar_tensor_default_8 : [num_users=2] = call_function[target=torch.ops.aten.scalar_tensor.default](args = (1,), kwargs = {dtype: torch.float32, device: cuda:0, pin_memory: False})
#   %neg_default_8 : [num_users=1] = call_function[target=torch.ops.aten.neg.default](args = (%scalar_tensor_default_8,), kwargs = {})
#   %where_self_8 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%ge_scalar_8, %scalar_tensor_default_8, %neg_default_8), kwargs = {})
#   %amax_default_8 : [num_users=1] = call_function[target=torch.ops.aten.amax.default](args = (%mul_tensor_16, [1], True), kwargs = {})
#   %sub_tensor_8 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%mul_tensor_16, %amax_default_8), kwargs = {})
#   %mul_tensor_17 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%where_self_8, %sum_1), kwargs = {})
#   %div_tensor_8 : [num_users=1] = call_function[target=torch.ops.aten.div.Tensor](args = (%sub_tensor_8, %mul_tensor_17), kwargs = {})
triton_poi_fused__softmax_2 = async_compile.triton('triton_poi_fused__softmax_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=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 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__softmax_2', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, '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__softmax_2(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = (xindex // 64)
    tmp0 = tl.load(in_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr1 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr1 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp12 = tl.load(in_ptr1 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr1 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp11 = tmp9 + tmp10
    tmp13 = tmp11 + tmp12
    tmp15 = tmp13 + tmp14
    tmp16 = 0.0
    tmp17 = tmp15 >= tmp16
    tmp18 = 1.0
    tmp19 = -1.0
    tmp20 = tl.where(tmp17, tmp18, tmp19)
    tmp21 = tmp20 * tmp15
    tmp22 = tmp8 / tmp21
    tl.store(out_ptr0 + (x3), tmp22, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/2r/c2rj5ehdmhghbz3qp2wm5h5rn34ifphadgmgguawzgkjovuvf4ia.py
# Topologically Sorted Source Nodes: [input_2], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_2 => exp_1, sum_2
# Graph fragment:
#   %exp_1 : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%div_tensor_8,), kwargs = {})
#   %sum_2 : [num_users=2] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp_1, [1], True), kwargs = {})
#   %ge_scalar_7 : [num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%sum_2, 0), kwargs = {})
#   %scalar_tensor_default_7 : [num_users=2] = call_function[target=torch.ops.aten.scalar_tensor.default](args = (1,), kwargs = {dtype: torch.float32, device: cuda:0, pin_memory: False})
#   %neg_default_7 : [num_users=1] = call_function[target=torch.ops.aten.neg.default](args = (%scalar_tensor_default_7,), kwargs = {})
#   %where_self_7 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%ge_scalar_7, %scalar_tensor_default_7, %neg_default_7), kwargs = {})
#   %mul_tensor_14 : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%exp_1, %where_self_7), kwargs = {})
triton_poi_fused__softmax_3 = async_compile.triton('triton_poi_fused__softmax_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=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused__softmax_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 5, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused__softmax_3(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = (xindex // 64)
    tmp0 = tl.load(in_ptr0 + (x3), xmask)
    tmp2 = tl.load(in_ptr0 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp7 = tl.load(in_ptr0 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr0 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp1 = tl_math.exp(tmp0)
    tmp3 = tl_math.exp(tmp2)
    tmp5 = tl_math.exp(tmp4)
    tmp6 = tmp3 + tmp5
    tmp8 = tl_math.exp(tmp7)
    tmp9 = tmp6 + tmp8
    tmp11 = tl_math.exp(tmp10)
    tmp12 = tmp9 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 >= tmp13
    tmp15 = 1.0
    tmp16 = -1.0
    tmp17 = tl.where(tmp14, tmp15, tmp16)
    tmp18 = tmp1 * tmp17
    tl.store(out_ptr0 + (x3), tmp18, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/qi/cqigfrsdwdtmxhi4s3eux3qmyt6wtjipddy26uyfyqicfx5si4fo.py
# Topologically Sorted Source Nodes: [input_2], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_2 => exp_1, sum_2
# Graph fragment:
#   %exp_1 : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%div_tensor_8,), kwargs = {})
#   %sum_2 : [num_users=2] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp_1, [1], True), kwargs = {})
#   %ge_scalar_7 : [num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%sum_2, 0), kwargs = {})
#   %scalar_tensor_default_7 : [num_users=2] = call_function[target=torch.ops.aten.scalar_tensor.default](args = (1,), kwargs = {dtype: torch.float32, device: cuda:0, pin_memory: False})
#   %neg_default_7 : [num_users=1] = call_function[target=torch.ops.aten.neg.default](args = (%scalar_tensor_default_7,), kwargs = {})
#   %where_self_7 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%ge_scalar_7, %scalar_tensor_default_7, %neg_default_7), kwargs = {})
#   %amax_default_7 : [num_users=1] = call_function[target=torch.ops.aten.amax.default](args = (%mul_tensor_14, [1], True), kwargs = {})
#   %sub_tensor_7 : [num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%mul_tensor_14, %amax_default_7), kwargs = {})
#   %mul_tensor_15 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%where_self_7, %sum_2), kwargs = {})
#   %div_tensor_7 : [num_users=1] = call_function[target=torch.ops.aten.div.Tensor](args = (%sub_tensor_7, %mul_tensor_15), kwargs = {})
triton_poi_fused__softmax_4 = async_compile.triton('triton_poi_fused__softmax_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=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 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__softmax_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 9, '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__softmax_4(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = (xindex // 64)
    tmp0 = tl.load(in_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr1 + (x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr1 + (16 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp14 = tl.load(in_ptr1 + (32 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp17 = tl.load(in_ptr1 + (48 + x0 + (64*x2)), xmask, eviction_policy='evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp10 = tl_math.exp(tmp9)
    tmp12 = tl_math.exp(tmp11)
    tmp13 = tmp10 + tmp12
    tmp15 = tl_math.exp(tmp14)
    tmp16 = tmp13 + tmp15
    tmp18 = tl_math.exp(tmp17)
    tmp19 = tmp16 + tmp18
    tmp20 = 0.0
    tmp21 = tmp19 >= tmp20
    tmp22 = 1.0
    tmp23 = -1.0
    tmp24 = tl.where(tmp21, tmp22, tmp23)
    tmp25 = tmp24 * tmp19
    tmp26 = tmp8 / tmp25
    tl.store(out_ptr0 + (x3), tmp26, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/im/cim43mjcigo36ly72rxidw72w3kjijavjxo2t6wcjdcwgtxk46ii.py
# Topologically Sorted Source Nodes: [input_10], Original ATen: [aten._softmax]
# Source node to ATen node mapping:
#   input_10 => div_9, exp_9, sum_10
# Graph fragment:
#   %exp_9 : [num_users=2] = call_function[target=torch.ops.aten.exp.default](args = (%div_tensor,), kwargs = {})
#   %sum_10 : [num_users=1] = call_function[target=torch.ops.aten.sum.dim_IntList](args = (%exp_9, [1], True), kwargs = {})
#   %div_9 : [num_users=1] = call_function[target=torch.ops.aten.div.Tensor](args = (%exp_9, %sum_10), kwargs = {})
triton_poi_fused__softmax_5 = async_compile.triton('triton_poi_fused__softmax_5', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

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


async_compile.wait(globals())
del async_compile

def call(args):
    arg0_1, = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
        stream0 = get_raw_stream(0)
        triton_poi_fused__softmax_0.run(arg0_1, buf0, 256, grid=grid(256), stream=stream0)
        del arg0_1
        buf1 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_1.run(buf0, buf1, 256, grid=grid(256), stream=stream0)
        buf2 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [input_1], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_2.run(buf1, buf0, buf2, 256, grid=grid(256), stream=stream0)
        buf3 = buf1; del buf1  # reuse
        # Topologically Sorted Source Nodes: [input_2], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf2, buf3, 256, grid=grid(256), stream=stream0)
        buf4 = buf0; del buf0  # reuse
        # Topologically Sorted Source Nodes: [input_2], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf3, buf2, buf4, 256, grid=grid(256), stream=stream0)
        buf5 = buf3; del buf3  # reuse
        # Topologically Sorted Source Nodes: [input_3], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf4, buf5, 256, grid=grid(256), stream=stream0)
        buf6 = buf2; del buf2  # reuse
        # Topologically Sorted Source Nodes: [input_3], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf5, buf4, buf6, 256, grid=grid(256), stream=stream0)
        buf7 = buf5; del buf5  # reuse
        # Topologically Sorted Source Nodes: [input_4], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf6, buf7, 256, grid=grid(256), stream=stream0)
        buf8 = buf4; del buf4  # reuse
        # Topologically Sorted Source Nodes: [input_4], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf7, buf6, buf8, 256, grid=grid(256), stream=stream0)
        buf9 = buf7; del buf7  # reuse
        # Topologically Sorted Source Nodes: [input_5], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf8, buf9, 256, grid=grid(256), stream=stream0)
        buf10 = buf6; del buf6  # reuse
        # Topologically Sorted Source Nodes: [input_5], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf9, buf8, buf10, 256, grid=grid(256), stream=stream0)
        buf11 = buf9; del buf9  # reuse
        # Topologically Sorted Source Nodes: [input_6], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf10, buf11, 256, grid=grid(256), stream=stream0)
        buf12 = buf8; del buf8  # reuse
        # Topologically Sorted Source Nodes: [input_6], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf11, buf10, buf12, 256, grid=grid(256), stream=stream0)
        buf13 = buf11; del buf11  # reuse
        # Topologically Sorted Source Nodes: [input_7], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf12, buf13, 256, grid=grid(256), stream=stream0)
        buf14 = buf10; del buf10  # reuse
        # Topologically Sorted Source Nodes: [input_7], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf13, buf12, buf14, 256, grid=grid(256), stream=stream0)
        buf15 = buf13; del buf13  # reuse
        # Topologically Sorted Source Nodes: [input_8], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf14, buf15, 256, grid=grid(256), stream=stream0)
        buf16 = buf12; del buf12  # reuse
        # Topologically Sorted Source Nodes: [input_8], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf15, buf14, buf16, 256, grid=grid(256), stream=stream0)
        buf17 = buf15; del buf15  # reuse
        # Topologically Sorted Source Nodes: [input_9], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_3.run(buf16, buf17, 256, grid=grid(256), stream=stream0)
        buf18 = buf14; del buf14  # reuse
        # Topologically Sorted Source Nodes: [input_9], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_4.run(buf17, buf16, buf18, 256, grid=grid(256), stream=stream0)
        del buf16
        buf19 = buf17; del buf17  # reuse
        # Topologically Sorted Source Nodes: [input_10], Original ATen: [aten._softmax]
        triton_poi_fused__softmax_5.run(buf18, buf19, 256, grid=grid(256), stream=stream0)
        del buf18
    return (buf19, )


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, 4, 4, 4), (64, 16, 4, 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
import torch.nn as nn


class softmax(nn.Module):

    def __init__(self, layer=10, channels=32):
        super(softmax, self).__init__()
        layers = []
        for i in range(layer):
            layers.append(nn.Softmax(dim=1))
        self.layers = nn.Sequential(*layers)

    def forward(self, x):
        return self.layers(x)


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


def get_init_inputs():
    return [[], {}]

import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused__softmax_0(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp9 = tl_math.exp(tmp8)
    tl.store(out_ptr0 + x3, tmp9, xmask)


@triton.jit
def triton_poi_fused__softmax_1(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = tmp1 + tmp2
    tmp5 = tmp3 + tmp4
    tmp7 = tmp5 + tmp6
    tmp8 = 0.0
    tmp9 = tmp7 >= tmp8
    tmp10 = 1.0
    tmp11 = -1.0
    tmp12 = tl.where(tmp9, tmp10, tmp11)
    tmp13 = tmp0 * tmp12
    tl.store(out_ptr0 + x3, tmp13, xmask)


@triton.jit
def triton_poi_fused__softmax_2(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp9 = tl.load(in_ptr1 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp10 = tl.load(in_ptr1 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp12 = tl.load(in_ptr1 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp14 = tl.load(in_ptr1 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp11 = tmp9 + tmp10
    tmp13 = tmp11 + tmp12
    tmp15 = tmp13 + tmp14
    tmp16 = 0.0
    tmp17 = tmp15 >= tmp16
    tmp18 = 1.0
    tmp19 = -1.0
    tmp20 = tl.where(tmp17, tmp18, tmp19)
    tmp21 = tmp20 * tmp15
    tmp22 = tmp8 / tmp21
    tl.store(out_ptr0 + x3, tmp22, xmask)


@triton.jit
def triton_poi_fused__softmax_3(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp2 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp7 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp10 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl_math.exp(tmp0)
    tmp3 = tl_math.exp(tmp2)
    tmp5 = tl_math.exp(tmp4)
    tmp6 = tmp3 + tmp5
    tmp8 = tl_math.exp(tmp7)
    tmp9 = tmp6 + tmp8
    tmp11 = tl_math.exp(tmp10)
    tmp12 = tmp9 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 >= tmp13
    tmp15 = 1.0
    tmp16 = -1.0
    tmp17 = tl.where(tmp14, tmp15, tmp16)
    tmp18 = tmp1 * tmp17
    tl.store(out_ptr0 + x3, tmp18, xmask)


@triton.jit
def triton_poi_fused__softmax_4(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp2 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp9 = tl.load(in_ptr1 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp11 = tl.load(in_ptr1 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp14 = tl.load(in_ptr1 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp17 = tl.load(in_ptr1 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp3 = triton_helpers.maximum(tmp1, tmp2)
    tmp5 = triton_helpers.maximum(tmp3, tmp4)
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp0 - tmp7
    tmp10 = tl_math.exp(tmp9)
    tmp12 = tl_math.exp(tmp11)
    tmp13 = tmp10 + tmp12
    tmp15 = tl_math.exp(tmp14)
    tmp16 = tmp13 + tmp15
    tmp18 = tl_math.exp(tmp17)
    tmp19 = tmp16 + tmp18
    tmp20 = 0.0
    tmp21 = tmp19 >= tmp20
    tmp22 = 1.0
    tmp23 = -1.0
    tmp24 = tl.where(tmp21, tmp22, tmp23)
    tmp25 = tmp24 * tmp19
    tmp26 = tmp8 / tmp25
    tl.store(out_ptr0 + x3, tmp26, xmask)


@triton.jit
def triton_poi_fused__softmax_5(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x0 = xindex % 16
    x2 = xindex // 64
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp2 = tl.load(in_ptr0 + (x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr0 + (16 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp7 = tl.load(in_ptr0 + (32 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp10 = tl.load(in_ptr0 + (48 + x0 + 64 * x2), xmask, eviction_policy=
        'evict_last')
    tmp1 = tl_math.exp(tmp0)
    tmp3 = tl_math.exp(tmp2)
    tmp5 = tl_math.exp(tmp4)
    tmp6 = tmp3 + tmp5
    tmp8 = tl_math.exp(tmp7)
    tmp9 = tmp6 + tmp8
    tmp11 = tl_math.exp(tmp10)
    tmp12 = tmp9 + tmp11
    tmp13 = tmp1 / tmp12
    tl.store(out_ptr0 + x3, tmp13, xmask)


def call(args):
    arg0_1, = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused__softmax_0[grid(256)](arg0_1, buf0, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del arg0_1
        buf1 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused__softmax_1[grid(256)](buf0, buf1, 256, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf2 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused__softmax_2[grid(256)](buf1, buf0, buf2, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf3 = buf1
        del buf1
        triton_poi_fused__softmax_3[grid(256)](buf2, buf3, 256, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf4 = buf0
        del buf0
        triton_poi_fused__softmax_4[grid(256)](buf3, buf2, buf4, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf5 = buf3
        del buf3
        triton_poi_fused__softmax_3[grid(256)](buf4, buf5, 256, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf6 = buf2
        del buf2
        triton_poi_fused__softmax_4[grid(256)](buf5, buf4, buf6, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf7 = buf5
        del buf5
        triton_poi_fused__softmax_3[grid(256)](buf6, buf7, 256, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf8 = buf4
        del buf4
        triton_poi_fused__softmax_4[grid(256)](buf7, buf6, buf8, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf9 = buf7
        del buf7
        triton_poi_fused__softmax_3[grid(256)](buf8, buf9, 256, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf10 = buf6
        del buf6
        triton_poi_fused__softmax_4[grid(256)](buf9, buf8, buf10, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf11 = buf9
        del buf9
        triton_poi_fused__softmax_3[grid(256)](buf10, buf11, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf12 = buf8
        del buf8
        triton_poi_fused__softmax_4[grid(256)](buf11, buf10, buf12, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf13 = buf11
        del buf11
        triton_poi_fused__softmax_3[grid(256)](buf12, buf13, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf14 = buf10
        del buf10
        triton_poi_fused__softmax_4[grid(256)](buf13, buf12, buf14, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf15 = buf13
        del buf13
        triton_poi_fused__softmax_3[grid(256)](buf14, buf15, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf16 = buf12
        del buf12
        triton_poi_fused__softmax_4[grid(256)](buf15, buf14, buf16, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf17 = buf15
        del buf15
        triton_poi_fused__softmax_3[grid(256)](buf16, buf17, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        buf18 = buf14
        del buf14
        triton_poi_fused__softmax_4[grid(256)](buf17, buf16, buf18, 256,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf16
        buf19 = buf17
        del buf17
        triton_poi_fused__softmax_5[grid(256)](buf18, buf19, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del buf18
    return buf19,


class softmaxNew(nn.Module):

    def __init__(self, layer=10, channels=32):
        super(softmaxNew, self).__init__()
        layers = []
        for i in range(layer):
            layers.append(nn.Softmax(dim=1))
        self.layers = nn.Sequential(*layers)

    def forward(self, input_0):
        arg0_1 = input_0
        output = call([arg0_1])
        return output[0]
