Closed northeastsquare closed 5 years ago
Solved. use pytorch's cpp extension method
i meet the same problem with you, can you tell me more about how to solve this problem? and more about how to use pytorch's cpp extension method, thx
Python has its c++ method, while pytorch have pytorch's own method. in pytorch_binding/setup.py, change as following: ` setup( name='warpctc', ext_modules=[
CppExtension('warpctc._warpctc', ['src/_warpctc.cpp'],
include_dirs=['../include'],
library_dirs=['build/lib'],
libraries=['warpctc'],
extra_link_args=[make_relative_rpath('lib')])
],
packages=find_packages(exclude=['tests']),
package_data={'warpctc': ['lib/libwarpctc' + shared_object_ext()]},
cmdclass={
'build': Build,
'build_deps': BuildDeps,
'build_ext': BuildExtension,
'clean': Clean,
})
`
Hello, after install according README, I got:
pytorch version 1.0.0, and python3.7