tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[PyTorch] ImplementationError: The following operators are not implemented: ['aten::embedding_bag']

Open crazydemo opened this issue 4 years ago • 10 comments
trafficstars

when I try to relay dlrm (pytorch model), I encounter the error: ImplementationError: The following operators are not implemented: ['aten::embedding_bag']

pytorch=1.7.0, tvm is the latest

crazydemo avatar May 06 '21 06:05 crazydemo

hello, have you finished importing the DLRM model,i have the same task

GoodNight-bye avatar Jun 21 '21 08:06 GoodNight-bye

no i haven't

发自我的iPhone

------------------ Original ------------------ From: GoodNight-bye @.> Date: Mon,Jun 21,2021 4:26 PM To: apache/tvm @.> Cc: Ivy Zhang @.>, Author @.> Subject: Re: [apache/tvm] ImplementationError: The following operators are not implemented: ['aten::embedding_bag'] (#7986)

crazydemo avatar Jun 21 '21 08:06 crazydemo

no i haven't 发自我的iPhone ------------------ Original ------------------ From: GoodNight-bye @.> Date: Mon,Jun 21,2021 4:26 PM To: apache/tvm @.> Cc: Ivy Zhang @.>, Author @.> Subject: Re: [apache/tvm] ImplementationError: The following operators are not implemented: ['aten::embedding_bag'] (#7986)

你还是原先的这个问题吗

GoodNight-bye avatar Jun 21 '21 08:06 GoodNight-bye

是的

发自我的iPhone

------------------ Original ------------------ From: GoodNight-bye @.> Date: Mon,Jun 21,2021 4:30 PM To: apache/tvm @.> Cc: Ivy Zhang @.>, Author @.> Subject: Re: [apache/tvm] ImplementationError: The following operators are not implemented: ['aten::embedding_bag'] (#7986)

crazydemo avatar Jun 21 '21 08:06 crazydemo

我这边是把网络拆分了,embedding的部分不放在NPU上执行,但是后面有个index算子的问题

GoodNight-bye avatar Jun 21 '21 08:06 GoodNight-bye

embedding_bag is supported in relay/frontend/onnx.py, you can refer to this file.

GoodNight-bye avatar Jul 21 '21 02:07 GoodNight-bye

I have done the job, DLRM is already running on our NPU. If you have any question, you can contact me.

GoodNight-bye avatar Jul 29 '21 02:07 GoodNight-bye

I have done the job, DLRM is already running on our NPU. If you have any question, you can contact me. 您好, 我目前也遇到这个算子不支持的问题, 能给个联系方式吗?感谢!

TaoCheng-CS avatar Aug 23 '21 06:08 TaoCheng-CS

I have done the job, DLRM is already running on our NPU. If you have any question, you can contact me. 您好, 我目前也遇到这个算子不支持的问题, 能给个联系方式吗?感谢!

aten::embedding_bag relay层直接参考onnx的实现,算子侧的话需要实现对应的take算子

GoodNight-bye avatar Aug 24 '21 12:08 GoodNight-bye

embedding_bag is supported in relay/frontend/onnx.py, you can refer to this file.

Hi, I`m also relay from onnx dlrm model, in this file(onnx.py), the implementation of embedding_bag use a reshape op( indices = _op.reshape(indices, indices_shape)), however, if the indices_shape is [3, -1], the size of indices is [13, ], the indices can not be reshape to the size[3, ?],how to do it!

zgplvyou avatar Jul 25 '22 07:07 zgplvyou