Closed MengqingCao closed 4 months ago
@xingchensong 感谢神速review,麻烦验证下在你的diy代码上是否还有影响:-)
@xingchensong 感谢神速review,麻烦验证下在你的diy代码上是否还有影响:-)
ok
有个openmp的环境变量 把那个thread 设置成2 试下
另外 是processor中哪个用来多线程?
有个openmp的环境变量 把那个thread 设置成2 试下
试了下这个,也是会导致段错误,只有设置线程数为1才能避免这个问题。 另外,我没有排查到具体是哪个算子用到了多线程,processor 里涉及的操作比较多,而且我的程序直接 crash 掉,堆栈中没有获得有效信息。pytorch 社区有关类似问题的讨论中,查阅到的只有 opencv 和 open3D 中的算子会导致相同的问题: https://github.com/pytorch/pytorch/issues/45198
it works, thx
有个openmp的环境变量 把那个thread 设置成2 试下
试了下这个,也是会导致段错误,只有设置线程数为1才能避免这个问题。 另外,我没有排查到具体是哪个算子用到了多线程,processor 里涉及的操作比较多,而且我的程序直接 crash 掉,堆栈中没有获得有效信息。pytorch 社区有关类似问题的讨论中,查阅到的只有 opencv 和 open3D 中的算子会导致相同的问题: https://github.com/pytorch/pytorch/issues/45198
帮忙benchmark下速度, dataset这一块 因为torchaudio 以及torch的tensor操作 有的是并行的
有个openmp的环境变量 把那个thread 设置成2 试下
试了下这个,也是会导致段错误,只有设置线程数为1才能避免这个问题。 另外,我没有排查到具体是哪个算子用到了多线程,processor 里涉及的操作比较多,而且我的程序直接 crash 掉,堆栈中没有获得有效信息。pytorch 社区有关类似问题的讨论中,查阅到的只有 opencv 和 open3D 中的算子会导致相同的问题: pytorch/pytorch#45198
帮忙benchmark下速度, dataset这一块 因为torchaudio 以及torch的tensor操作 有的是并行的
这个只影响kunpeng cpu,intel cpu不会进入设置thread那个if分支
解决Kunpeng cpu上 segmentfault 的同时,避免了 deepspeed 的重复初始化。 只粗略定位到是数据集处理模块 processor.py 中存在多线程处理的操作,造成了多进程读取数据时的死锁问题。因此在 processor 开始处设置线程数为1,来防止死锁和 segmentfault
为防止侵入式修改,在读取 cpu 硬件信息判断为 Kunpeng 后才进行此修改。