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

ProcessMesh无法正常使用 #68277

Open
zty-king opened this issue Sep 17, 2024 · 1 comment
Open

ProcessMesh无法正常使用 #68277

zty-king opened this issue Sep 17, 2024 · 1 comment

Comments

@zty-king
Copy link

zty-king commented Sep 17, 2024

bug描述 Describe the Bug

跑一个小demo代码如下
import paddle
import paddle.distributed as dist

mesh = dist.ProcessMesh([[2, 4, 5], [0, 1, 3]], dim_names=['x', 'y'])#这里是对设备的处理,定义了x,y两个维度

dense_tensor = paddle.to_tensor([[1,2,3],
[4,5,6],
[7,8,9],
[10,11,12]])

placements = [dist.Shard(0), dist.Shard(1)]#先按行切分,再按列切分
dist_tensor = dist.shard_tensor(dense_tensor, mesh, placements)

报错

RuntimeError: (Unavailable) The parsing of ProcessMesh is not supported in the current PaddlePaddle, please recompile and installPaddlePaddle with the option of WITH_DISTRIBUTE=ON. (at /paddle/paddle/fluid/pybind/eager_utils.cc:694)

尝试
尝试过重新编译,加上WITH_DISTRIBUTE=ON,还是没有效果,也尝试过加上DWITH_DISTRIBUTE=ON,也没有效果,仍然报错,Paddle装的是dev版,Linux下源码编译

其他补充信息 Additional Supplementary Information

No response

@tianhaodongbd
Copy link
Contributor

tianhaodongbd commented Sep 18, 2024

你好,使用你给出的demo并未复现问题。可以参考以下流程编译并重新安装Paddle试一下:
cmake .. -DPY_VERSION=3.9 -DWITH_GPU=ON -DWITH_DISTRIBUTE=ON
make -j$(nproc)
pip install -U [whl 包的名字] (—force-reinstall)

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

No branches or pull requests

2 participants