# 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/2p/c2pchd2kzossvpziwqzrjzzaysevgxgdpgzifsch2c4bim4lzcra.py
# Topologically Sorted Source Nodes: [linspace], Original ATen: [aten.linspace]
# Source node to ATen node mapping:
#   linspace => iota, lt
# Graph fragment:
#   %iota : [num_users=3] = call_function[target=torch.ops.prims.iota.default](args = (4,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False})
#   %lt : [num_users=2] = call_function[target=torch.ops.aten.lt.Scalar](args = (%iota, 2.0), kwargs = {})
triton_poi_fused_linspace_0 = async_compile.triton('triton_poi_fused_linspace_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=[4], 
    filename=__file__,
    triton_meta={'signature': {0: '*i1', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0,), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_linspace_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 0, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_linspace_0(out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 2.0
    tmp3 = tmp1 < tmp2
    tl.store(out_ptr0 + (x0), tmp3, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/3p/c3pvbauci65lr34aea5n2qcmy3ev76kgerp6hibnhxqedgmmgn32.py
# Topologically Sorted Source Nodes: [kernel], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   kernel => cat
# Graph fragment:
#   %cat : [num_users=3] = call_function[target=torch.ops.aten.cat.default](args = ([%cos, %neg], -1), kwargs = {})
triton_poi_fused_cat_1 = async_compile.triton('triton_poi_fused_cat_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=[32], 
    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_cat_1', '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_cat_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = (xindex // 8)
    x1 = (xindex // 2) % 4
    x3 = xindex
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x2), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = x1
    tmp7 = tmp6.to(tl.float32)
    tmp8 = 2.0
    tmp9 = tmp7 < tmp8
    tmp10 = 0.6666666666666666
    tmp11 = tmp7 * tmp10
    tmp12 = -1.0
    tmp13 = tmp11 + tmp12
    tmp14 = 3 + ((-1)*x1)
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 * tmp10
    tmp17 = 1.0
    tmp18 = tmp17 - tmp16
    tmp19 = tl.where(tmp9, tmp13, tmp18)
    tmp20 = 3.141592653589793
    tmp21 = tmp19 * tmp20
    tmp22 = 1e-08
    tmp23 = tmp21 + tmp22
    tmp24 = tmp5 * tmp23
    tmp25 = tl_math.cos(tmp24)
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp4, tmp25, tmp26)
    tmp28 = tmp0 >= tmp3
    tmp29 = tl.full([1], 2, tl.int64)
    tmp30 = tmp0 < tmp29
    tmp31 = tl.load(in_ptr0 + (x2), tmp28 & xmask, eviction_policy='evict_last', other=0.0)
    tmp32 = tmp31 * tmp23
    tmp33 = tl_math.sin(tmp32)
    tmp34 = -tmp33
    tmp35 = tl.full(tmp34.shape, 0.0, tmp34.dtype)
    tmp36 = tl.where(tmp28, tmp34, tmp35)
    tmp37 = tl.where(tmp4, tmp27, tmp36)
    tl.store(out_ptr0 + (x3), tmp37, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/gp/cgpwn725ul52vyy53yiuwgvtwigdrb5aa4kddyhwc7dgiyd33pxo.py
# Topologically Sorted Source Nodes: [cat_1], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat_1 => cat_1
# Graph fragment:
#   %cat_1 : [num_users=3] = call_function[target=torch.ops.aten.cat.default](args = ([%where_1, %full_default_1], -1), kwargs = {})
triton_poi_fused_cat_2 = async_compile.triton('triton_poi_fused_cat_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=[32], 
    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_cat_2', '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_cat_2(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = (xindex // 8)
    x1 = (xindex // 2) % 4
    x3 = xindex
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x2), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = x1
    tmp7 = tmp6.to(tl.float32)
    tmp8 = 2.0
    tmp9 = tmp7 < tmp8
    tmp10 = 0.6666666666666666
    tmp11 = tmp7 * tmp10
    tmp12 = -1.0
    tmp13 = tmp11 + tmp12
    tmp14 = 3 + ((-1)*x1)
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 * tmp10
    tmp17 = 1.0
    tmp18 = tmp17 - tmp16
    tmp19 = tl.where(tmp9, tmp13, tmp18)
    tmp20 = 3.141592653589793
    tmp21 = tmp19 * tmp20
    tmp22 = 1e-08
    tmp23 = tmp21 + tmp22
    tmp24 = tmp5 * tmp23
    tmp25 = tl.load(in_ptr1 + (x2), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp26 = tmp25 + tmp22
    tmp27 = tmp24 / tmp26
    tmp28 = 0.0
    tmp29 = tmp27 == tmp28
    tmp30 = tl_math.sin(tmp27)
    tmp31 = tmp30 / tmp27
    tmp32 = tl.where(tmp29, tmp17, tmp31)
    tmp33 = tl.full(tmp32.shape, 0.0, tmp32.dtype)
    tmp34 = tl.where(tmp4, tmp32, tmp33)
    tmp35 = tmp0 >= tmp3
    tmp36 = tl.full([1], 2, tl.int64)
    tmp37 = tmp0 < tmp36
    tmp38 = tl.full(tmp28.shape, 0.0, tmp28.dtype)
    tmp39 = tl.where(tmp35, tmp28, tmp38)
    tmp40 = tl.where(tmp4, tmp34, tmp39)
    tl.store(out_ptr0 + (x3), tmp40, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ga/cgahmtbihboplqjxssaronlub2urumgsh6gnsokxhaj753dzuwhh.py
# Topologically Sorted Source Nodes: [cat_2], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   cat_2 => cat_2
# Graph fragment:
#   %cat_2 : [num_users=3] = call_function[target=torch.ops.aten.cat.default](args = ([%view_1, %full_default_2], -1), kwargs = {})
triton_poi_fused_cat_3 = async_compile.triton('triton_poi_fused_cat_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=[8], 
    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), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_3', '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_cat_3(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = (xindex // 2)
    x2 = xindex
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x1), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 2, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = 0.0
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp6, tmp9, tmp10)
    tmp12 = tl.where(tmp4, tmp5, tmp11)
    tl.store(out_ptr0 + (x2), tmp12, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ux/cux3edk6fmp7xbq5rqn3xo6rjamwcodnvsqca2zzhh2ilxatwfkg.py
# Topologically Sorted Source Nodes: [stack, win_1], Original ATen: [aten.stack, aten.mul]
# Source node to ATen node mapping:
#   stack => cat_3
#   win_1 => mul_15
# Graph fragment:
#   %cat_3 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%unsqueeze_1, %unsqueeze_2], -1), kwargs = {})
#   %mul_15 : [num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %cat_3), kwargs = {})
triton_poi_fused_mul_stack_4 = async_compile.triton('triton_poi_fused_mul_stack_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=[32], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 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_mul_stack_4', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 12, '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_mul_stack_4(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = (xindex // 8)
    x4 = (xindex // 2)
    x5 = xindex
    tmp46 = tl.load(in_ptr1 + (2*x4), xmask, eviction_policy='evict_last')
    tmp48 = tl.load(in_ptr1 + (1 + (2*x4)), xmask, eviction_policy='evict_last')
    tmp53 = tl.load(in_ptr0 + (2*x2), xmask, eviction_policy='evict_last')
    tmp56 = tl.load(in_ptr0 + (1 + (2*x2)), xmask, eviction_policy='evict_last')
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (2*x2), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + (1 + (2*x4)), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp7 = tl.load(in_ptr1 + (2*x4), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp8 = libdevice.atan2(tmp6, tmp7)
    tmp9 = tmp5 * tmp8
    tmp10 = tl.load(in_ptr0 + (1 + (2*x2)), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp11 = 0.5
    tmp12 = tmp10 * tmp11
    tmp13 = tmp7 * tmp7
    tmp14 = tmp6 * tmp6
    tmp15 = tmp13 + tmp14
    tmp16 = libdevice.sqrt(tmp15)
    tmp17 = tmp16 * tmp16
    tmp18 = tl_math.log(tmp17)
    tmp19 = tmp12 * tmp18
    tmp20 = tmp9 + tmp19
    tmp21 = tl_math.cos(tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tmp25 = tl.full([1], 2, tl.int64)
    tmp26 = tmp0 < tmp25
    tmp27 = tl.load(in_ptr0 + (2*x2), tmp24 & xmask, eviction_policy='evict_last', other=0.0)
    tmp28 = tl.load(in_ptr1 + (1 + (2*x4)), tmp24 & xmask, eviction_policy='evict_last', other=0.0)
    tmp29 = tl.load(in_ptr1 + (2*x4), tmp24 & xmask, eviction_policy='evict_last', other=0.0)
    tmp30 = libdevice.atan2(tmp28, tmp29)
    tmp31 = tmp27 * tmp30
    tmp32 = tl.load(in_ptr0 + (1 + (2*x2)), tmp24 & xmask, eviction_policy='evict_last', other=0.0)
    tmp33 = tmp32 * tmp11
    tmp34 = tmp29 * tmp29
    tmp35 = tmp28 * tmp28
    tmp36 = tmp34 + tmp35
    tmp37 = libdevice.sqrt(tmp36)
    tmp38 = tmp37 * tmp37
    tmp39 = tl_math.log(tmp38)
    tmp40 = tmp33 * tmp39
    tmp41 = tmp31 + tmp40
    tmp42 = tl_math.sin(tmp41)
    tmp43 = tl.full(tmp42.shape, 0.0, tmp42.dtype)
    tmp44 = tl.where(tmp24, tmp42, tmp43)
    tmp45 = tl.where(tmp4, tmp23, tmp44)
    tmp47 = tmp46 * tmp46
    tmp49 = tmp48 * tmp48
    tmp50 = tmp47 + tmp49
    tmp51 = libdevice.sqrt(tmp50)
    tmp52 = tmp51 * tmp51
    tmp54 = tmp53 * tmp11
    tmp55 = libdevice.pow(tmp52, tmp54)
    tmp57 = -tmp56
    tmp58 = libdevice.atan2(tmp48, tmp46)
    tmp59 = tmp57 * tmp58
    tmp60 = tl_math.exp(tmp59)
    tmp61 = tmp55 * tmp60
    tmp62 = tmp61 * tmp45
    tl.store(out_ptr0 + (x5), tmp45, xmask)
    tl.store(out_ptr1 + (x5), tmp62, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/va/cva2d2qcmnc5fzisj6xbaxmgnzymk266anxegk4e7ujrg73xwc4q.py
# Topologically Sorted Source Nodes: [scale, cat_3, weights], Original ATen: [aten.sqrt, aten.cat, aten.mul]
# Source node to ATen node mapping:
#   cat_3 => cat_4
#   scale => sqrt
#   weights => mul_20
# Graph fragment:
#   %sqrt : [num_users=1] = call_function[target=torch.ops.aten.sqrt.default](args = (%view_2,), kwargs = {})
#   %cat_4 : [num_users=2] = call_function[target=torch.ops.aten.cat.default](args = ([%sub_2, %add_6], -1), kwargs = {})
#   %mul_20 : [num_users=3] = call_function[target=torch.ops.aten.mul.Tensor](args = (%sqrt, %cat_4), kwargs = {})
triton_poi_fused_cat_mul_sqrt_5 = async_compile.triton('triton_poi_fused_cat_mul_sqrt_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=[32], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: '*fp32', 4: '*fp32', 5: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3, 4, 5), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_cat_mul_sqrt_5', '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_cat_mul_sqrt_5(in_ptr0, in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = (xindex // 2)
    x4 = xindex
    x3 = (xindex // 8)
    tmp27 = tl.load(in_ptr2 + (x3), xmask, eviction_policy='evict_last')
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (2*x1), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + (2*x1), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 * tmp6
    tmp8 = tl.load(in_ptr0 + (1 + (2*x1)), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp9 = tl.load(in_ptr1 + (1 + (2*x1)), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp10 = tmp8 * tmp9
    tmp11 = tmp7 - tmp10
    tmp12 = tl.full(tmp11.shape, 0.0, tmp11.dtype)
    tmp13 = tl.where(tmp4, tmp11, tmp12)
    tmp14 = tmp0 >= tmp3
    tmp15 = tl.full([1], 2, tl.int64)
    tmp16 = tmp0 < tmp15
    tmp17 = tl.load(in_ptr0 + (2*x1), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp18 = tl.load(in_ptr1 + (1 + (2*x1)), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp19 = tmp17 * tmp18
    tmp20 = tl.load(in_ptr0 + (1 + (2*x1)), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp21 = tl.load(in_ptr1 + (2*x1), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp22 = tmp20 * tmp21
    tmp23 = tmp19 + tmp22
    tmp24 = tl.full(tmp23.shape, 0.0, tmp23.dtype)
    tmp25 = tl.where(tmp14, tmp23, tmp24)
    tmp26 = tl.where(tmp4, tmp13, tmp25)
    tmp28 = libdevice.sqrt(tmp27)
    tmp29 = tmp28 * tmp26
    tl.store(out_ptr0 + (x4), tmp26, xmask)
    tl.store(out_ptr1 + (x4), tmp29, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/74/c74zbfg3tfn4q7o5zem3awoefkezwu3czoteaqazwcuoa4pbpikg.py
# Topologically Sorted Source Nodes: [linear], Original ATen: [aten.mm]
# Source node to ATen node mapping:
#   linear => mm
# Graph fragment:
#   %mm : [num_users=1] = call_function[target=torch.ops.aten.mm.default](args = (%view_4, %permute), kwargs = {})
triton_poi_fused_mm_6 = async_compile.triton('triton_poi_fused_mm_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=[16], 
    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_mm_6', '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_mm_6(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (2*x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/f6/cf63icjghppuwwqvlzsnyu7p2bpjtd4a66qc5oh7k2gvlfdd37is.py
# Topologically Sorted Source Nodes: [linear_1], Original ATen: [aten.mm]
# Source node to ATen node mapping:
#   linear_1 => mm_1
# Graph fragment:
#   %mm_1 : [num_users=1] = call_function[target=torch.ops.aten.mm.default](args = (%view_4, %permute_1), kwargs = {})
triton_poi_fused_mm_7 = async_compile.triton('triton_poi_fused_mm_7', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[16], 
    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_mm_7', '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_mm_7(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (1 + (2*x0)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/av/cavfvqrwpqvbne4yrk2ditloma2qnmkbde46ibblhmvqah57gjha.py
# Topologically Sorted Source Nodes: [x, x_1], Original ATen: [aten.stack, aten.add]
# Source node to ATen node mapping:
#   x => cat_5
#   x_1 => add_7
# Graph fragment:
#   %cat_5 : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%unsqueeze_3, %unsqueeze_4], -1), kwargs = {})
#   %add_7 : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%cat_5, %primals_5), kwargs = {})
triton_poi_fused_add_stack_8 = async_compile.triton('triton_poi_fused_add_stack_8', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[512], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 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_add_stack_8', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 3, '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_add_stack_8(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x3 = (xindex // 2)
    x4 = xindex % 8
    x5 = xindex
    tmp11 = tl.load(in_ptr2 + (x4), xmask, eviction_policy='evict_last')
    tmp0 = x0
    tmp1 = tl.full([1], 0, tl.int64)
    tmp2 = tmp0 >= tmp1
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 2, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tl.load(in_ptr1 + (x3), tmp6 & xmask, eviction_policy='evict_last', other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tmp12 = tmp10 + tmp11
    tl.store(out_ptr0 + (x5), tmp12, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_2, (4, ), (1, ))
    assert_size_stride(primals_3, (4, ), (1, ))
    assert_size_stride(primals_4, (4, ), (1, ))
    assert_size_stride(primals_5, (4, 2), (2, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, ), (1, ), torch.bool)
        # Topologically Sorted Source Nodes: [linspace], Original ATen: [aten.linspace]
        stream0 = get_raw_stream(0)
        triton_poi_fused_linspace_0.run(buf0, 4, grid=grid(4), stream=stream0)
        buf1 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [kernel], Original ATen: [aten.cat]
        triton_poi_fused_cat_1.run(primals_4, buf1, 32, grid=grid(32), stream=stream0)
        buf2 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_1], Original ATen: [aten.cat]
        triton_poi_fused_cat_2.run(primals_3, primals_2, buf2, 32, grid=grid(32), stream=stream0)
        buf3 = empty_strided_cuda((4, 1, 2), (2, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [cat_2], Original ATen: [aten.cat]
        triton_poi_fused_cat_3.run(primals_2, buf3, 8, grid=grid(8), stream=stream0)
        buf4 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        buf5 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [stack, win_1], Original ATen: [aten.stack, aten.mul]
        triton_poi_fused_mul_stack_4.run(buf3, buf2, buf4, buf5, 32, grid=grid(32), stream=stream0)
        buf6 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        buf7 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [scale, cat_3, weights], Original ATen: [aten.sqrt, aten.cat, aten.mul]
        triton_poi_fused_cat_mul_sqrt_5.run(buf5, buf1, primals_3, buf6, buf7, 32, grid=grid(32), stream=stream0)
        del buf5
        buf8 = empty_strided_cuda((4, 4), (1, 4), torch.float32)
        # Topologically Sorted Source Nodes: [linear], Original ATen: [aten.mm]
        triton_poi_fused_mm_6.run(buf7, buf8, 16, grid=grid(16), stream=stream0)
        buf9 = empty_strided_cuda((64, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [linear], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(primals_1, (64, 4), (4, 1), 0), buf8, out=buf9)
        buf10 = buf8; del buf8  # reuse
        # Topologically Sorted Source Nodes: [linear_1], Original ATen: [aten.mm]
        triton_poi_fused_mm_7.run(buf7, buf10, 16, grid=grid(16), stream=stream0)
        buf11 = empty_strided_cuda((64, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [linear_1], Original ATen: [aten.mm]
        extern_kernels.mm(reinterpret_tensor(primals_1, (64, 4), (4, 1), 0), buf10, out=buf11)
        del buf10
        buf12 = empty_strided_cuda((4, 4, 4, 4, 2), (128, 32, 8, 2, 1), torch.float32)
        # Topologically Sorted Source Nodes: [x, x_1], Original ATen: [aten.stack, aten.add]
        triton_poi_fused_add_stack_8.run(buf9, buf11, primals_5, buf12, 512, grid=grid(512), stream=stream0)
        del buf11
        del buf9
        del primals_5
    return (buf12, buf7, primals_2, primals_3, primals_4, buf0, buf1, buf2, buf3, buf4, buf6, reinterpret_tensor(primals_1, (4, 64), (1, 4), 0), )


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, 4, 4, 4), (64, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((4, 2), (2, 1), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5])
    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 numpy as np
from typing import Tuple
import torch.nn.functional as F
from typing import cast


def scale(old_value, old_min, old_max, new_min, new_max):
    old_range = old_max - old_min
    new_range = new_max - new_min
    new_value = (old_value - old_min) * new_range / old_range + new_min
    return new_value


class LinearFBSP(torch.nn.Module):

    def __init__(self, out_features: 'int', bias: 'bool'=True, normalized:
        'bool'=False):
        super(LinearFBSP, self).__init__()
        self.out_features = out_features
        self.normalized = normalized
        self.eps = 1e-08
        default_dtype = torch.get_default_dtype()
        self.register_parameter('m', torch.nn.Parameter(torch.zeros(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('fb', torch.nn.Parameter(torch.ones(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('fc', torch.nn.Parameter(torch.arange(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('bias', torch.nn.Parameter(torch.normal(0.0,
            0.5, (self.out_features, 2), dtype=default_dtype) if bias else
            cast(torch.nn.Parameter, None)))
        self.m.register_hook(lambda grad: grad / (torch.norm(grad, p=float(
            'inf')) + self.eps))
        self.fb.register_hook(lambda grad: grad / (torch.norm(grad, p=float
            ('inf')) + self.eps))
        self.fc.register_hook(lambda grad: grad / (torch.norm(grad, p=float
            ('inf')) + self.eps))

    @staticmethod
    def power(x1: 'torch.Tensor', x2: 'torch.Tensor') ->torch.Tensor:
        magnitudes = (x1[..., 0] ** 2 + x1[..., 1] ** 2) ** 0.5
        phases = x1[..., 1].atan2(x1[..., 0])
        power_real = x2[..., 0]
        power_imag = x2[..., 1]
        mag_out = (magnitudes ** 2) ** (0.5 * power_real) * torch.exp(-
            power_imag * phases)
        return mag_out.unsqueeze(-1) * torch.stack(((power_real * phases + 
            0.5 * power_imag * (magnitudes ** 2).log()).cos(), (power_real *
            phases + 0.5 * power_imag * (magnitudes ** 2).log()).sin()), dim=-1
            )

    @staticmethod
    def sinc(x: 'torch.Tensor') ->torch.Tensor:
        return torch.where(cast(torch.Tensor, x == 0), torch.ones_like(x), 
            torch.sin(x) / x)

    def _materialize_weights(self, x: 'torch.Tensor') ->Tuple[torch.Tensor,
        bool]:
        x_is_complex = x.shape[-1] == 2
        in_features = x.shape[-1 - int(x_is_complex)]
        t = np.pi * torch.linspace(-1.0, 1.0, in_features, dtype=x.dtype,
            device=x.device).reshape(1, -1, 1) + self.eps
        m = self.m.reshape(-1, 1, 1)
        fb = self.fb.reshape(-1, 1, 1)
        fc = self.fc.reshape(-1, 1, 1)
        kernel = torch.cat((torch.cos(fc * t), -torch.sin(fc * t)), dim=-1)
        scale = fb.sqrt()
        win = self.sinc(fb * t / (m + self.eps))
        win = self.power(torch.cat((win, torch.zeros_like(win)), dim=-1),
            torch.cat((m, torch.zeros_like(m)), dim=-1))
        weights = scale * torch.cat((win[..., :1] * kernel[..., :1] - win[
            ..., 1:] * kernel[..., 1:], win[..., :1] * kernel[..., 1:] + 
            win[..., 1:] * kernel[..., :1]), dim=-1)
        if self.normalized:
            weights = weights / in_features ** 0.5
        return weights, x_is_complex

    def forward(self, x: 'torch.Tensor') ->Tuple[torch.Tensor, torch.Tensor]:
        weights, x_is_complex = self._materialize_weights(x)
        if x_is_complex:
            x = torch.stack((F.linear(x[..., 0], weights[..., 0]) - F.
                linear(x[..., 1], weights[..., 1]), F.linear(x[..., 0],
                weights[..., 1]) + F.linear(x[..., 1], weights[..., 0])),
                dim=-1)
        else:
            x = torch.stack((F.linear(x, weights[..., 0]), F.linear(x,
                weights[..., 1])), dim=-1)
        if self.bias is not None and self.bias.numel(
            ) == self.out_features * 2:
            x = x + self.bias
        return x, weights

    def extra_repr(self) ->str:
        return 'out_features={}, bias={}, normalized={}'.format(self.
            out_features, self.bias is not None and self.bias.numel() == 
            self.out_features * 2, self.normalized)


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


def get_init_inputs():
    return [[], {'out_features': 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.triton_helpers import libdevice, math as tl_math
import numpy as np
from typing import Tuple
from typing import cast
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_linspace_0(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 4
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 2.0
    tmp3 = tmp1 < tmp2
    tl.store(out_ptr0 + x0, tmp3, xmask)


@triton.jit
def triton_poi_fused_cat_1(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = xindex // 8
    x1 = xindex // 2 % 4
    x3 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x2, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp6 = x1
    tmp7 = tmp6.to(tl.float32)
    tmp8 = 2.0
    tmp9 = tmp7 < tmp8
    tmp10 = 0.6666666666666666
    tmp11 = tmp7 * tmp10
    tmp12 = -1.0
    tmp13 = tmp11 + tmp12
    tmp14 = 3 + -1 * x1
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 * tmp10
    tmp17 = 1.0
    tmp18 = tmp17 - tmp16
    tmp19 = tl.where(tmp9, tmp13, tmp18)
    tmp20 = 3.141592653589793
    tmp21 = tmp19 * tmp20
    tmp22 = 1e-08
    tmp23 = tmp21 + tmp22
    tmp24 = tmp5 * tmp23
    tmp25 = tl_math.cos(tmp24)
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp4, tmp25, tmp26)
    tmp28 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp31 = tl.load(in_ptr0 + x2, tmp28 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp32 = tmp31 * tmp23
    tmp33 = tl_math.sin(tmp32)
    tmp34 = -tmp33
    tmp35 = tl.full(tmp34.shape, 0.0, tmp34.dtype)
    tmp36 = tl.where(tmp28, tmp34, tmp35)
    tmp37 = tl.where(tmp4, tmp27, tmp36)
    tl.store(out_ptr0 + x3, tmp37, xmask)


@triton.jit
def triton_poi_fused_cat_2(in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = xindex // 8
    x1 = xindex // 2 % 4
    x3 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x2, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp6 = x1
    tmp7 = tmp6.to(tl.float32)
    tmp8 = 2.0
    tmp9 = tmp7 < tmp8
    tmp10 = 0.6666666666666666
    tmp11 = tmp7 * tmp10
    tmp12 = -1.0
    tmp13 = tmp11 + tmp12
    tmp14 = 3 + -1 * x1
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 * tmp10
    tmp17 = 1.0
    tmp18 = tmp17 - tmp16
    tmp19 = tl.where(tmp9, tmp13, tmp18)
    tmp20 = 3.141592653589793
    tmp21 = tmp19 * tmp20
    tmp22 = 1e-08
    tmp23 = tmp21 + tmp22
    tmp24 = tmp5 * tmp23
    tmp25 = tl.load(in_ptr1 + x2, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp26 = tmp25 + tmp22
    tmp27 = tmp24 / tmp26
    tmp28 = 0.0
    tmp29 = tmp27 == tmp28
    tmp30 = tl_math.sin(tmp27)
    tmp31 = tmp30 / tmp27
    tmp32 = tl.where(tmp29, tmp17, tmp31)
    tmp33 = tl.full(tmp32.shape, 0.0, tmp32.dtype)
    tmp34 = tl.where(tmp4, tmp32, tmp33)
    tmp35 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp38 = tl.full(tmp28.shape, 0.0, tmp28.dtype)
    tmp39 = tl.where(tmp35, tmp28, tmp38)
    tmp40 = tl.where(tmp4, tmp34, tmp39)
    tl.store(out_ptr0 + x3, tmp40, xmask)


@triton.jit
def triton_poi_fused_cat_3(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = xindex // 2
    x2 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x1, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp9 = 0.0
    tmp10 = tl.full(tmp9.shape, 0.0, tmp9.dtype)
    tmp11 = tl.where(tmp6, tmp9, tmp10)
    tmp12 = tl.where(tmp4, tmp5, tmp11)
    tl.store(out_ptr0 + x2, tmp12, xmask)


@triton.jit
def triton_poi_fused_mul_stack_4(in_ptr0, in_ptr1, out_ptr0, out_ptr1,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x2 = xindex // 8
    x4 = xindex // 2
    x5 = xindex
    tmp46 = tl.load(in_ptr1 + 2 * x4, xmask, eviction_policy='evict_last')
    tmp48 = tl.load(in_ptr1 + (1 + 2 * x4), xmask, eviction_policy='evict_last'
        )
    tmp53 = tl.load(in_ptr0 + 2 * x2, xmask, eviction_policy='evict_last')
    tmp56 = tl.load(in_ptr0 + (1 + 2 * x2), xmask, eviction_policy='evict_last'
        )
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + 2 * x2, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + (1 + 2 * x4), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp7 = tl.load(in_ptr1 + 2 * x4, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp8 = libdevice.atan2(tmp6, tmp7)
    tmp9 = tmp5 * tmp8
    tmp10 = tl.load(in_ptr0 + (1 + 2 * x2), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = 0.5
    tmp12 = tmp10 * tmp11
    tmp13 = tmp7 * tmp7
    tmp14 = tmp6 * tmp6
    tmp15 = tmp13 + tmp14
    tmp16 = libdevice.sqrt(tmp15)
    tmp17 = tmp16 * tmp16
    tmp18 = tl_math.log(tmp17)
    tmp19 = tmp12 * tmp18
    tmp20 = tmp9 + tmp19
    tmp21 = tl_math.cos(tmp20)
    tmp22 = tl.full(tmp21.shape, 0.0, tmp21.dtype)
    tmp23 = tl.where(tmp4, tmp21, tmp22)
    tmp24 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp27 = tl.load(in_ptr0 + 2 * x2, tmp24 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp28 = tl.load(in_ptr1 + (1 + 2 * x4), tmp24 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp29 = tl.load(in_ptr1 + 2 * x4, tmp24 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp30 = libdevice.atan2(tmp28, tmp29)
    tmp31 = tmp27 * tmp30
    tmp32 = tl.load(in_ptr0 + (1 + 2 * x2), tmp24 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp33 = tmp32 * tmp11
    tmp34 = tmp29 * tmp29
    tmp35 = tmp28 * tmp28
    tmp36 = tmp34 + tmp35
    tmp37 = libdevice.sqrt(tmp36)
    tmp38 = tmp37 * tmp37
    tmp39 = tl_math.log(tmp38)
    tmp40 = tmp33 * tmp39
    tmp41 = tmp31 + tmp40
    tmp42 = tl_math.sin(tmp41)
    tmp43 = tl.full(tmp42.shape, 0.0, tmp42.dtype)
    tmp44 = tl.where(tmp24, tmp42, tmp43)
    tmp45 = tl.where(tmp4, tmp23, tmp44)
    tmp47 = tmp46 * tmp46
    tmp49 = tmp48 * tmp48
    tmp50 = tmp47 + tmp49
    tmp51 = libdevice.sqrt(tmp50)
    tmp52 = tmp51 * tmp51
    tmp54 = tmp53 * tmp11
    tmp55 = libdevice.pow(tmp52, tmp54)
    tmp57 = -tmp56
    tmp58 = libdevice.atan2(tmp48, tmp46)
    tmp59 = tmp57 * tmp58
    tmp60 = tl_math.exp(tmp59)
    tmp61 = tmp55 * tmp60
    tmp62 = tmp61 * tmp45
    tl.store(out_ptr0 + x5, tmp45, xmask)
    tl.store(out_ptr1 + x5, tmp62, xmask)


@triton.jit
def triton_poi_fused_cat_mul_sqrt_5(in_ptr0, in_ptr1, in_ptr2, out_ptr0,
    out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x1 = xindex // 2
    x4 = xindex
    x3 = xindex // 8
    tmp27 = tl.load(in_ptr2 + x3, xmask, eviction_policy='evict_last')
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + 2 * x1, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + 2 * x1, tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp7 = tmp5 * tmp6
    tmp8 = tl.load(in_ptr0 + (1 + 2 * x1), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp9 = tl.load(in_ptr1 + (1 + 2 * x1), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp10 = tmp8 * tmp9
    tmp11 = tmp7 - tmp10
    tmp12 = tl.full(tmp11.shape, 0.0, tmp11.dtype)
    tmp13 = tl.where(tmp4, tmp11, tmp12)
    tmp14 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp17 = tl.load(in_ptr0 + 2 * x1, tmp14 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp18 = tl.load(in_ptr1 + (1 + 2 * x1), tmp14 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp19 = tmp17 * tmp18
    tmp20 = tl.load(in_ptr0 + (1 + 2 * x1), tmp14 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp21 = tl.load(in_ptr1 + 2 * x1, tmp14 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp22 = tmp20 * tmp21
    tmp23 = tmp19 + tmp22
    tmp24 = tl.full(tmp23.shape, 0.0, tmp23.dtype)
    tmp25 = tl.where(tmp14, tmp23, tmp24)
    tmp26 = tl.where(tmp4, tmp13, tmp25)
    tmp28 = libdevice.sqrt(tmp27)
    tmp29 = tmp28 * tmp26
    tl.store(out_ptr0 + x4, tmp26, xmask)
    tl.store(out_ptr1 + x4, tmp29, xmask)


@triton.jit
def triton_poi_fused_mm_6(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + 2 * x0, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_mm_7(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (1 + 2 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_add_stack_8(in_ptr0, in_ptr1, in_ptr2, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 2
    x3 = xindex // 2
    x4 = xindex % 8
    x5 = xindex
    tmp11 = tl.load(in_ptr2 + x4, xmask, eviction_policy='evict_last')
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + x3, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp6 = tmp0 >= tmp3
    tl.full([1], 2, tl.int64)
    tmp9 = tl.load(in_ptr1 + x3, tmp6 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp10 = tl.where(tmp4, tmp5, tmp9)
    tmp12 = tmp10 + tmp11
    tl.store(out_ptr0 + x5, tmp12, xmask)


def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_2, (4,), (1,))
    assert_size_stride(primals_3, (4,), (1,))
    assert_size_stride(primals_4, (4,), (1,))
    assert_size_stride(primals_5, (4, 2), (2, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4,), (1,), torch.bool)
        get_raw_stream(0)
        triton_poi_fused_linspace_0[grid(4)](buf0, 4, XBLOCK=4, num_warps=1,
            num_stages=1)
        buf1 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_cat_1[grid(32)](primals_4, buf1, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf2 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_cat_2[grid(32)](primals_3, primals_2, buf2, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf3 = empty_strided_cuda((4, 1, 2), (2, 2, 1), torch.float32)
        triton_poi_fused_cat_3[grid(8)](primals_2, buf3, 8, XBLOCK=8,
            num_warps=1, num_stages=1)
        buf4 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        buf5 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_mul_stack_4[grid(32)](buf3, buf2, buf4, buf5, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf6 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        buf7 = empty_strided_cuda((4, 4, 2), (8, 2, 1), torch.float32)
        triton_poi_fused_cat_mul_sqrt_5[grid(32)](buf5, buf1, primals_3,
            buf6, buf7, 32, XBLOCK=32, num_warps=1, num_stages=1)
        del buf5
        buf8 = empty_strided_cuda((4, 4), (1, 4), torch.float32)
        triton_poi_fused_mm_6[grid(16)](buf7, buf8, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf9 = empty_strided_cuda((64, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(primals_1, (64, 4), (4, 1), 0),
            buf8, out=buf9)
        buf10 = buf8
        del buf8
        triton_poi_fused_mm_7[grid(16)](buf7, buf10, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf11 = empty_strided_cuda((64, 4), (4, 1), torch.float32)
        extern_kernels.mm(reinterpret_tensor(primals_1, (64, 4), (4, 1), 0),
            buf10, out=buf11)
        del buf10
        buf12 = empty_strided_cuda((4, 4, 4, 4, 2), (128, 32, 8, 2, 1),
            torch.float32)
        triton_poi_fused_add_stack_8[grid(512)](buf9, buf11, primals_5,
            buf12, 512, XBLOCK=256, num_warps=4, num_stages=1)
        del buf11
        del buf9
        del primals_5
    return (buf12, buf7, primals_2, primals_3, primals_4, buf0, buf1, buf2,
        buf3, buf4, buf6, reinterpret_tensor(primals_1, (4, 64), (1, 4), 0))


def scale(old_value, old_min, old_max, new_min, new_max):
    old_range = old_max - old_min
    new_range = new_max - new_min
    new_value = (old_value - old_min) * new_range / old_range + new_min
    return new_value


class LinearFBSPNew(torch.nn.Module):

    def __init__(self, out_features: 'int', bias: 'bool'=True, normalized:
        'bool'=False):
        super(LinearFBSPNew, self).__init__()
        self.out_features = out_features
        self.normalized = normalized
        self.eps = 1e-08
        default_dtype = torch.get_default_dtype()
        self.register_parameter('m', torch.nn.Parameter(torch.zeros(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('fb', torch.nn.Parameter(torch.ones(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('fc', torch.nn.Parameter(torch.arange(self.
            out_features, dtype=default_dtype)))
        self.register_parameter('bias', torch.nn.Parameter(torch.normal(0.0,
            0.5, (self.out_features, 2), dtype=default_dtype) if bias else
            cast(torch.nn.Parameter, None)))
        self.m.register_hook(lambda grad: grad / (torch.norm(grad, p=float(
            'inf')) + self.eps))
        self.fb.register_hook(lambda grad: grad / (torch.norm(grad, p=float
            ('inf')) + self.eps))
        self.fc.register_hook(lambda grad: grad / (torch.norm(grad, p=float
            ('inf')) + self.eps))

    @staticmethod
    def power(x1: 'torch.Tensor', x2: 'torch.Tensor') ->torch.Tensor:
        magnitudes = (x1[..., 0] ** 2 + x1[..., 1] ** 2) ** 0.5
        phases = x1[..., 1].atan2(x1[..., 0])
        power_real = x2[..., 0]
        power_imag = x2[..., 1]
        mag_out = (magnitudes ** 2) ** (0.5 * power_real) * torch.exp(-
            power_imag * phases)
        return mag_out.unsqueeze(-1) * torch.stack(((power_real * phases + 
            0.5 * power_imag * (magnitudes ** 2).log()).cos(), (power_real *
            phases + 0.5 * power_imag * (magnitudes ** 2).log()).sin()), dim=-1
            )

    @staticmethod
    def sinc(x: 'torch.Tensor') ->torch.Tensor:
        return torch.where(cast(torch.Tensor, x == 0), torch.ones_like(x), 
            torch.sin(x) / x)

    def _materialize_weights(self, x: 'torch.Tensor') ->Tuple[torch.Tensor,
        bool]:
        x_is_complex = x.shape[-1] == 2
        in_features = x.shape[-1 - int(x_is_complex)]
        t = np.pi * torch.linspace(-1.0, 1.0, in_features, dtype=x.dtype,
            device=x.device).reshape(1, -1, 1) + self.eps
        m = self.m.reshape(-1, 1, 1)
        fb = self.fb.reshape(-1, 1, 1)
        fc = self.fc.reshape(-1, 1, 1)
        kernel = torch.cat((torch.cos(fc * t), -torch.sin(fc * t)), dim=-1)
        scale = fb.sqrt()
        win = self.sinc(fb * t / (m + self.eps))
        win = self.power(torch.cat((win, torch.zeros_like(win)), dim=-1),
            torch.cat((m, torch.zeros_like(m)), dim=-1))
        weights = scale * torch.cat((win[..., :1] * kernel[..., :1] - win[
            ..., 1:] * kernel[..., 1:], win[..., :1] * kernel[..., 1:] + 
            win[..., 1:] * kernel[..., :1]), dim=-1)
        if self.normalized:
            weights = weights / in_features ** 0.5
        return weights, x_is_complex

    def extra_repr(self) ->str:
        return 'out_features={}, bias={}, normalized={}'.format(self.
            out_features, self.bias is not None and self.bias.numel() == 
            self.out_features * 2, self.normalized)

    def forward(self, input_0):
        primals_2 = self.m
        primals_3 = self.fb
        primals_4 = self.fc
        primals_5 = self.bias
        primals_1 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4, primals_5])
        return output[0], output[1]
