fn
embedding_op
→TensorImplPtrint embedding_op(const int & weight, const int & indices, int padding_idx)Python wrappers
Public Python APIs implemented by this engine symbol.Integer-index embedding lookup — free-function entry point.
Thin wrapper that delegates to EmbeddingBackward::forward.
Used by the pybind11 binding layer and by other C++ call sites.
Parameters
weightTensorImplPtrEmbedding matrix of shape
(num_embeddings, embed_dim).indicesTensorImplPtrInteger-typed tensor of any shape.
padding_idxintIndex to mask; negative disables masking.
Returns
TensorImplPtrOutput of shape (*indices.shape, embed_dim).