自定义算子完成后调用报错
收藏回复举报
自定义算子完成后调用报错
t('forum.solved') 已解决
发表于2025-05-30 09:55:19
0 查看
报错的代码是:print(dir(torch.ops.fbgemm.dense_to_jagged)),报错如下所示:
 

terminate called after throwing an instance of 'c10::Error' 

  what(): 

Mismatch in kernel C++ signatures 

  operator: fbgemm::jagged_to_padded_dense_forward 

    no debug info 

  kernel 1: at::Tensor (at::Tensor const&, std::vector<at::Tensor, std::allocator<at::Tensor> > const&, c10::ArrayRef<c10::SymInt>, double) 

    dispatch key: PrivateUse1 

    registered at build/CMakeFiles/torch_npu.dir/compiler_depend.ts:60 

  kernel 2: at::Tensor (at::Tensor const&, std::vector<at::Tensor, std::allocator<at::Tensor> > const&, c10::ArrayRef<c10::SymInt> const&, double) 

    dispatch key: Meta 

    registered at /__w/FBGEMM/FBGEMM/pytorch/FBGEMM/fbgemm_gpu/src/jagged_tensor_ops/jagged_tensor_ops_meta.cpp:234 

 

Exception raised from registerKernel at /pytorch/aten/src/ATen/core/dispatch/OperatorEntry.cpp:120 (most recent call first): 

frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x68 (0xffff9f203898 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/torch/lib/libc10.so) 

frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x6c (0xffff9f1bc2a8 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/torch/lib/libc10.so) 

frame #2: c10::impl::OperatorEntry::registerKernel(c10::Dispatcher const&, c10::optional<c10::DispatchKey>, c10::KernelFunction, c10::optional<c10::impl::CppSignature>, std::unique_ptr<c10::FunctionSchema, std::default_delete<c10::FunctionSchema> >, std::string) + 0x1e0 (0xffffa011b910 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so) 

frame #3: c10::Dispatcher::registerImpl(c10::OperatorName, c10::optional<c10::DispatchKey>, c10::KernelFunction, c10::optional<c10::impl::CppSignature>, std::unique_ptr<c10::FunctionSchema, std::default_delete<c10::FunctionSchema> >, std::string) + 0xec (0xffffa0110c8c in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so) 

frame #4: torch::Library::_impl(char const*, torch::CppFunction&&, torch::_RegisterOrVerify) & + 0x180 (0xffffa014dda4 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so) 

frame #5: <unknown function> + 0x11f718 (0xffff9937f718 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/site-packages/fbgemm_gpu/fbgemm_gpu_py.so) 

frame #6: <unknown function> + 0xf5a4 (0xffffb56865a4 in /lib/ld-linux-aarch64.so.1) 

frame #7: <unknown function> + 0xf6a8 (0xffffb56866a8 in /lib/ld-linux-aarch64.so.1) 

frame #8: <unknown function> + 0x12ab0 (0xffffb5689ab0 in /lib/ld-linux-aarch64.so.1) 

frame #9: _dl_catch_exception + 0x74 (0xffffb54ca55c in /usr/lib64/libc.so.6) 

frame #10: <unknown function> + 0x12c68 (0xffffb5689c68 in /lib/ld-linux-aarch64.so.1) 

frame #11: <unknown function> + 0x124c (0xffffb562224c in /usr/lib64/libdl.so.2) 

frame #12: _dl_catch_exception + 0x74 (0xffffb54ca55c in /usr/lib64/libc.so.6) 

frame #13: _dl_catch_error + 0x40 (0xffffb54ca600 in /usr/lib64/libc.so.6) 

frame #14: <unknown function> + 0x19d8 (0xffffb56229d8 in /usr/lib64/libdl.so.2) 

frame #15: dlopen + 0x8c (0xffffb562232c in /usr/lib64/libdl.so.2) 

frame #16: <unknown function> + 0x124b8 (0xffffa827b4b8 in /home/ma-user/anaconda3/envs/python-3.9.10/lib/python3.9/lib-dynload/_ctypes.cpython-39-aarch64-linux-gnu.so) 

<omitting python frames> 

frame #63: __libc_start_main + 0xe0 (0xffffb53dcf80 in /usr/lib64/libc.so.6) 

 

Aborted 

本帖最后由 匿名用户2025/12/31 17:47:26 编辑

我要发帖子