# AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _align as align
from torch import device, empty_strided
from torch._inductor.async_compile import AsyncCompile
from torch._inductor.select_algorithm import extern_kernels
from torch._inductor.codegen.multi_kernel import MultiKernelCall
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid, split_scan_grid, grid_combo_kernels, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_raw_stream

aten = torch.ops.aten
inductor_ops = torch.ops.inductor
_quantized = torch.ops._quantized
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor
alloc_from_pool = torch.ops.inductor._alloc_from_pool
async_compile = AsyncCompile()


# kernel path: runs/run_shard_7/inductor_cache/wg/cwguxhdeqqgwht6qlutmmr5ncuo7umutnqahfwbt7zt6q2wonshs.py
# Topologically Sorted Source Nodes: [conv1d], Original ATen: [aten.convolution]
# Source node to ATen node mapping:
#   conv1d => convolution
# Graph fragment:
#   %convolution : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%permute, %primals_2, %primals_3, [1], [0], [1], False, [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=[32, 8], tile_hint=TileHint.SQUARE,
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32', 3: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK : tl.constexpr, XBLOCK : tl.constexpr):
    ynumel = 24
    xnumel = 6
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 6
    y1 = (yindex // 6)
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + (6*x2) + (36*y1)), xmask & ymask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + (6*y3)), tmp0, xmask & ymask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zw/czwe7kpv64od4d2bqvie4gqc7nedoper42x2xsf3i4wapcoy6xoq.py
# Topologically Sorted Source Nodes: [conv1d, x_1], Original ATen: [aten.convolution, aten.relu]
# Source node to ATen node mapping:
#   conv1d => convolution
#   x_1 => relu
# Graph fragment:
#   %convolution : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%permute, %primals_2, %primals_3, [1], [0], [1], False, [0], 1), kwargs = {})
#   %relu : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%convolution,), kwargs = {})
triton_poi_fused_convolution_relu_1 = async_compile.triton('triton_poi_fused_convolution_relu_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=[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_convolution_relu_1', '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_relu_1(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 6) % 64
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, 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 + (x3), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/bz/cbz6emjblk6z2rjc4eznegb6eo35mlfm4v6jct3ofom6qm22rnkc.py
# Topologically Sorted Source Nodes: [conv1d_1, x_2], Original ATen: [aten.convolution, aten.relu]
# Source node to ATen node mapping:
#   conv1d_1 => convolution_1
#   x_2 => relu_1
# Graph fragment:
#   %convolution_1 : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%relu, %primals_4, %primals_5, [1], [0], [1], False, [0], 1), kwargs = {})
#   %relu_1 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%convolution_1,), kwargs = {})
triton_poi_fused_convolution_relu_2 = async_compile.triton('triton_poi_fused_convolution_relu_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=[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_convolution_relu_2', '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_relu_2(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 3072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = (xindex // 6) % 128
    tmp0 = tl.load(in_out_ptr0 + (x3), xmask)
    tmp1 = tl.load(in_ptr0 + (x1), xmask, 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 + (x3), tmp4, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/g3/cg3x7s6nhvo5zhrrg3i46aicj2ijvh5dztctyqfmumizxvxydxfu.py
# Topologically Sorted Source Nodes: [conv1d_2, x_3, max_1], Original ATen: [aten.convolution, aten.relu, aten.max]
# Source node to ATen node mapping:
#   conv1d_2 => convolution_2
#   max_1 => getitem_1, max_1
#   x_3 => relu_2
# Graph fragment:
#   %convolution_2 : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%relu_1, %primals_6, %primals_7, [1], [0], [1], False, [0], 1), kwargs = {})
#   %relu_2 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%convolution_2,), kwargs = {})
#   %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%relu_2, 2, True), kwargs = {})
#   %getitem_1 : [num_users=1] = call_function[target=operator.getitem](args = (%max_1, 1), kwargs = {})
triton_poi_fused_convolution_max_relu_3 = async_compile.triton('triton_poi_fused_convolution_max_relu_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=[1024], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*i64', 3: '*fp32', 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_convolution_max_relu_3', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 7, '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_max_relu_3(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_ptr0 + (6*x2), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + (x0), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (1 + (6*x2)), xmask, eviction_policy='evict_last')
    tmp23 = tl.load(in_ptr0 + (2 + (6*x2)), xmask, eviction_policy='evict_last')
    tmp40 = tl.load(in_ptr0 + (3 + (6*x2)), xmask, eviction_policy='evict_last')
    tmp57 = tl.load(in_ptr0 + (4 + (6*x2)), xmask, eviction_policy='evict_last')
    tmp74 = tl.load(in_ptr0 + (5 + (6*x2)), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp5 + tmp1
    tmp7 = triton_helpers.maximum(tmp3, tmp6)
    tmp8 = tmp4 > tmp7
    tmp9 = tmp4 == tmp7
    tmp10 = tmp4 != tmp4
    tmp11 = tmp7 != tmp7
    tmp12 = tmp10 > tmp11
    tmp13 = tmp8 | tmp12
    tmp14 = tmp10 & tmp11
    tmp15 = tmp9 | tmp14
    tmp16 = tl.full([1], 0, tl.int64)
    tmp17 = tl.full([1], 1, tl.int64)
    tmp18 = tmp16 < tmp17
    tmp19 = tmp15 & tmp18
    tmp20 = tmp13 | tmp19
    tmp21 = tl.where(tmp20, tmp4, tmp7)
    tmp22 = tl.where(tmp20, tmp16, tmp17)
    tmp24 = tmp23 + tmp1
    tmp25 = triton_helpers.maximum(tmp3, tmp24)
    tmp26 = tmp21 > tmp25
    tmp27 = tmp21 == tmp25
    tmp28 = tmp21 != tmp21
    tmp29 = tmp25 != tmp25
    tmp30 = tmp28 > tmp29
    tmp31 = tmp26 | tmp30
    tmp32 = tmp28 & tmp29
    tmp33 = tmp27 | tmp32
    tmp34 = tl.full([1], 2, tl.int64)
    tmp35 = tmp22 < tmp34
    tmp36 = tmp33 & tmp35
    tmp37 = tmp31 | tmp36
    tmp38 = tl.where(tmp37, tmp21, tmp25)
    tmp39 = tl.where(tmp37, tmp22, tmp34)
    tmp41 = tmp40 + tmp1
    tmp42 = triton_helpers.maximum(tmp3, tmp41)
    tmp43 = tmp38 > tmp42
    tmp44 = tmp38 == tmp42
    tmp45 = tmp38 != tmp38
    tmp46 = tmp42 != tmp42
    tmp47 = tmp45 > tmp46
    tmp48 = tmp43 | tmp47
    tmp49 = tmp45 & tmp46
    tmp50 = tmp44 | tmp49
    tmp51 = tl.full([1], 3, tl.int64)
    tmp52 = tmp39 < tmp51
    tmp53 = tmp50 & tmp52
    tmp54 = tmp48 | tmp53
    tmp55 = tl.where(tmp54, tmp38, tmp42)
    tmp56 = tl.where(tmp54, tmp39, tmp51)
    tmp58 = tmp57 + tmp1
    tmp59 = triton_helpers.maximum(tmp3, tmp58)
    tmp60 = tmp55 > tmp59
    tmp61 = tmp55 == tmp59
    tmp62 = tmp55 != tmp55
    tmp63 = tmp59 != tmp59
    tmp64 = tmp62 > tmp63
    tmp65 = tmp60 | tmp64
    tmp66 = tmp62 & tmp63
    tmp67 = tmp61 | tmp66
    tmp68 = tl.full([1], 4, tl.int64)
    tmp69 = tmp56 < tmp68
    tmp70 = tmp67 & tmp69
    tmp71 = tmp65 | tmp70
    tmp72 = tl.where(tmp71, tmp55, tmp59)
    tmp73 = tl.where(tmp71, tmp56, tmp68)
    tmp75 = tmp74 + tmp1
    tmp76 = triton_helpers.maximum(tmp3, tmp75)
    tmp77 = tmp72 > tmp76
    tmp78 = tmp72 == tmp76
    tmp79 = tmp72 != tmp72
    tmp80 = tmp76 != tmp76
    tmp81 = tmp79 > tmp80
    tmp82 = tmp77 | tmp81
    tmp83 = tmp79 & tmp80
    tmp84 = tmp78 | tmp83
    tmp85 = tl.full([1], 5, tl.int64)
    tmp86 = tmp73 < tmp85
    tmp87 = tmp84 & tmp86
    tmp88 = tmp82 | tmp87
    tmp89 = tl.where(tmp88, tmp72, tmp76)
    tmp90 = tl.where(tmp88, tmp73, tmp85)
    tmp91 = triton_helpers.maximum(tmp4, tmp7)
    tmp92 = triton_helpers.maximum(tmp91, tmp25)
    tmp93 = triton_helpers.maximum(tmp92, tmp42)
    tmp94 = triton_helpers.maximum(tmp93, tmp59)
    tmp95 = triton_helpers.maximum(tmp94, tmp76)
    tl.store(out_ptr0 + (x2), tmp90, xmask)
    tl.store(out_ptr1 + (x2), tmp95, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/3d/c3daizw6k7n3mdqdhvpifdxm2baxmazxb7opdgejzyeaavnbkn3d.py
# Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.relu]
# Source node to ATen node mapping:
#   x_6 => relu_3
# Graph fragment:
#   %add_tensor_1 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mm_default_1, %primals_9), kwargs = {})
#   %relu_3 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%add_tensor_1,), kwargs = {})
triton_poi_fused_relu_4 = async_compile.triton('triton_poi_fused_relu_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: '*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_4', '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_4(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask)
    tmp1 = tl.load(in_ptr0 + (x0), xmask, 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, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zu/czukfjkxdi5wcvpoprukvawk3cywo4tbhqvzkk76a7zuwgrg7b3s.py
# Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.relu]
# Source node to ATen node mapping:
#   x_7 => relu_4
# Graph fragment:
#   %add_tensor : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mm_default, %primals_11), kwargs = {})
#   %relu_4 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%add_tensor,), kwargs = {})
triton_poi_fused_relu_5 = async_compile.triton('triton_poi_fused_relu_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_relu_5', '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_5(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask)
    tmp1 = tl.load(in_ptr0 + (x0), xmask, 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, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/uh/cuhqqkywob23unjggy7yyhrpagxue7gnn7o4c5kez2tbgkvzuo7b.py
# Topologically Sorted Source Nodes: [conv1d_2, x_3], Original ATen: [aten.convolution, aten.relu, aten.threshold_backward]
# Source node to ATen node mapping:
#   conv1d_2 => convolution_2
#   x_3 => relu_2
# Graph fragment:
#   %convolution_2 : [num_users=1] = call_function[target=torch.ops.aten.convolution.default](args = (%relu_1, %primals_6, %primals_7, [1], [0], [1], False, [0], 1), kwargs = {})
#   %relu_2 : [num_users=2] = call_function[target=torch.ops.aten.relu.default](args = (%convolution_2,), kwargs = {})
#   %le_2 : [num_users=1] = call_function[target=torch.ops.aten.le.Scalar](args = (%relu_2, 0), kwargs = {})
triton_poi_fused_convolution_relu_threshold_backward_6 = async_compile.triton('triton_poi_fused_convolution_relu_threshold_backward_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=[8192], 
    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_convolution_relu_threshold_backward_6', 'mutated_arg_names': [], '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_relu_threshold_backward_6(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 6144
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = (xindex // 6) % 256
    tmp0 = tl.load(in_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr1 + (x1), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(out_ptr0 + (x3), tmp6, 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, 6, 6), (36, 6, 1))
    assert_size_stride(primals_2, (64, 6, 1), (6, 1, 1))
    assert_size_stride(primals_3, (64, ), (1, ))
    assert_size_stride(primals_4, (128, 64, 1), (64, 1, 1))
    assert_size_stride(primals_5, (128, ), (1, ))
    assert_size_stride(primals_6, (256, 128, 1), (128, 1, 1))
    assert_size_stride(primals_7, (256, ), (1, ))
    assert_size_stride(primals_8, (128, 256), (256, 1))
    assert_size_stride(primals_9, (128, ), (1, ))
    assert_size_stride(primals_10, (64, 128), (128, 1))
    assert_size_stride(primals_11, (64, ), (1, ))
    assert_size_stride(primals_12, (4, 64), (64, 1))
    assert_size_stride(primals_13, (4, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 6, 6), (36, 6, 1), torch.float32)
        # Topologically Sorted Source Nodes: [conv1d], Original ATen: [aten.convolution]
        stream0 = get_raw_stream(0)
        triton_poi_fused_convolution_0.run(primals_1, buf0, 24, 6, grid=grid(24, 6), stream=stream0)
        # Topologically Sorted Source Nodes: [conv1d], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1,), padding=(0,), dilation=(1,), transposed=False, output_padding=(0,), groups=1, bias=None)
        assert_size_stride(buf1, (4, 64, 6), (384, 6, 1))
        del buf0
        buf2 = buf1; del buf1  # reuse
        # Topologically Sorted Source Nodes: [conv1d, x_1], Original ATen: [aten.convolution, aten.relu]
        triton_poi_fused_convolution_relu_1.run(buf2, primals_3, 1536, grid=grid(1536), stream=stream0)
        del primals_3
        # Topologically Sorted Source Nodes: [conv1d_1], Original ATen: [aten.convolution]
        buf3 = extern_kernels.convolution(buf2, primals_4, stride=(1,), padding=(0,), dilation=(1,), transposed=False, output_padding=(0,), groups=1, bias=None)
        assert_size_stride(buf3, (4, 128, 6), (768, 6, 1))
        buf4 = buf3; del buf3  # reuse
        # Topologically Sorted Source Nodes: [conv1d_1, x_2], Original ATen: [aten.convolution, aten.relu]
        triton_poi_fused_convolution_relu_2.run(buf4, primals_5, 3072, grid=grid(3072), stream=stream0)
        del primals_5
        # Topologically Sorted Source Nodes: [conv1d_2], Original ATen: [aten.convolution]
        buf5 = extern_kernels.convolution(buf4, primals_6, stride=(1,), padding=(0,), dilation=(1,), transposed=False, output_padding=(0,), groups=1, bias=None)
        assert_size_stride(buf5, (4, 256, 6), (1536, 6, 1))
        buf6 = empty_strided_cuda((4, 256, 1), (256, 1, 1), torch.int64)
        buf7 = empty_strided_cuda((4, 256, 1), (256, 1, 1), torch.float32)
        # Topologically Sorted Source Nodes: [conv1d_2, x_3, max_1], Original ATen: [aten.convolution, aten.relu, aten.max]
        triton_poi_fused_convolution_max_relu_3.run(buf5, primals_7, buf6, buf7, 1024, grid=grid(1024), stream=stream0)
        buf8 = empty_strided_cuda((4, 128), (128, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(reinterpret_tensor(buf7, (4, 256), (256, 1), 0), reinterpret_tensor(primals_8, (256, 128), (1, 256), 0), out=buf8)
        buf9 = buf8; del buf8  # reuse
        # Topologically Sorted Source Nodes: [x_6], Original ATen: [aten.relu]
        triton_poi_fused_relu_4.run(buf9, primals_9, 512, grid=grid(512), stream=stream0)
        del primals_9
        buf10 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf9, reinterpret_tensor(primals_10, (128, 64), (1, 128), 0), out=buf10)
        buf11 = buf10; del buf10  # reuse
        # Topologically Sorted Source Nodes: [x_7], Original ATen: [aten.relu]
        triton_poi_fused_relu_5.run(buf11, primals_11, 256, grid=grid(256), stream=stream0)
        del primals_11
        buf12 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x_8], Original ATen: [aten.addmm]
        extern_kernels.addmm(primals_13, buf11, reinterpret_tensor(primals_12, (64, 4), (1, 64), 0), alpha=1, beta=1, out=buf12)
        del primals_13
        buf13 = empty_strided_cuda((4, 256, 6), (1536, 6, 1), torch.bool)
        # Topologically Sorted Source Nodes: [conv1d_2, x_3], Original ATen: [aten.convolution, aten.relu, aten.threshold_backward]
        triton_poi_fused_convolution_relu_threshold_backward_6.run(buf5, primals_7, buf13, 6144, grid=grid(6144), stream=stream0)
        del buf5
        del primals_7
    return (buf12, primals_2, primals_4, primals_6, reinterpret_tensor(primals_1, (4, 6, 6), (36, 1, 6), 0), buf2, buf4, buf6, reinterpret_tensor(buf7, (4, 256), (256, 1), 0), buf9, buf11, primals_12, primals_10, primals_8, buf13, )


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, 6, 6), (36, 6, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((64, 6, 1), (6, 1, 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, 1), (64, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((256, 128, 1), (128, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((256, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((128, 256), (256, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((128, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((64, 128), (128, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((4, 64), (64, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((4, ), (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)

import torch
import torch.nn as nn
import torch.nn.functional as F


class spectral_model(nn.Module):

    def __init__(self, num_classes):
        super(spectral_model, self).__init__()
        self.mlp1 = nn.Conv1d(6, 64, 1)
        self.mlp2 = nn.Conv1d(64, 128, 1)
        self.mlp3 = nn.Conv1d(128, 256, 1)
        self.flatten = nn.Flatten()
        self.fc1 = nn.Linear(256, 128)
        self.fc2 = nn.Linear(128, 64)
        self.fc3 = nn.Linear(64, num_classes)

    def forward(self, x):
        x = x.permute(0, 2, 1)
        x = F.relu(self.mlp1(x))
        x = F.relu(self.mlp2(x))
        x = F.relu(self.mlp3(x))
        x = torch.max(x, 2, keepdim=True)[0]
        x = self.flatten(x)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.fc3(x)
        return x


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


def get_init_inputs():
    return [[], {'num_classes': 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
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_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 24
    xnumel = 6
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 6
    y1 = yindex // 6
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 6 * x2 + 36 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 6 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_relu_1(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 1536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 6 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, 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 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_2(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 3072
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 6 % 128
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, 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 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_max_relu_3(in_ptr0, in_ptr1, out_ptr0,
    out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 256
    tmp0 = tl.load(in_ptr0 + 6 * x2, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (1 + 6 * x2), xmask, eviction_policy='evict_last')
    tmp23 = tl.load(in_ptr0 + (2 + 6 * x2), xmask, eviction_policy='evict_last'
        )
    tmp40 = tl.load(in_ptr0 + (3 + 6 * x2), xmask, eviction_policy='evict_last'
        )
    tmp57 = tl.load(in_ptr0 + (4 + 6 * x2), xmask, eviction_policy='evict_last'
        )
    tmp74 = tl.load(in_ptr0 + (5 + 6 * x2), xmask, eviction_policy='evict_last'
        )
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp6 = tmp5 + tmp1
    tmp7 = triton_helpers.maximum(tmp3, tmp6)
    tmp8 = tmp4 > tmp7
    tmp9 = tmp4 == tmp7
    tmp10 = tmp4 != tmp4
    tmp11 = tmp7 != tmp7
    tmp12 = tmp10 > tmp11
    tmp13 = tmp8 | tmp12
    tmp14 = tmp10 & tmp11
    tmp15 = tmp9 | tmp14
    tmp16 = tl.full([1], 0, tl.int64)
    tmp17 = tl.full([1], 1, tl.int64)
    tmp18 = tmp16 < tmp17
    tmp19 = tmp15 & tmp18
    tmp20 = tmp13 | tmp19
    tmp21 = tl.where(tmp20, tmp4, tmp7)
    tmp22 = tl.where(tmp20, tmp16, tmp17)
    tmp24 = tmp23 + tmp1
    tmp25 = triton_helpers.maximum(tmp3, tmp24)
    tmp26 = tmp21 > tmp25
    tmp27 = tmp21 == tmp25
    tmp28 = tmp21 != tmp21
    tmp29 = tmp25 != tmp25
    tmp30 = tmp28 > tmp29
    tmp31 = tmp26 | tmp30
    tmp32 = tmp28 & tmp29
    tmp33 = tmp27 | tmp32
    tmp34 = tl.full([1], 2, tl.int64)
    tmp35 = tmp22 < tmp34
    tmp36 = tmp33 & tmp35
    tmp37 = tmp31 | tmp36
    tmp38 = tl.where(tmp37, tmp21, tmp25)
    tmp39 = tl.where(tmp37, tmp22, tmp34)
    tmp41 = tmp40 + tmp1
    tmp42 = triton_helpers.maximum(tmp3, tmp41)
    tmp43 = tmp38 > tmp42
    tmp44 = tmp38 == tmp42
    tmp45 = tmp38 != tmp38
    tmp46 = tmp42 != tmp42
    tmp47 = tmp45 > tmp46
    tmp48 = tmp43 | tmp47
    tmp49 = tmp45 & tmp46
    tmp50 = tmp44 | tmp49
    tmp51 = tl.full([1], 3, tl.int64)
    tmp52 = tmp39 < tmp51
    tmp53 = tmp50 & tmp52
    tmp54 = tmp48 | tmp53
    tmp55 = tl.where(tmp54, tmp38, tmp42)
    tmp56 = tl.where(tmp54, tmp39, tmp51)
    tmp58 = tmp57 + tmp1
    tmp59 = triton_helpers.maximum(tmp3, tmp58)
    tmp60 = tmp55 > tmp59
    tmp61 = tmp55 == tmp59
    tmp62 = tmp55 != tmp55
    tmp63 = tmp59 != tmp59
    tmp64 = tmp62 > tmp63
    tmp65 = tmp60 | tmp64
    tmp66 = tmp62 & tmp63
    tmp67 = tmp61 | tmp66
    tmp68 = tl.full([1], 4, tl.int64)
    tmp69 = tmp56 < tmp68
    tmp70 = tmp67 & tmp69
    tmp71 = tmp65 | tmp70
    tmp72 = tl.where(tmp71, tmp55, tmp59)
    tmp73 = tl.where(tmp71, tmp56, tmp68)
    tmp75 = tmp74 + tmp1
    tmp76 = triton_helpers.maximum(tmp3, tmp75)
    tmp77 = tmp72 > tmp76
    tmp78 = tmp72 == tmp76
    tmp79 = tmp72 != tmp72
    tmp80 = tmp76 != tmp76
    tmp81 = tmp79 > tmp80
    tmp82 = tmp77 | tmp81
    tmp83 = tmp79 & tmp80
    tmp84 = tmp78 | tmp83
    tmp85 = tl.full([1], 5, tl.int64)
    tmp86 = tmp73 < tmp85
    tmp87 = tmp84 & tmp86
    tmp88 = tmp82 | tmp87
    tl.where(tmp88, tmp72, tmp76)
    tmp90 = tl.where(tmp88, tmp73, tmp85)
    tmp91 = triton_helpers.maximum(tmp4, tmp7)
    tmp92 = triton_helpers.maximum(tmp91, tmp25)
    tmp93 = triton_helpers.maximum(tmp92, tmp42)
    tmp94 = triton_helpers.maximum(tmp93, tmp59)
    tmp95 = triton_helpers.maximum(tmp94, tmp76)
    tl.store(out_ptr0 + x2, tmp90, xmask)
    tl.store(out_ptr1 + x2, tmp95, xmask)


@triton.jit
def triton_poi_fused_relu_4(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, 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, xmask)


@triton.jit
def triton_poi_fused_relu_5(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, 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, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_threshold_backward_6(in_ptr0, in_ptr1,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 6 % 256
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tmp5 = 0.0
    tmp6 = tmp4 <= tmp5
    tl.store(out_ptr0 + x3, tmp6, 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, 6, 6), (36, 6, 1))
    assert_size_stride(primals_2, (64, 6, 1), (6, 1, 1))
    assert_size_stride(primals_3, (64,), (1,))
    assert_size_stride(primals_4, (128, 64, 1), (64, 1, 1))
    assert_size_stride(primals_5, (128,), (1,))
    assert_size_stride(primals_6, (256, 128, 1), (128, 1, 1))
    assert_size_stride(primals_7, (256,), (1,))
    assert_size_stride(primals_8, (128, 256), (256, 1))
    assert_size_stride(primals_9, (128,), (1,))
    assert_size_stride(primals_10, (64, 128), (128, 1))
    assert_size_stride(primals_11, (64,), (1,))
    assert_size_stride(primals_12, (4, 64), (64, 1))
    assert_size_stride(primals_13, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 6, 6), (36, 6, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_convolution_0[grid(24, 6)](primals_1, buf0, 24, 6,
            XBLOCK=8, YBLOCK=32, num_warps=4, num_stages=1)
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf1, (4, 64, 6), (384, 6, 1))
        del buf0
        buf2 = buf1
        del buf1
        triton_poi_fused_convolution_relu_1[grid(1536)](buf2, primals_3, 
            1536, XBLOCK=128, num_warps=4, num_stages=1)
        del primals_3
        buf3 = extern_kernels.convolution(buf2, primals_4, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf3, (4, 128, 6), (768, 6, 1))
        buf4 = buf3
        del buf3
        triton_poi_fused_convolution_relu_2[grid(3072)](buf4, primals_5, 
            3072, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_5
        buf5 = extern_kernels.convolution(buf4, primals_6, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf5, (4, 256, 6), (1536, 6, 1))
        buf6 = empty_strided_cuda((4, 256, 1), (256, 1, 1), torch.int64)
        buf7 = empty_strided_cuda((4, 256, 1), (256, 1, 1), torch.float32)
        triton_poi_fused_convolution_max_relu_3[grid(1024)](buf5, primals_7,
            buf6, buf7, 1024, XBLOCK=256, num_warps=4, num_stages=1)
        buf8 = empty_strided_cuda((4, 128), (128, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(buf7, (4, 256), (256, 1), 0),
            reinterpret_tensor(primals_8, (256, 128), (1, 256), 0), out=buf8)
        buf9 = buf8
        del buf8
        triton_poi_fused_relu_4[grid(512)](buf9, primals_9, 512, XBLOCK=256,
            num_warps=4, num_stages=1)
        del primals_9
        buf10 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf9, reinterpret_tensor(primals_10, (128, 64), (
            1, 128), 0), out=buf10)
        buf11 = buf10
        del buf10
        triton_poi_fused_relu_5[grid(256)](buf11, primals_11, 256, XBLOCK=
            256, num_warps=4, num_stages=1)
        del primals_11
        buf12 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_13, buf11, reinterpret_tensor(
            primals_12, (64, 4), (1, 64), 0), alpha=1, beta=1, out=buf12)
        del primals_13
        buf13 = empty_strided_cuda((4, 256, 6), (1536, 6, 1), torch.bool)
        triton_poi_fused_convolution_relu_threshold_backward_6[grid(6144)](buf5
            , primals_7, buf13, 6144, XBLOCK=256, num_warps=4, num_stages=1)
        del buf5
        del primals_7
    return buf12, primals_2, primals_4, primals_6, reinterpret_tensor(primals_1
        , (4, 6, 6), (36, 1, 6), 0), buf2, buf4, buf6, reinterpret_tensor(buf7,
        (4, 256), (256, 1), 0
        ), buf9, buf11, primals_12, primals_10, primals_8, buf13


class spectral_modelNew(nn.Module):

    def __init__(self, num_classes):
        super(spectral_modelNew, self).__init__()
        self.mlp1 = nn.Conv1d(6, 64, 1)
        self.mlp2 = nn.Conv1d(64, 128, 1)
        self.mlp3 = nn.Conv1d(128, 256, 1)
        self.flatten = nn.Flatten()
        self.fc1 = nn.Linear(256, 128)
        self.fc2 = nn.Linear(128, 64)
        self.fc3 = nn.Linear(64, num_classes)

    def forward(self, input_0):
        primals_2 = self.mlp1.weight
        primals_3 = self.mlp1.bias
        primals_4 = self.mlp2.weight
        primals_5 = self.mlp2.bias
        primals_6 = self.mlp3.weight
        primals_7 = self.mlp3.bias
        primals_8 = self.fc1.weight
        primals_9 = self.fc1.bias
        primals_10 = self.fc2.weight
        primals_11 = self.fc2.bias
        primals_12 = self.fc3.weight
        primals_13 = self.fc3.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]
