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

[PaddleV3] 修复部分依赖 paddle.fluid 的 pytorch 模型 #1065

Merged
merged 26 commits into from
Oct 23, 2024

Conversation

megemini
Copy link
Contributor

@megemini megemini commented Oct 13, 2024

修复部分依赖 paddle.fluid 的 pytorch 模型

本 PR 修复的 15 个模型已通过 CI:#1065 (comment)

@luotao1 luotao1 added the contributor External developers label Oct 17, 2024
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Oct 21, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Oct 21, 2024
@megemini
Copy link
Contributor Author

Update 20241022

本 PR 修复的 15 个模型已通过 CI,可以 review 并合入:

  • AlexNet
  • BASNet
  • DBFace
  • EDSR
  • ElectraModel
  • FlaubertModel
  • InceptionV3
  • MNasNet
  • MobileNetV2
  • ResNet18
  • ResNet18_2
  • ShuffleNetV2
  • SqueezeNet
  • VGG16
  • mobilenetv3

CI 的测试结果:

不过,从今天调试 mobilenetv3 的日志来看,CI 的环境还是有问题,具体表现为 GPU 不能用 ~

可以参考如下 CI 的日志:https://xly.bce.baidu.com/paddlepaddle/x2paddle-ci/newipipe/detail/11745845/job/27823146

2024-10-22 17:47:43 Traceback (most recent call last):
2024-10-22 17:47:43   File "/workspace/X2Paddle/test_benchmark/PyTorch/mobilenetv3/convert.py", line 11, in <module>
2024-10-22 17:47:43     checkpoint = torch.load(modelFile)
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 1097, in load
2024-10-22 17:47:43     return _load(
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 1525, in _load
2024-10-22 17:47:43     result = unpickler.load()
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 1492, in persistent_load
2024-10-22 17:47:43     typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 1466, in load_tensor
2024-10-22 17:47:43     wrap_storage=restore_location(storage, location),
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 414, in default_restore_location
2024-10-22 17:47:43     result = fn(storage, location)
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 391, in _deserialize
2024-10-22 17:47:43     device = _validate_device(location, backend_name)
2024-10-22 17:47:43   File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 364, in _validate_device
2024-10-22 17:47:43     raise RuntimeError(f'Attempting to deserialize object on a {backend_name.upper()} '
2024-10-22 17:47:43 RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

torch.cuda.is_available() is False 应该说明 CI 环境的 gpu 有点问题 ~

@luotao1

@megemini
Copy link
Contributor Author

这个 PR 也可以合入了 ~ 环境的问题可以回头看一下效率云的日志 ~

@luotao1

@luotao1 luotao1 merged commit 9eb55a0 into PaddlePaddle:develop Oct 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants