Repository: pytorch
Issue: AddressSanitizer: heap-buffer-overflow in test_comprehensive_nn_functional_embedding_bag_cpu_bfloat16 
Labels: needs reproduction,module: cpu,triaged,module: embedding,module: decompositions

### 🐛 Describe the bug

When running test `test/test_decomp.py::TestDecompCPU::test_comprehensive_nn_functional_embedding_bag_cpu_bfloat16` I'm getting following ASAN error:

<details>
<summary>ASAN report</summary>

```
=================================================================
==43274==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60900000586c at pc 0x7f56da7aacd9 bp 0x7ffd155f5940 sp 0x7ffd155f5930
READ of size 2 at 0x60900000586c thread T0
    #0 0x7f56da7aacd8 in operator() /home/user/pytorch/aten/src/ATen/native/cpu/BlasKernel.cpp:298
    #1 0x7f56da7acaac in operator() /home/user/pytorch/aten/src/ATen/native/cpu/BlasKernel.cpp:298
    #2 0x7f56da7ad1f7 in cpublas_axpy_impl /home/user/pytorch/aten/src/ATen/native/cpu/BlasKernel.cpp:298
    #3 0x7f56c640d161 in void at::native::DispatchStub<void (*)(c10::ScalarType, long, c10::Scalar const&, void const*, long, void*, long), at::native::cpublas::axpy_stub>::operator()<c10::ScalarType const&, long&, c10::BFloat16&, c10::BFloat16 const*&, long&, c10::BFloat16*&, long&>(c10::DeviceType, c10::ScalarType const&, long&, c10::BFloat16&, c10::BFloat16 const*&, long&, c10::BFloat16*&, long&) /home/user/pytorch/aten/src/ATen/native/DispatchStub.h:160
    #4 0x7f56c64094ff in void at::native::cpublas::axpy<c10::BFloat16>(long, c10::BFloat16, c10::BFloat16 const*, long, c10::BFloat16*, long) /home/user/pytorch/aten/src/ATen/native/CPUBlas.h:133
    #5 0x7f56c63f6382 in at::native::_embedding_bag_dense_backward_cpu_sum_mean<c10::BFloat16>(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, long, bool, long, at::Tensor const&, at::Tensor&, long)::{lambda()#1}::operator()() const::{lambda()#2}::operator()() const::{lambda(long, long)#1}::operator()(long, long) const /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1547
    #6 0x7f56c63f59a5 in at::native::_embedding_bag_dense_backward_cpu_sum_mean<c10::BFloat16>(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, long, bool, long, at::Tensor const&, at::Tensor&, long)::{lambda()#1}::operator()() const::{lambda()#2}::operator()() const /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1547
    #7 0x7f56c63f3921 in at::native::_embedding_bag_dense_backward_cpu_sum_mean<c10::BFloat16>(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, long, bool, long, at::Tensor const&, at::Tensor&, long)::{lambda()#1}::operator()() const /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1547
    #8 0x7f56c63f6c1c in void at::native::_embedding_bag_dense_backward_cpu_sum_mean<c10::BFloat16>(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, long, bool, long, at::Tensor const&, at::Tensor&, long) /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1547
    #9 0x7f56c63a0eac in operator() /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1631
    #10 0x7f56c63a208d in operator() /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1631
    #11 0x7f56c63a2dbb in at::native::_embedding_bag_dense_backward_cpu(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, long, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1631
    #12 0x7f56ca10d278 in wrapper_CPU___embedding_bag_dense_backward /home/user/pytorch/build/aten/src/ATen/RegisterCPU.cpp:5122
    #13 0x7f56ca5a9072 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #14 0x7f56ca5a9072 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463
    #15 0x7f56ca740085 in call_functor_with_args_from_stack_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int), at::(anonymous namespace)::(anonymous namespace)::wrapper_CPU___embedding_bag_dense_backward>, at::Tensor, c10::guts::typelist::typelist<const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> >, false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:501
    #16 0x7f56ca6d4cc4 in call_functor_with_args_from_stack<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int), at::(anonymous namespace)::(anonymous namespace)::wrapper_CPU___embedding_bag_dense_backward>, at::Tensor, c10::guts::typelist::typelist<const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> >, false> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:513
    #17 0x7f56ca5a92be in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:584
    #18 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #19 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #20 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #21 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #22 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #23 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #24 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #25 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #26 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #27 0x7f57022d3487 in c10::Dispatcher::callBoxed(c10::OperatorHandle const&, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:696
    #28 0x7f56c53e21b4 in c10::OperatorHandle::callBoxed(std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:422
    #29 0x7f56d780ad18 in c10::OperatorHandle::callBoxed(std::vector<c10::IValue, std::allocator<c10::IValue> >&) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:426
    #30 0x7f56d7807a16 in operator() /home/user/pytorch/torch/csrc/jit/runtime/register_c10_ops.cpp:15
    #31 0x7f56d780a944 in __invoke_impl<void, torch::jit::(anonymous namespace)::createOperatorFromC10(const c10::OperatorHandle&)::<lambda(torch::jit::Stack&)>&, std::vector<c10::IValue, std::allocator<c10::IValue> >&> /usr/lib/gcc/x86_64-pc-linux-gnu/11/include/g++-v11/bits/invoke.h:61
    #32 0x7f56d780a723 in __invoke_r<void, torch::jit::(anonymous namespace)::createOperatorFromC10(const c10::OperatorHandle&)::<lambda(torch::jit::Stack&)>&, std::vector<c10::IValue, std::allocator<c10::IValue> >&> /usr/lib/gcc/x86_64-pc-linux-gnu/11/include/g++-v11/bits/invoke.h:111
    #33 0x7f56d780a3e0 in _M_invoke /usr/lib/gcc/x86_64-pc-linux-gnu/11/include/g++-v11/bits/std_function.h:290
    #34 0x7f57017ff99c in std::function<void (std::vector<c10::IValue, std::allocator<c10::IValue> >&)>::operator()(std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x321299c)
    #35 0x7f57017f1538 in torch::jit::Operation::operator()(std::vector<c10::IValue, std::allocator<c10::IValue> >&) /home/user/pytorch/aten/src/ATen/core/stack.h:41
    #36 0x7f57017e27b9 in torch::jit::invokeOperatorFromPython(std::vector<std::shared_ptr<torch::jit::Operator>, std::allocator<std::shared_ptr<torch::jit::Operator> > > const&, pybind11::args, pybind11::kwargs const&, c10::optional<c10::DispatchKey>) /home/user/pytorch/torch/csrc/jit/python/pybind_utils.cpp:764
    #37 0x7f57017e3d2b in torch::jit::_get_operation_for_overload_or_packet(std::vector<std::shared_ptr<torch::jit::Operator>, std::allocator<std::shared_ptr<torch::jit::Operator> > > const&, c10::Symbol, pybind11::args, pybind11::kwargs const&, bool, c10::optional<c10::DispatchKey>) /home/user/pytorch/torch/csrc/jit/python/pybind_utils.cpp:829
    #38 0x7f570134edb5 in operator() /home/user/pytorch/torch/csrc/jit/python/init.cpp:1551
    #39 0x7f570142f32f in call_impl<pybind11::object, torch::jit::initJITBindings(PyObject*)::<lambda(const string&, const string&)>::<lambda(pybind11::args, pybind11::kwargs)>&, 0, 1, pybind11::detail::void_type> /home/user/pytorch/torch/include/pybind11/cast.h:1439
    #40 0x7f5701406a6a in call<pybind11::object, pybind11::detail::void_type, torch::jit::initJITBindings(PyObject*)::<lambda(const string&, const string&)>::<lambda(pybind11::args, pybind11::kwargs)>&> /home/user/pytorch/torch/include/pybind11/cast.h:1408
    #41 0x7f57013abeac in operator() /home/user/pytorch/torch/include/pybind11/pybind11.h:249
    #42 0x7f57013ac04f in _FUN /home/user/pytorch/torch/include/pybind11/pybind11.h:224
    #43 0x7f5700381365 in pybind11::cpp_function::dispatcher(_object*, _object*, _object*) /home/user/pytorch/torch/include/pybind11/pybind11.h:929
    #44 0x7f57356cdb72 in cfunction_call Objects/methodobject.c:543
    #45 0x7f5735678d7a in _PyObject_Call Objects/call.c:305
    #46 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #47 0x7f5735790f52 in do_call_core Python/ceval.c:5915
    #48 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #49 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #50 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #51 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #52 0x7f5735678844 in _PyObject_FastCallDictTstate Objects/call.c:142
    #53 0x7f5735679110 in _PyObject_Call_Prepend Objects/call.c:431
    #54 0x7f57356f8cad in slot_tp_call Objects/typeobject.c:7494
    #55 0x7f5735678d7a in _PyObject_Call Objects/call.c:305
    #56 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #57 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #58 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #59 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #60 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #61 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #62 0x7f573567b939 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #63 0x7f573567bd3b in method_vectorcall Objects/classobject.c:83
    #64 0x7f5735678404 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #65 0x7f57356792a2 in _PyObject_CallFunctionVa Objects/call.c:485
    #66 0x7f573567966e in callmethod Objects/call.c:557
    #67 0x7f5735679797 in PyObject_CallMethod Objects/call.c:577
    #68 0x7f570225e0e7 in torch::handle_torch_function_no_python_arg_parser(c10::ArrayRef<pybind11::handle>, _object*, _object*, char const*, _object*, char const*, torch::TorchFunctionName) /home/user/pytorch/torch/csrc/utils/python_arg_parser.cpp:338
    #69 0x7f5700f67e93 in dispatch /home/user/pytorch/torch/csrc/PyInterpreter.cpp:322
    #70 0x7f56c5bff57d in pythonFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:58
    #71 0x7f56c5c028c6 in make_boxed_function<(anonymous namespace)::pythonFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:145
    #72 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #73 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #74 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #75 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #76 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #77 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #78 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #79 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #80 0x7f56c85ec079 in c10::impl::BoxedKernelWrapper<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long), void>::call(c10::BoxedKernel const&, c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/aten/src/ATen/core/boxing/impl/boxing.h:227
    #81 0x7f56c82d2c4f in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:112
    #82 0x7f56c82d2c4f in at::Tensor c10::Dispatcher::redispatch<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long>(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long)> const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:661
    #83 0x7f56c9bd261c in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long)>::redispatch(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:497
    #84 0x7f56c9bd261c in at::_ops::_embedding_bag_dense_backward::redispatch(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/Operators_4.cpp:2145
    #85 0x7f56d3816017 in at::redispatch::_embedding_bag_dense_backward_symint(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/RedispatchFunctions.h:2677
    #86 0x7f56d34ed0d2 in operator() /home/user/pytorch/torch/csrc/autograd/generated/VariableType_4.cpp:361
    #87 0x7f56d34ee173 in _embedding_bag_dense_backward /home/user/pytorch/torch/csrc/autograd/generated/VariableType_4.cpp:363
    #88 0x7f56d3759e45 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #89 0x7f56d3759e45 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:480
    #90 0x7f56d37d347c in call_functor_with_args_from_stack_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(c10::DispatchKeySet, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int), torch::autograd::VariableType::(anonymous namespace)::_embedding_bag_dense_backward>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> >, false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:501
    #91 0x7f56d37bacde in call_functor_with_args_from_stack<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(c10::DispatchKeySet, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int), torch::autograd::VariableType::(anonymous namespace)::_embedding_bag_dense_backward>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, const c10::optional<at::Tensor>&, long int> >, false> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:513
    #92 0x7f56d375a0a0 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:584
    #93 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #94 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #95 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #96 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #97 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #98 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #99 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #100 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #101 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #102 0x7f56c534c714 in c10::Dispatcher::redispatchBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe1f5714)
    #103 0x7f56c534c466 in c10::OperatorHandle::redispatchBoxed(c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe1f5466)
    #104 0x7f56c5bffd62 in pythonTLSSnapshotFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:107
    #105 0x7f56c5c02aaf in make_boxed_function<(anonymous namespace)::pythonTLSSnapshotFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:153
    #106 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #107 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #108 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #109 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #110 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #111 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #112 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #113 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #114 0x7f56c85ec079 in c10::impl::BoxedKernelWrapper<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long), void>::call(c10::BoxedKernel const&, c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/aten/src/ATen/core/boxing/impl/boxing.h:227
    #115 0x7f56c9bd1c62 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:112
    #116 0x7f56c9bd1c62 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long>(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long)> const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:644
    #117 0x7f56c9bd1c62 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long)>::call(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:492
    #118 0x7f56c9bd1c62 in at::_ops::_embedding_bag_dense_backward::call(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/Operators_4.cpp:2138
    #119 0x7f56c63d6233 in at::_embedding_bag_dense_backward_symint(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/ops/_embedding_bag_dense_backward.h:38
    #120 0x7f56c639ef48 in at::native::_embedding_bag_backward_symint(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) /home/user/pytorch/aten/src/ATen/native/EmbeddingBag.cpp:1450
    #121 0x7f56cb1674ed in wrapper_CompositeImplicitAutograd___embedding_bag_backward /home/user/pytorch/build/aten/src/ATen/RegisterCompositeImplicitAutograd.cpp:2372
    #122 0x7f56cb40acd7 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #123 0x7f56cb40acd7 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463
    #124 0x7f56cb5419de in call_functor_with_args_from_stack_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, bool, const c10::optional<at::Tensor>&, long int), at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutograd___embedding_bag_backward>, at::Tensor, c10::guts::typelist::typelist<const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, bool, const c10::optional<at::Tensor>&, long int> >, false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, bool, const c10::optional<at::Tensor>&, long int> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:501
    #125 0x7f56cb4e7258 in call_functor_with_args_from_stack<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, bool, const c10::optional<at::Tensor>&, long int), at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutograd___embedding_bag_backward>, at::Tensor, c10::guts::typelist::typelist<const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, c10::SymInt, bool, long int, bool, const c10::optional<at::Tensor>&, long int> >, false> /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:513
    #126 0x7f56cb40af1f in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:584
    #127 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #128 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #129 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #130 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #131 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #132 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #133 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #134 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #135 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #136 0x7f56c534c714 in c10::Dispatcher::redispatchBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe1f5714)
    #137 0x7f56c534c466 in c10::OperatorHandle::redispatchBoxed(c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe1f5466)
    #138 0x7f56c5bffd62 in pythonTLSSnapshotFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:107
    #139 0x7f56c5c02aaf in make_boxed_function<(anonymous namespace)::pythonTLSSnapshotFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:153
    #140 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #141 0x7f5700f7acc8 in c10::KernelFunction::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:43
    #142 0x7f5700f7c6f1 in c10::Dispatcher::callBoxedForDispatchKey(c10::OperatorHandle const&, c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f6f1)
    #143 0x7f5700f7c001 in c10::OperatorHandle::callBoxedForDispatchKey(c10::DispatchKey, std::vector<c10::IValue, std::allocator<c10::IValue> >&) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_python.so+0x298f001)
    #144 0x7f5700f68a9c in python_dispatcher /home/user/pytorch/torch/csrc/PyInterpreter.cpp:358
    #145 0x7f56c5bffbc9 in pythonDispatcherFallback /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:98
    #146 0x7f56c5c02991 in make_boxed_function<(anonymous namespace)::pythonDispatcherFallback> /home/user/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:149
    #147 0x7f5700f7a988 in c10::BoxedKernel::callBoxed(c10::OperatorHandle const&, c10::DispatchKeySet, std::vector<c10::IValue, std::allocator<c10::IValue> >*) const /home/user/pytorch/aten/src/ATen/core/boxing/BoxedKernel_impl.h:41
    #148 0x7f56c9f58d91 in c10::impl::BoxedKernelWrapper<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long), void>::call(c10::BoxedKernel const&, c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) /home/user/pytorch/aten/src/ATen/core/boxing/impl/boxing.h:227
    #149 0x7f56c9bcf7f4 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:112
    #150 0x7f56c9bcf7f4 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long>(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long)> const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:644
    #151 0x7f56c9bcf7f4 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long)>::call(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:492
    #152 0x7f56c9bcf7f4 in at::_ops::_embedding_bag_backward::call(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/Operators_4.cpp:2113
    #153 0x7f56d21f8e86 in at::_embedding_bag_backward_symint(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::SymInt, bool, long, bool, c10::optional<at::Tensor> const&, long) /home/user/pytorch/build/aten/src/ATen/ops/_embedding_bag_backward.h:38
    #154 0x7f56d210a453 in torch::autograd::generated::EmbeddingBagBackward0::apply(std::vector<at::Tensor, std::allocator<at::Tensor> >&&) /home/user/pytorch/torch/csrc/autograd/generated/Functions.cpp:6307
    #155 0x7f56d59276a1 in torch::autograd::Node::operator()(std::vector<at::Tensor, std::allocator<at::Tensor> >&&) /home/user/pytorch/torch/csrc/autograd/function.h:184
    #156 0x7f56d5913ae1 in call_function /home/user/pytorch/torch/csrc/autograd/engine.cpp:918
    #157 0x7f56d5914d6e in torch::autograd::Engine::evaluate_function(std::shared_ptr<torch::autograd::GraphTask>&, torch::autograd::Node*, torch::autograd::InputBuffer&, std::shared_ptr<torch::autograd::ReadyQueue> const&) /home/user/pytorch/torch/csrc/autograd/engine.cpp:983
    #158 0x7f56d590ce36 in torch::autograd::Engine::thread_main(std::shared_ptr<torch::autograd::GraphTask> const&) /home/user/pytorch/torch/csrc/autograd/engine.cpp:545
    #159 0x7f56d5919e11 in torch::autograd::Engine::execute_with_graph_task(std::shared_ptr<torch::autograd::GraphTask> const&, std::shared_ptr<torch::autograd::Node>, torch::autograd::InputBuffer&&) /home/user/pytorch/torch/csrc/autograd/engine.cpp:1262
    #160 0x7f57011bf875 in torch::autograd::python::PythonEngine::execute_with_graph_task(std::shared_ptr<torch::autograd::GraphTask> const&, std::shared_ptr<torch::autograd::Node>, torch::autograd::InputBuffer&&) /home/user/pytorch/torch/csrc/autograd/python_engine.cpp:152
    #161 0x7f56d5918e14 in torch::autograd::Engine::execute(std::vector<torch::autograd::Edge, std::allocator<torch::autograd::Edge> > const&, std::vector<at::Tensor, std::allocator<at::Tensor> > const&, bool, bool, bool, std::vector<torch::autograd::Edge, std::allocator<torch::autograd::Edge> > const&) /home/user/pytorch/torch/csrc/autograd/engine.cpp:1209
    #162 0x7f57011bf6c1 in torch::autograd::python::PythonEngine::execute(std::vector<torch::autograd::Edge, std::allocator<torch::autograd::Edge> > const&, std::vector<at::Tensor, std::allocator<at::Tensor> > const&, bool, bool, bool, std::vector<torch::autograd::Edge, std::allocator<torch::autograd::Edge> > const&) /home/user/pytorch/torch/csrc/autograd/python_engine.cpp:139
    #163 0x7f57011c1cad in THPEngine_run_backward(_object*, _object*, _object*) /home/user/pytorch/torch/csrc/autograd/python_engine.cpp:333
    #164 0x7f57356cdb72 in cfunction_call Objects/methodobject.c:543
    #165 0x7f5735678a95 in _PyObject_MakeTpCall Objects/call.c:215
    #166 0x7f573577e4eb in _PyObject_VectorcallTstate Include/cpython/abstract.h:112
    #167 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #168 0x7f5735790d6e in call_function Python/ceval.c:5891
    #169 0x7f573578c4ea in _PyEval_EvalFrameDefault Python/ceval.c:4231
    #170 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #171 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #172 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #173 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #174 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #175 0x7f5735790d6e in call_function Python/ceval.c:5891
    #176 0x7f573578c4ea in _PyEval_EvalFrameDefault Python/ceval.c:4231
    #177 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #178 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #179 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #180 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #181 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #182 0x7f5735790d6e in call_function Python/ceval.c:5891
    #183 0x7f573578c4ea in _PyEval_EvalFrameDefault Python/ceval.c:4231
    #184 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #185 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #186 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #187 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #188 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #189 0x7f5735790d6e in call_function Python/ceval.c:5891
    #190 0x7f573578c3a4 in _PyEval_EvalFrameDefault Python/ceval.c:4213
    #191 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #192 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #193 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #194 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #195 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #196 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #197 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #198 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #199 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #200 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #201 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #202 0x7f573567b939 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #203 0x7f573567bc2d in method_vectorcall Objects/classobject.c:53
    #204 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #205 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #206 0x7f5735790d6e in call_function Python/ceval.c:5891
    #207 0x7f573578c4ea in _PyEval_EvalFrameDefault Python/ceval.c:4231
    #208 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #209 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #210 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #211 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #212 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #213 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #214 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #215 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #216 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #217 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #218 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #219 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #220 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #221 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #222 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #223 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #224 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #225 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #226 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #227 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #228 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #229 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #230 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #231 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #232 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #233 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #234 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #235 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #236 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #237 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #238 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #239 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #240 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #241 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #242 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #243 0x7f5735678c5f in PyVectorcall_Call Objects/call.c:267
    #244 0x7f5735678ce9 in _PyObject_Call Objects/call.c:290
    #245 0x7f5735678dda in PyObject_Call Objects/call.c:317
    #246 0x7f5735791193 in do_call_core Python/ceval.c:5943
    #247 0x7f573578c7d0 in _PyEval_EvalFrameDefault Python/ceval.c:4277
    #248 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #249 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #250 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #251 0x7f573567b939 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #252 0x7f573567bc2d in method_vectorcall Objects/classobject.c:53
    #253 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114
    #254 0x7f573577e566 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #255 0x7f5735790d6e in call_function Python/ceval.c:5891
    #256 0x7f573578c3a4 in _PyEval_EvalFrameDefault Python/ceval.c:4213
    #257 0x7f573577e7ba in _PyEval_EvalFrame Include/internal/pycore_ceval.h:46
    #258 0x7f573578f03f in _PyEval_Vector Python/ceval.c:5065
    #259 0x7f5735678e8c in _PyFunction_Vectorcall Objects/call.c:342
    #260 0x7f573577e507 in _PyObject_VectorcallTstate Include/cpython/abstract.h:114

0x60900000586c is located 20 bytes to the left of 20-byte region [0x609000005880,0x609000005894)
allocated by thread T0 here:
    #0 0x7f5735a8a1ec in __interceptor_posix_memalign (/usr/lib/gcc/x86_64-pc-linux-gnu/11/libasan.so.6+0xb41ec)
    #1 0x7f56b6f7e74f in c10::alloc_cpu(unsigned long) /home/user/pytorch/c10/core/impl/alloc_cpu.cpp:74
    #2 0x7f56b6ed38c4 in c10::DefaultCPUAllocator::allocate(unsigned long) const (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libc10.so+0x818c4)
    #3 0x7f56c537a2fc in c10::StorageImpl::StorageImpl(c10::StorageImpl::use_byte_size_t, c10::SymInt, c10::Allocator*, bool) (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe2232fc)
    #4 0x7f56c53888dd in c10::intrusive_ptr<c10::StorageImpl, c10::detail::intrusive_target_default_null_type<c10::StorageImpl> > c10::intrusive_ptr<c10::StorageImpl, c10::detail::intrusive_target_default_null_type<c10::StorageImpl> >::make<c10::StorageImpl::use_byte_size_t, unsigned long&, c10::Allocator*&, bool>(c10::StorageImpl::use_byte_size_t&&, unsigned long&, c10::Allocator*&, bool&&) (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe2318dd)
    #5 0x7f56c5387618 in c10::intrusive_ptr<c10::StorageImpl, c10::detail::intrusive_target_default_null_type<c10::StorageImpl> > c10::make_intrusive<c10::StorageImpl, c10::detail::intrusive_target_default_null_type<c10::StorageImpl>, c10::StorageImpl::use_byte_size_t, unsigned long&, c10::Allocator*&, bool>(c10::StorageImpl::use_byte_size_t&&, unsigned long&, c10::Allocator*&, bool&&) (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe230618)
    #6 0x7f56c538484c in at::TensorBase at::detail::_empty_strided_generic<c10::ArrayRef<long> >(c10::ArrayRef<long>, c10::ArrayRef<long>, c10::Allocator*, c10::DispatchKeySet, c10::ScalarType) (/home/user/pytorch/build/lib.linux-x86_64-cpython-310/torch/lib/libtorch_cpu.so+0xe22d84c)
    #7 0x7f56c5375ab7 in at::detail::empty_strided_generic(c10::ArrayRef<long>, c10::ArrayRef<long>, c10::Allocator*, c10::DispatchKeySet, c10::ScalarType) /home/user/pytorch/aten/src/ATen/EmptyTensor.cpp:220
    #8 0x7f56c537668c in at::detail::empty_strided_cpu(c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ScalarType, bool) /home/user/pytorch/aten/src/ATen/EmptyTensor.cpp:270
    #9 0x7f56c53769d6 in at::detail::empty_strided_cpu(c10::ArrayRef<long>, c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) /home/user/pytorch/aten/src/ATen/EmptyTensor.cpp:285
    #10 0x7f56c6ec8407 in at::native::empty_strided_cpu(c10::ArrayRef<long>, c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) /home/user/pytorch/aten/src/ATen/native/TensorFactories.cpp:323
    #11 0x7f56ca10ddfb in wrapper_CPU__empty_strided /home/user/pytorch/build/aten/src/ATen/RegisterCPU.cpp:5164
    #12 0x7f56ca5ad1ff in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #13 0x7f56ca5ad1ff in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463
    #14 0x7f56c94d244a in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, c10::ArrayRef<c10::SymInt>&&, c10::optional<c10::ScalarType>&&, c10::optional<c10::Layout>&&, c10::optional<c10::Device>&&, c10::optional<bool>&&) /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:50
    #15 0x7f56c927b3a1 in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:91
    #16 0x7f56c927b3a1 in at::Tensor c10::Dispatcher::redispatch<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>)> const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:661
    #17 0x7f56c8f7d884 in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>)>::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:497
    #18 0x7f56c8f7d884 in at::_ops::empty_strided::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) /home/user/pytorch/build/aten/src/ATen/Operators_2.cpp:3299
    #19 0x7f56ca025796 in empty_strided /home/user/pytorch/build/aten/src/ATen/RegisterBackendSelect.cpp:211
    #20 0x7f56ca06e958 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #21 0x7f56ca06e958 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463
    #22 0x7f56c94d244a in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, c10::ArrayRef<c10::SymInt>&&, c10::optional<c10::ScalarType>&&, c10::optional<c10::Layout>&&, c10::optional<c10::Device>&&, c10::optional<bool>&&) /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:50
    #23 0x7f56c8f7c4a5 in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:91
    #24 0x7f56c8f7c4a5 in at::Tensor c10::Dispatcher::call<at::Tensor, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>)> const&, c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:644
    #25 0x7f56c8f7c4a5 in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>)>::call(c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:492
    #26 0x7f56c8f7c4a5 in at::_ops::empty_strided::call(c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) /home/user/pytorch/build/aten/src/ATen/Operators_2.cpp:3292
    #27 0x7f56c6f0786b in at::empty_strided_symint(c10::ArrayRef<c10::SymInt>, c10::ArrayRef<c10::SymInt>, c10::TensorOptions) /home/user/pytorch/build/aten/src/ATen/ops/empty_strided.h:49
    #28 0x7f56c6eca0b3 in at::native::empty_like(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) /home/user/pytorch/aten/src/ATen/native/TensorFactories.cpp:385
    #29 0x7f56ca8f5bf7 in wrapper_CompositeExplicitAutograd__empty_like /home/user/pytorch/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:2151
    #30 0x7f56cab9c408 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #31 0x7f56cab9c408 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463
    #32 0x7f56c8d883fa in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::optional<c10::ScalarType>&&, c10::optional<c10::Layout>&&, c10::optional<c10::Device>&&, c10::optional<bool>&&, c10::optional<c10::MemoryFormat>&&) /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:50
    #33 0x7f56c96adcb2 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) const /home/user/pytorch/aten/src/ATen/core/boxing/KernelFunction_impl.h:103
    #34 0x7f56c96adcb2 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>)> const&, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:644
    #35 0x7f56c96adcb2 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>)>::call(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) const /home/user/pytorch/aten/src/ATen/core/dispatch/Dispatcher.h:492
    #36 0x7f56c96adcb2 in at::_ops::empty_like::call(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) /home/user/pytorch/build/aten/src/ATen/Operators_3.cpp:2902
    #37 0x7f56c55a2ff0 in at::empty_like(at::Tensor const&, c10::TensorOptions, c10::optional<c10::MemoryFormat>) /home/user/pytorch/build/aten/src/ATen/ops/empty_like.h:27
    #38 0x7f56c6edc073 in at::native::randn_like(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) /home/user/pytorch/aten/src/ATen/native/TensorFactories.cpp:983
    #39 0x7f56ca903e17 in wrapper_CompositeExplicitAutograd__randn_like /home/user/pytorch/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:3397
    #40 0x7f56cabec086 in operator() /home/user/pytorch/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13
    #41 0x7f56cabec086 in call /home/user/pytorch/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:463

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/user/pytorch/aten/src/ATen/native/cpu/BlasKernel.cpp:298 in operator()
Shadow bytes around the buggy address:
  0x0c127fff8ab0: fa fa fa fa fa fa fa fa fd fa fa fa fa fa fa fa
  0x0c127fff8ac0: fa fa fa fa fa fa fa fa fd fa fa fa fa fa fa fa
  0x0c127fff8ad0: fa fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa
  0x0c127fff8ae0: fa fa fa fa fa fa fa fa fd fd fd fa fa fa fa fa
  0x0c127fff8af0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c127fff8b00: fd fd fd fd fd fa fa fa fa fa fa fa fa[fa]fa fa
  0x0c127fff8b10: 00 00 04 fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8b20: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8b30: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8b40: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fa fa
  0x0c127fff8b50: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==43274==ABORTING
```
</details>

My test run command:
`ASAN_OPTIONS=halt_on_error=0:detect_leaks=0 LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/11/libasan.so.6 pytest -v test/test_decomp.py -k test_comprehensive_nn_functional_embedding_bag_cpu_bfloat16`

Used build options:
`CFLAGS='-O0 -g -ggdb' VERBOSE=1 USE_FBGEMM=OFF BUILD_CAFFE2=1 BUILD_LIBTORCH_CPU_WITH_DEBUG=y CMAKE_BUILD_TYPE=Debug DEBUG=1 python3 setup.py build --debug --cmake`

Reproduces for me both on x86_64 and s390x.

### Versions

PyTorch version: 2.1.0a0+gitab0a821
Is debug build: True
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Gentoo Linux (x86_64)
GCC version: (Gentoo 11.3.1_p20230120-r1 p7) 11.3.1 20230120
Clang version: 16.0.0
CMake version: version 3.25.2
Libc version: glibc-2.36

Python version: 3.10.10 (main, May 22 2023, 23:09:14) [GCC 11.3.1 20230120] (64-bit runtime)
Python platform: Linux-4.18.0-425.19.2.el8_7.x86_64-x86_64-11th_Gen_Intel-R-_Core-TM-_i7-1165G7_@_2.80GHz-with-glibc2.36
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   39 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          8
On-line CPU(s) list:             0-7
Vendor ID:                       GenuineIntel
Model name:                      11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
CPU family:                      6
Model:                           140
Thread(s) per core:              2
Core(s) per socket:              4
Socket(s):                       1
Stepping:                        1
CPU(s) scaling MHz:              31%
CPU max MHz:                     4700.0000
CPU min MHz:                     400.0000
BogoMIPS:                        5606.40
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       192 KiB (4 instances)
L1i cache:                       128 KiB (4 instances)
L2 cache:                        5 MiB (4 instances)
L3 cache:                        12 MiB (1 instance)
NUMA node(s):                    1
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] flake8==6.0.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.11.1
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] mypy==0.960
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.23.1
[conda] Could not collect

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @SherlockNoMad @ngimel