使用torch_npu 2.8.0版本,遇到问题
收藏回复举报
使用torch_npu 2.8.0版本,遇到问题
t('forum.solved') 已解决
发表于2025-10-17 10:18:24
0 查看
[rank0]: torch._dynamo.exc.TorchRuntimeError: Dynamo failed to run FX node with fake tensors: call_function <built-in function scaled_dot_product_attention>(*(FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16), FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16), FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16)), **{'is_causal': True}): got AssertionError("Please convert all Tensors to FakeTensors first or instantiate FakeTensorMode with 'allow_non_fake_inputs'. Found in npu.npu_fusion_attention.default(FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16), FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16), FakeTensor(..., device='npu:0', size=(32, 10, 2048, 128), dtype=torch.bfloat16), 10, 'BNSD', None, None, tensor([...], device='npu:0', size=(2048, 2048)), 0.08838834764831843, 1.0, 2147483647, 0, 0, None, None, None, 2)")

我要发帖子