bytedance / lightseq

LightSeq: A High Performance Library for Sequence Processing and Generation
Other
3.21k stars 329 forks source link

编译过程碰到的问题 #389

Open lileilai opened 2 years ago

lileilai commented 2 years ago

按照编译的文档:https://github.com/bytedance/lightseq/blob/master/docs/inference/build.md 碰到了下面的问题,请问可以怎么解决? image

godweiyang commented 2 years ago

There are no libcudadevrt.so and libcudart_static.so in your lib64 dir.

lileilai commented 2 years ago

There are no libcudadevrt.so and libcudart_static.so in your lib64 dir.

I am confused with the cuda version, according to the build.md,cuda version should be <11 and >=10.1。but,at the CmakeList.txt,it's required cuda11 image

hexisyztem commented 2 years ago

This document is out of date

There are no libcudadevrt.so and libcudart_static.so in your lib64 dir.

I am confused with the cuda version, according to the build.md,cuda version should be <11 and >=10.1。but,at the CmakeList.txt,it's required cuda11 image

lileilai commented 2 years ago

document

Thanks for your reply, i have build success and got a whl package as follows:

image

but, where i try to import T5/Bert/Bart in python, indicating there are no such modules:

image

hexisyztem commented 2 years ago

document

Thanks for your reply, i have build success and got a whl package as follows:

image

but, where i try to import T5/Bert/Bart in python, indicating there are no such modules:

image

How did you compile the whl package? I recommend you to use this command: " ENABLE_FP32=0 ENABLE_DEBUG=0 ENABLE_NEW_ARCH=0 python3 setup.py install"

hexisyztem commented 2 years ago

In addition, you can get the Bert model through lsi.Bert(...)

hexisyztem commented 2 years ago

You can find interface code in this file: https://github.com/bytedance/lightseq/blob/master/lightseq/inference/pywrapper/wrapper.cc#L919

hexisyztem commented 2 years ago

for example: import lightseq.inference as lsi model = lsi.Bert(model_file, max_batch_size)

In addition, you can get the Bert model through lsi.Bert(...)

lileilai commented 2 years ago

document

Thanks for your reply, i have build success and got a whl package as follows: image but, where i try to import T5/Bert/Bart in python, indicating there are no such modules: image

How did you compile the whl package? I recommend you to use this command: " ENABLE_FP32=0 ENABLE_DEBUG=0 ENABLE_NEW_ARCH=0 python3 setup.py install"

i got the wheel file by following:

image

and pip install **

hexisyztem commented 2 years ago

It looks like you did compile correctly, it's just the wrong way to call it

document

Thanks for your reply, i have build success and got a whl package as follows: image but, where i try to import T5/Bert/Bart in python, indicating there are no such modules: image

How did you compile the whl package? I recommend you to use this command: " ENABLE_FP32=0 ENABLE_DEBUG=0 ENABLE_NEW_ARCH=0 python3 setup.py install"

i got the wheel file by following:

image

and pip install **

lileilai commented 2 years ago

for example: import lightseq.inference as lsi model = lsi.Bert(model_file, max_batch_size)

In addition, you can get the Bert model through lsi.Bert(...)

i have try this way, but it said "module not found"

image

lileilai commented 2 years ago

i try to check the compile process, my cuda version is 11.6, and i can not build lightseq program with the script "sh build.sh", and the error as follows:

image

Then , i switch the cuda version to cuda-10.2, and error as following:

image

Taka152 commented 2 years ago

You could check if you install cudatoolkit-dev correctly with nvcc, cublas, etc.

Fizzmy commented 2 years ago

I meet the same problem. And I wonder have you solve it now?