Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch_npu aten::_transformer_encoder_layer_fwd, 运行时有警告出现,该模块未使用NPU而是使用CPU计算 #51

Open
high426 opened this issue Sep 9, 2024 · 2 comments

Comments

@high426
Copy link

high426 commented Sep 9, 2024

CAUTION: The operator 'aten::_transformer_encoder_layer_fwd' is not currently supported on the NPU backend and will fall back to run on the CPU. This may have performance implications.

torch 2.1.0

How can I compute it on NPU

@high426 high426 changed the title torch_npu aten::_transformer_encoder_layer_fwd torch_npu aten::_transformer_encoder_layer_fwd, 运行时有警告出现,该模块未使用NPU而是使用CPU计算 Sep 11, 2024
@yunyiyun
Copy link

你是用到了TransformerEncoderLayer吗?如果用到了,一种规避方案是在调用该层的forward前,把其中的任意一个入参设置为requires_grad=True,走训练模式

@zezhishao
Copy link

遇到了同样的问题,希望能够解决一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants