build fp32 from source error
Python: Python3.7 Cmake: 3.18 nvcc --version: release 10.1, V10.1.243
I built lightseq fp32 from source with reference to build.md successfully.
But when
import lightseq.inference as lsi
, It will raise error: ImportError: /home/lightseq_fp32/lightseq/inference.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN8lightseq4cuda7EncoderILNS0_13OperationTypeE0EE5checkEv
How can I fix it? Thx~
Could you show the full log of installation by add -v to pip install
Ok, thank you. Here is the full log of installation.
Using pip 21.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///home/lightseq_fp32
Preparing metadata (setup.py): started
Running command python setup.py egg_info
WARNING: '.' not a valid package name; please use only .-separated package names in setup.py
running egg_info
creating /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info
writing /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/dependency_links.txt
writing entry points to /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/entry_points.txt
writing requirements to /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/SOURCES.txt'
package init file '__init__.py' not found (or not a regular file)
reading manifest file '/tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'dist'
no previously-included directories found matching 'tests'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file '/tmp/pip-pip-egg-info-aky5bf5q/lightseq.egg-info/SOURCES.txt'
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: ninja in /usr/local/lib/python3.7/site-packages (from lightseq==2.1.4) (1.10.2.2)
Installing collected packages: lightseq
Running setup.py develop for lightseq
Running command /usr/local/bin/python3.7 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/lightseq_fp32/setup.py'"'"'; __file__='"'"'/home/lightseq_fp32/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
WARNING: '.' not a valid package name; please use only .-separated package names in setup.py
running develop
running egg_info
writing lightseq.egg-info/PKG-INFO
writing dependency_links to lightseq.egg-info/dependency_links.txt
writing entry points to lightseq.egg-info/entry_points.txt
writing requirements to lightseq.egg-info/requires.txt
writing top-level names to lightseq.egg-info/top_level.txt
package init file '__init__.py' not found (or not a regular file)
reading manifest file 'lightseq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'dist'
no previously-included directories found matching 'tests'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'lightseq.egg-info/SOURCES.txt'
running build_ext
-- Build using fp32 precision
-- Debug computation result
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
-- pybind11 v2.5.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lightseq_fp32/build/temp.linux-x86_64-3.7
[ 17%] Built target cuda_kernels
[ 24%] Built target utils
[ 37%] Built target bert_weight
[ 51%] Built target gpt_weight
[ 65%] Built target transformer_weight
[ 72%] Built target bert_model
[ 79%] Built target gpt_model
[ 89%] Built target transformer_model
[100%] Built target lightseq
Creating /usr/local/lib/python3.7/site-packages/lightseq.egg-link (link to .)
Adding lightseq 2.1.4 to easy-install.pth file
Installing lightseq-generate script to /usr/local/bin
Installing lightseq-train script to /usr/local/bin
Installing lightseq-validate script to /usr/local/bin
Installed /home/lightseq_fp32
Successfully installed lightseq-2.1.4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python3.7 -m pip install --upgrade pip' command.
This log looks good to me. I suggest trying to build with different versions of the source.
请问一下这个问题解决了吗,我也碰到了这个问题,使用 FP32 模式从源码编译后安装:
import lightseq.inference Traceback (most recent call last): File "
", line 1, in ImportError: /home/wangzejun/nlp-tools/transformer_tools/lightseq-master/lightseq/inference.cpython-37m-x86_64-linux-gnu.so: undefined symbol: fatbinData
请问一下这个问题解决了吗,我也碰到了这个问题,使用 FP32 模式从源码编译后安装:
import lightseq.inference Traceback (most recent call last): File "", line 1, in ImportError: /home/wangzejun/nlp-tools/transformer_tools/lightseq-master/lightseq/inference.cpython-37m-x86_64-linux-gnu.so: undefined symbol: fatbinData
暂未解决
请问一下这个问题解决了吗,我也碰到了这个问题,使用 FP32 模式从源码编译后安装:
import lightseq.inference Traceback (most recent call last): File "", line 1, in ImportError: /home/wangzejun/nlp-tools/transformer_tools/lightseq-master/lightseq/inference.cpython-37m-x86_64-linux-gnu.so: undefined symbol: fatbinData
暂未解决
现在问题的关键是,如何根据 fp32 模式下编译生成的动态库文件,生成 pip 安装所需要的 whl 文件? @Taka152
请问一下这个问题解决了吗,我也碰到了这个问题,使用 FP32 模式从源码编译后安装:
import lightseq.inference Traceback (most recent call last): File "", line 1, in ImportError: /home/wangzejun/nlp-tools/transformer_tools/lightseq-master/lightseq/inference.cpython-37m-x86_64-linux-gnu.so: undefined symbol: fatbinData
暂未解决
#271