# 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/or/corkr2lv47o6sfn4hjxlpgiwjarrpqwvqky3aaxzmjeujdsc7j7q.py
# Topologically Sorted Source Nodes: [embedding_1, embedding], Original ATen: [aten.repeat, aten.bmm]
# Source node to ATen node mapping:
#   embedding => bmm
#   embedding_1 => repeat
# Graph fragment:
#   %repeat : [num_users=4] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_2, [4, 1, 1]), kwargs = {})
#   %bmm : [num_users=2] = call_function[target=torch.ops.aten.bmm.default](args = (%select, %repeat), kwargs = {})
triton_poi_fused_bmm_repeat_0 = async_compile.triton('triton_poi_fused_bmm_repeat_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=[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_bmm_repeat_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_bmm_repeat_0(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 + (4*x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ai/caije5h3hz5w2rztsgsgg32ixut2busbwqoc6eyiqofxae4s5pu3.py
# Topologically Sorted Source Nodes: [embedding_1], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   embedding_1 => repeat
# Graph fragment:
#   %repeat : [num_users=4] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_2, [4, 1, 1]), kwargs = {})
triton_poi_fused_repeat_1 = async_compile.triton('triton_poi_fused_repeat_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

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

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_repeat_1', '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_repeat_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 64
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/xm/cxmiwopuifdm63wp3aocr7fxzo3zwily3y5bbqinxqleilkmhe4c.py
# Topologically Sorted Source Nodes: [embedding_2], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   embedding_2 => repeat_1
# Graph fragment:
#   %repeat_1 : [num_users=5] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_3, [4, 1, 1]), kwargs = {})
triton_poi_fused_repeat_2 = async_compile.triton('triton_poi_fused_repeat_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=[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_repeat_2', '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_repeat_2(in_ptr0, 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 % 128
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/fl/cfl366a57q6ncgzkiv2jtde2zbu4f7itbcg55huizqchhapr2j3o.py
# Topologically Sorted Source Nodes: [embedding_3], Original ATen: [aten.repeat]
# Source node to ATen node mapping:
#   embedding_3 => repeat_2
# Graph fragment:
#   %repeat_2 : [num_users=5] = call_function[target=torch.ops.aten.repeat.default](args = (%primals_4, [4, 1, 1]), kwargs = {})
triton_poi_fused_repeat_3 = async_compile.triton('triton_poi_fused_repeat_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=[128], 
    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_repeat_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_repeat_3(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 32
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ar/carh7m4beok2vak4y53uiiolhugfutelqlntx6ca7zlwnys5bayj.py
# Topologically Sorted Source Nodes: [embedding_6], Original ATen: [aten.bmm]
# Source node to ATen node mapping:
#   embedding_6 => bmm_3
# Graph fragment:
#   %bmm_3 : [num_users=2] = call_function[target=torch.ops.aten.bmm.default](args = (%select_1, %repeat), kwargs = {})
triton_poi_fused_bmm_4 = async_compile.triton('triton_poi_fused_bmm_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=[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_bmm_4', '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_bmm_4(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 + (4*x0)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/os/coswl44a325oh7m7ui3bzvoyzqpzgh6x4v6bifcwsgsyifeo23lq.py
# Topologically Sorted Source Nodes: [embedding_9], Original ATen: [aten.bmm]
# Source node to ATen node mapping:
#   embedding_9 => bmm_6
# Graph fragment:
#   %bmm_6 : [num_users=2] = call_function[target=torch.ops.aten.bmm.default](args = (%select_2, %repeat), kwargs = {})
triton_poi_fused_bmm_5 = async_compile.triton('triton_poi_fused_bmm_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=[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_bmm_5', '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_bmm_5(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 + (4*x0)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/km/ckmoszkpkqli5uoxgqgpbpl475d2w4juixyu4tb4v7zd2amwahnq.py
# Topologically Sorted Source Nodes: [embedding_12], Original ATen: [aten.bmm]
# Source node to ATen node mapping:
#   embedding_12 => bmm_9
# Graph fragment:
#   %bmm_9 : [num_users=2] = call_function[target=torch.ops.aten.bmm.default](args = (%select_3, %repeat), kwargs = {})
triton_poi_fused_bmm_6 = async_compile.triton('triton_poi_fused_bmm_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_bmm_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_bmm_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 + (3 + (4*x0)), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + (x0), tmp0, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/ak/cakpyudn43xupmgggee2g4qo72nkevaejhdtz6vkmp4nsodh7dj3.py
# Topologically Sorted Source Nodes: [embedded], Original ATen: [aten.cat]
# Source node to ATen node mapping:
#   embedded => cat
# Graph fragment:
#   %cat : [num_users=1] = call_function[target=torch.ops.aten.cat.default](args = ([%bmm_2, %bmm_5, %bmm_8, %bmm_11], 1), kwargs = {})
triton_poi_fused_cat_7 = async_compile.triton('triton_poi_fused_cat_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=[64], 
    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_7', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 4, '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_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = (xindex // 4) % 4
    x0 = xindex % 4
    x2 = (xindex // 16)
    x3 = xindex
    tmp0 = x1
    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 + (x0 + (4*x2)), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 2, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + (4*x2)), tmp9 & xmask, eviction_policy='evict_last', other=0.0)
    tmp11 = tmp0 >= tmp7
    tmp12 = tl.full([1], 3, tl.int64)
    tmp13 = tmp0 < tmp12
    tmp14 = tmp11 & tmp13
    tmp15 = tl.load(in_ptr2 + (x0 + (4*x2)), tmp14 & xmask, eviction_policy='evict_last', other=0.0)
    tmp16 = tmp0 >= tmp12
    tmp17 = tl.full([1], 4, tl.int64)
    tmp18 = tmp0 < tmp17
    tmp19 = tl.load(in_ptr3 + (x0 + (4*x2)), tmp16 & xmask, eviction_policy='evict_last', other=0.0)
    tmp20 = tl.where(tmp14, tmp15, tmp19)
    tmp21 = tl.where(tmp9, tmp10, tmp20)
    tmp22 = tl.where(tmp4, tmp5, tmp21)
    tl.store(out_ptr0 + (x3), tmp22, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_2, (4, 16), (16, 1))
    assert_size_stride(primals_3, (16, 8), (8, 1))
    assert_size_stride(primals_4, (8, 4), (4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_1, embedding], Original ATen: [aten.repeat, aten.bmm]
        stream0 = get_raw_stream(0)
        triton_poi_fused_bmm_repeat_0.run(primals_1, buf0, 16, grid=grid(16), stream=stream0)
        buf1 = empty_strided_cuda((4, 4, 16), (64, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_1], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_1.run(primals_2, buf1, 256, grid=grid(256), stream=stream0)
        del primals_2
        buf2 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_1, embedding], Original ATen: [aten.repeat, aten.bmm]
        extern_kernels.bmm(buf0, buf1, out=buf2)
        buf3 = empty_strided_cuda((4, 16, 8), (128, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_2], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_2.run(primals_3, buf3, 512, grid=grid(512), stream=stream0)
        del primals_3
        buf4 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_2, embedding_4], Original ATen: [aten.repeat, aten.bmm]
        extern_kernels.bmm(buf2, buf3, out=buf4)
        buf5 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_3], Original ATen: [aten.repeat]
        triton_poi_fused_repeat_3.run(primals_4, buf5, 128, grid=grid(128), stream=stream0)
        del primals_4
        buf6 = reinterpret_tensor(buf0, (4, 1, 4), (4, 4, 1), 0); del buf0  # reuse
        # Topologically Sorted Source Nodes: [embedding_3, embedding_5], Original ATen: [aten.repeat, aten.bmm]
        extern_kernels.bmm(buf4, buf5, out=buf6)
        buf7 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_6], Original ATen: [aten.bmm]
        triton_poi_fused_bmm_4.run(primals_1, buf7, 16, grid=grid(16), stream=stream0)
        buf8 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_6], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf7, buf1, out=buf8)
        buf9 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_7], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf8, buf3, out=buf9)
        buf10 = reinterpret_tensor(buf7, (4, 1, 4), (4, 4, 1), 0); del buf7  # reuse
        # Topologically Sorted Source Nodes: [embedding_8], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf9, buf5, out=buf10)
        buf11 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_9], Original ATen: [aten.bmm]
        triton_poi_fused_bmm_5.run(primals_1, buf11, 16, grid=grid(16), stream=stream0)
        buf12 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_9], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf11, buf1, out=buf12)
        buf13 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_10], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf12, buf3, out=buf13)
        buf14 = reinterpret_tensor(buf11, (4, 1, 4), (4, 4, 1), 0); del buf11  # reuse
        # Topologically Sorted Source Nodes: [embedding_11], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf13, buf5, out=buf14)
        buf15 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_12], Original ATen: [aten.bmm]
        triton_poi_fused_bmm_6.run(primals_1, buf15, 16, grid=grid(16), stream=stream0)
        buf16 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_12], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf15, buf1, out=buf16)
        del buf1
        buf17 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedding_13], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf16, buf3, out=buf17)
        buf18 = reinterpret_tensor(buf15, (4, 1, 4), (4, 4, 1), 0); del buf15  # reuse
        # Topologically Sorted Source Nodes: [embedding_14], Original ATen: [aten.bmm]
        extern_kernels.bmm(buf17, buf5, out=buf18)
        buf19 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [embedded], Original ATen: [aten.cat]
        triton_poi_fused_cat_7.run(buf6, buf10, buf14, buf18, buf19, 64, grid=grid(64), stream=stream0)
        del buf10
        del buf14
        del buf18
        del buf6
    return (buf19, reinterpret_tensor(buf17, (4, 8, 1), (8, 1, 8), 0), reinterpret_tensor(buf5, (4, 4, 8), (32, 1, 4), 0), reinterpret_tensor(buf16, (4, 16, 1), (16, 1, 16), 0), reinterpret_tensor(buf3, (4, 8, 16), (128, 1, 8), 0), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 3), reinterpret_tensor(buf13, (4, 8, 1), (8, 1, 8), 0), reinterpret_tensor(buf12, (4, 16, 1), (16, 1, 16), 0), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 2), reinterpret_tensor(buf9, (4, 8, 1), (8, 1, 8), 0), reinterpret_tensor(buf8, (4, 16, 1), (16, 1, 16), 0), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 1), reinterpret_tensor(buf4, (4, 8, 1), (8, 1, 8), 0), reinterpret_tensor(buf2, (4, 16, 1), (16, 1, 16), 0), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 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), (16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 16), (16, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((16, 8), (8, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((8, 4), (4, 1), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4])
    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 math
import torch
import torch.nn as nn


class GraphEmbedding(nn.Module):

    def __init__(self, input_size, ebd_size, use_cuda=True, use_sdne=True,
        add_noise=False, is_training=True):
        super(GraphEmbedding, self).__init__()
        self.use_cuda = use_cuda
        self.use_sdne = use_sdne
        self.add_noise = add_noise
        self.is_training = is_training
        ebd_size_1 = ebd_size * 4 if use_sdne else ebd_size
        ebd_size_2 = ebd_size * 2
        ebd_size_3 = ebd_size
        self.embedding_1 = nn.Parameter(torch.FloatTensor(input_size,
            ebd_size_1))
        if self.use_sdne:
            self.embedding_2 = nn.Parameter(torch.FloatTensor(ebd_size_1,
                ebd_size_2))
            self.embedding_3 = nn.Parameter(torch.FloatTensor(ebd_size_2,
                ebd_size_3))
        self.embedding_1.data.uniform_(-(1.0 / math.sqrt(ebd_size_1)), 1.0 /
            math.sqrt(ebd_size_1))
        if self.use_sdne:
            self.embedding_2.data.uniform_(-(1.0 / math.sqrt(ebd_size_2)), 
                1.0 / math.sqrt(ebd_size_2))
            self.embedding_3.data.uniform_(-(1.0 / math.sqrt(ebd_size_3)), 
                1.0 / math.sqrt(ebd_size_3))

    def forward(self, inputs):
        """
        :param inputs: tensor [batch, 2, seq_len]
        :return: embedded: tensor [batch, seq_len, embedding_size]
            Embed each node in the graph to a 128-dimension space
        """
        batch_size = inputs.size(0)
        seq_len = inputs.size(2)
        embedding_1 = self.embedding_1.repeat(batch_size, 1, 1)
        if self.use_sdne:
            embedding_2 = self.embedding_2.repeat(batch_size, 1, 1)
            embedding_3 = self.embedding_3.repeat(batch_size, 1, 1)
        embedded = []
        inputs = inputs.unsqueeze(1)
        for i in range(seq_len):
            embedding = torch.bmm(inputs[:, :, :, i].float(), embedding_1)
            if self.use_sdne:
                embedding = torch.bmm(embedding.float(), embedding_2)
                embedding = torch.bmm(embedding.float(), embedding_3)
            embedded.append(embedding)
        embedded = torch.cat(tuple(embedded), 1)
        return embedded


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


def get_init_inputs():
    return [[], {'input_size': 4, 'ebd_size': 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
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_bmm_repeat_0(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 + 4 * x0, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


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


@triton.jit
def triton_poi_fused_repeat_2(in_ptr0, 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 % 128
    x2 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x2, tmp0, xmask)


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


@triton.jit
def triton_poi_fused_bmm_4(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 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_5(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 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_bmm_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 + (3 + 4 * x0), xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused_cat_7(in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 4
    x0 = xindex % 4
    x2 = xindex // 16
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 4 * x2), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 2, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (x0 + 4 * x2), tmp9 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp11 = tmp0 >= tmp7
    tmp12 = tl.full([1], 3, tl.int64)
    tmp13 = tmp0 < tmp12
    tmp14 = tmp11 & tmp13
    tmp15 = tl.load(in_ptr2 + (x0 + 4 * x2), tmp14 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp16 = tmp0 >= tmp12
    tl.full([1], 4, tl.int64)
    tmp19 = tl.load(in_ptr3 + (x0 + 4 * x2), tmp16 & xmask, eviction_policy
        ='evict_last', other=0.0)
    tmp20 = tl.where(tmp14, tmp15, tmp19)
    tmp21 = tl.where(tmp9, tmp10, tmp20)
    tmp22 = tl.where(tmp4, tmp5, tmp21)
    tl.store(out_ptr0 + x3, tmp22, xmask)


def call(args):
    primals_1, primals_2, primals_3, primals_4 = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_2, (4, 16), (16, 1))
    assert_size_stride(primals_3, (16, 8), (8, 1))
    assert_size_stride(primals_4, (8, 4), (4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_bmm_repeat_0[grid(16)](primals_1, buf0, 16, XBLOCK
            =16, num_warps=1, num_stages=1)
        buf1 = empty_strided_cuda((4, 4, 16), (64, 16, 1), torch.float32)
        triton_poi_fused_repeat_1[grid(256)](primals_2, buf1, 256, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_2
        buf2 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        extern_kernels.bmm(buf0, buf1, out=buf2)
        buf3 = empty_strided_cuda((4, 16, 8), (128, 8, 1), torch.float32)
        triton_poi_fused_repeat_2[grid(512)](primals_3, buf3, 512, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_3
        buf4 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        extern_kernels.bmm(buf2, buf3, out=buf4)
        buf5 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        triton_poi_fused_repeat_3[grid(128)](primals_4, buf5, 128, XBLOCK=
            128, num_warps=4, num_stages=1)
        del primals_4
        buf6 = reinterpret_tensor(buf0, (4, 1, 4), (4, 4, 1), 0)
        del buf0
        extern_kernels.bmm(buf4, buf5, out=buf6)
        buf7 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_4[grid(16)](primals_1, buf7, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf8 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        extern_kernels.bmm(buf7, buf1, out=buf8)
        buf9 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        extern_kernels.bmm(buf8, buf3, out=buf9)
        buf10 = reinterpret_tensor(buf7, (4, 1, 4), (4, 4, 1), 0)
        del buf7
        extern_kernels.bmm(buf9, buf5, out=buf10)
        buf11 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_5[grid(16)](primals_1, buf11, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf12 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        extern_kernels.bmm(buf11, buf1, out=buf12)
        buf13 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        extern_kernels.bmm(buf12, buf3, out=buf13)
        buf14 = reinterpret_tensor(buf11, (4, 1, 4), (4, 4, 1), 0)
        del buf11
        extern_kernels.bmm(buf13, buf5, out=buf14)
        buf15 = empty_strided_cuda((4, 1, 4), (4, 16, 1), torch.float32)
        triton_poi_fused_bmm_6[grid(16)](primals_1, buf15, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf16 = empty_strided_cuda((4, 1, 16), (16, 16, 1), torch.float32)
        extern_kernels.bmm(buf15, buf1, out=buf16)
        del buf1
        buf17 = empty_strided_cuda((4, 1, 8), (8, 8, 1), torch.float32)
        extern_kernels.bmm(buf16, buf3, out=buf17)
        buf18 = reinterpret_tensor(buf15, (4, 1, 4), (4, 4, 1), 0)
        del buf15
        extern_kernels.bmm(buf17, buf5, out=buf18)
        buf19 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        triton_poi_fused_cat_7[grid(64)](buf6, buf10, buf14, buf18, buf19, 
            64, XBLOCK=64, num_warps=1, num_stages=1)
        del buf10
        del buf14
        del buf18
        del buf6
    return buf19, reinterpret_tensor(buf17, (4, 8, 1), (8, 1, 8), 0
        ), reinterpret_tensor(buf5, (4, 4, 8), (32, 1, 4), 0
        ), reinterpret_tensor(buf16, (4, 16, 1), (16, 1, 16), 0
        ), reinterpret_tensor(buf3, (4, 8, 16), (128, 1, 8), 0
        ), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 3
        ), reinterpret_tensor(buf13, (4, 8, 1), (8, 1, 8), 0
        ), reinterpret_tensor(buf12, (4, 16, 1), (16, 1, 16), 0
        ), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 2
        ), reinterpret_tensor(buf9, (4, 8, 1), (8, 1, 8), 0
        ), reinterpret_tensor(buf8, (4, 16, 1), (16, 1, 16), 0
        ), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 1
        ), reinterpret_tensor(buf4, (4, 8, 1), (8, 1, 8), 0
        ), reinterpret_tensor(buf2, (4, 16, 1), (16, 1, 16), 0
        ), reinterpret_tensor(primals_1, (4, 4, 1), (16, 4, 16), 0)


class GraphEmbeddingNew(nn.Module):

    def __init__(self, input_size, ebd_size, use_cuda=True, use_sdne=True,
        add_noise=False, is_training=True):
        super(GraphEmbeddingNew, self).__init__()
        self.use_cuda = use_cuda
        self.use_sdne = use_sdne
        self.add_noise = add_noise
        self.is_training = is_training
        ebd_size_1 = ebd_size * 4 if use_sdne else ebd_size
        ebd_size_2 = ebd_size * 2
        ebd_size_3 = ebd_size
        self.embedding_1 = nn.Parameter(torch.FloatTensor(input_size,
            ebd_size_1))
        if self.use_sdne:
            self.embedding_2 = nn.Parameter(torch.FloatTensor(ebd_size_1,
                ebd_size_2))
            self.embedding_3 = nn.Parameter(torch.FloatTensor(ebd_size_2,
                ebd_size_3))
        self.embedding_1.data.uniform_(-(1.0 / math.sqrt(ebd_size_1)), 1.0 /
            math.sqrt(ebd_size_1))
        if self.use_sdne:
            self.embedding_2.data.uniform_(-(1.0 / math.sqrt(ebd_size_2)), 
                1.0 / math.sqrt(ebd_size_2))
            self.embedding_3.data.uniform_(-(1.0 / math.sqrt(ebd_size_3)), 
                1.0 / math.sqrt(ebd_size_3))

    def forward(self, input_0):
        primals_2 = self.embedding_1
        primals_3 = self.embedding_2
        primals_4 = self.embedding_3
        primals_1 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4])
        return output[0]
