Skip to content

Commit 83eb490

Browse files
authored
Bug fixes for shared_embedding (#1941)
up
1 parent 84ce855 commit 83eb490

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchao/experimental/ops/embedding_xbit/op_embedding_xbit-impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ Tensor shared_embedding_out_cpu(
330330
} else {
331331
index = index64_ptr[idx];
332332
}
333-
TORCHAO_CHECK(index >= 0 && index < k, "index out of bounds");
333+
TORCHAO_CHECK(index >= 0 && index < n, "index out of bounds");
334334
#if defined(TORCHAO_BUILD_CPU_AARCH64)
335335
torchao::kernels::cpu::aarch64::embedding::
336336
shared_embedding<weight_nbit, nr, kr, sr>(

torchao/experimental/ops/embedding_xbit/op_embedding_xbit_executorch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ DEFINE_OP(8);
5656
EXECUTORCH_LIBRARY( \
5757
torchao, \
5858
"_shared_embedding_" #weight_nbit "bit.out", \
59-
_op_out_##weight_nbit)
59+
_shared_op_out_##weight_nbit)
6060

6161
DEFINE_SHARED_OP(1);
6262
DEFINE_SHARED_OP(2);

0 commit comments

Comments
 (0)