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

unti test Layer.WarpCTCLayer fails #814

Closed
wangkuiyi opened this issue Dec 10, 2016 · 3 comments
Closed

unti test Layer.WarpCTCLayer fails #814

wangkuiyi opened this issue Dec 10, 2016 · 3 comments
Assignees

Comments

@wangkuiyi
Copy link
Collaborator

wangkuiyi commented Dec 10, 2016

Is the follow errors due to that we didn't integrate the building and installation of WarpCTC into our cmake-based building system?

If so, are we supposed to integrate the building and installation procedures as described here into our Dockerfiles?

[ RUN      ] Layer.WarpCTCLayer
I1210 17:42:22.819157 12660 test_WarpCTCLayer.cpp:205] layerSize=10 batchSize=1 normByTimes = 0 useGpu=0
W1210 17:42:22.820042 12660 hl_dso_loader.cc:97] Failed to find dynamic library: /paddle/warp-ctc/build/libwarpctc.so (/paddle/warp-ctc/build/libwarpctc.so: cannot open shared object file: No such file or directory)
F1210 17:42:22.820751 12660 hl_dso_loader.cc:104] Check failed: nullptr != *dso_handle Failed to find dynamic library: libwarpctc.so (libwarpctc.so: cannot open shared object file: No such file or directory) 
Please specify its path correctly using one of the following ways: 
Method 1. set cuda and cudnn lib path at runtime. http://www.paddlepaddle.org/doc/ui/cmd_argument/argument_outline.html 
For instance, issue command: paddle train --use_gpu=1 --cuda_dir=/usr/local/cuda/lib64 --cudnn_dir=/usr/local/cudnn/lib ...
Method 2. set environment variable LD_LIBRARY_PATH on Linux or DYLD_LIBRARY_PATH on Mac OS. 
For instance, issue command: export LD_LIBRARY_PATH=... 
Note: After Mac OS 10.11, using the DYLD_LIBRARY_PATH is impossible unless System Integrity Protection (SIP) is disabled. However, method 1 always work well.
*** Check failure stack trace: ***
    @     0x7fc7aecb4daa  (unknown)
    @     0x7fc7aecb4ce4  (unknown)
    @     0x7fc7aecb46e6  (unknown)
    @     0x7fc7aecb7687  (unknown)
    @           0x79eea0  GetWarpCTCDsoHandle()
    @     0x7fc7afacca80  __GI___pthread_once
    @           0x79c3b1  std::call_once<>()
    @           0x79bb0a  hl_warpctc_init()
    @           0x524068  paddle::WarpCTCLayer::forward()
    @           0x51abdf  createWarpCTCLayer()
    @           0x51b5b1  Layer_WarpCTCLayer_Test::TestBody()
    @           0x7bbbb6  testing::internal::HandleSehExceptionsInMethodIfSupported<>()
    @           0x7b6bfc  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x7a3d45  testing::Test::Run()
    @           0x7a44c0  testing::TestInfo::Run()
    @           0x7a4a80  testing::TestCase::Run()
    @           0x7a96da  testing::internal::UnitTestImpl::RunAllTests()
    @           0x7bd100  testing::internal::HandleSehExceptionsInMethodIfSupported<>()
    @           0x7b7ba8  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x7a84d7  testing::UnitTest::Run()
    @           0x50df30  main
    @     0x7fc7adec0f45  (unknown)
    @           0x51868f  (unknown)
    @              (nil)  (unknown)
@Xreki
Copy link
Contributor

Xreki commented Dec 12, 2016

上述错误确实是没有编译warp-ctc引起的。

warp-ctc采用dso的方式集成,运行时可以通过两种方式设置libwarpctc.so的路径:

  1. 参数--warpctc_dir=..., 单测中设定路径为--warpctc_dir=${PROJ_ROOT}/warp-ctc/build
  2. 设置LD_LIBRARY_PATH

W1210 17:42:22.820042 12660 hl_dso_loader.cc:97] Failed to find dynamic library: /paddle/warp-ctc/build/libwarpctc.so (/paddle/warp-ctc/build/libwarpctc.so: cannot open shared object file: No such file or directory)
F1210 17:42:22.820751 12660 hl_dso_loader.cc:104] Check failed: nullptr != *dso_handle Failed to find dynamic library: libwarpctc.so (libwarpctc.so: cannot open shared object file: No such file or directory)

log的97和104行分别在这两个路径下搜索libwarpctc.so,错误信息显示没有搜索到。

cmake中没有集成warp-ctc的自动编译,原因有两点:

  • 不希望warp-ctc本身的编译阻碍了paddle的编译过程。
    • 并不是所有用户都需要用到warp-ctc这个功能,test_WarpCTCLayer这个单测失败不会影响paddle其他功能的使用。目前没有想到好的方法来控制这个单测的执行。
    • warp-ctc本身可能存在一些编译问题。比如CMakelist.txt对cuda的计算能力做了检查,要求计算能力52,在一些平台上直接cmake可能会失败。
  • 支持用户定制的warp-ctc。

@reyoung
Copy link
Collaborator

reyoung commented Dec 12, 2016

Should I close this issue?

The unit test error because Paddle cannot find Warp-CTC library in runtime.

Should we just return 0 when the unit test cannot found Warp-CTC library @wangkuiyi @Xreki , or just let it be.

@Xreki
Copy link
Contributor

Xreki commented Jan 9, 2017

#1017 中使用cmake的ExternalProject_Add的方式,实现了warp-ctc的自动下载、编译和安装。

@Xreki Xreki closed this as completed Jan 9, 2017
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
* hotfix deadlink (PaddlePaddle#811)

* Update native_infer_en.md (PaddlePaddle#787)

* Update install_Windows_en.md (PaddlePaddle#790)

* Update install_Windows_en.md

* Update install_Windows_en.md

* Update cluster_howto_en.rst (PaddlePaddle#791)

* Update cluster_howto_en.rst

* Update cluster_howto_en.rst

* Update doc/fluid/user_guides/howto/training/cluster_howto_en.rst

Co-Authored-By: acosta123 <42226556+acosta123@users.noreply.github.com>

* Update doc/fluid/user_guides/howto/training/cluster_howto_en.rst

Co-Authored-By: acosta123 <42226556+acosta123@users.noreply.github.com>

* Update cluster_howto_en.rst

* Update index_cn.rst (PaddlePaddle#813)
yaozhixin pushed a commit to graphcore/Paddle-fork that referenced this issue Jul 1, 2022
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

4 participants