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

[Question]: How to compile lightseq #445

Closed
FrostML opened this issue Dec 29, 2022 · 5 comments
Closed

[Question]: How to compile lightseq #445

FrostML opened this issue Dec 29, 2022 · 5 comments

Comments

@FrostML
Copy link

FrostML commented Dec 29, 2022

I try to compile lightseq by using build.sh, but run into the following problem:

lightseq/csrc/proto/bert_weight.cc:451:15: error: ‘class Bert’ has no member named ‘ParseFromIstream’; did you mean ‘ParseFromString’?
     if (!bert.ParseFromIstream(&raw_input)) {
               ^~~~~~~~~~~~~~~~
               ParseFromString

lightseq/csrc/proto/bert_crf_weight.cc:38:37: error: no match for ‘operator[]’ (operand types are ‘const google::protobuf::RepeatedPtrField<BertCrfEncoderLayer>’ and ‘int’)
   _inner_size = bert.encoder_stack()[0].ffn_first_kernel_size() / _hidden_size;

Branch master and tag v3.0.1 both failed.

Did I miss something? How can I manage to compile this project?

@FrostML
Copy link
Author

FrostML commented Jan 5, 2023

I try to follow the instruction of this doc docs/build.md and another error occur.

/usr/local/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/local/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

HDF5 was installed by:

$ curl -O -L -C - https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_0.tar.gz
$ tar -xzvf hdf5-1_12_0.tar.gz
$ cd hdf5-hdf5-1_12_0
$ ./configure --prefix=/usr/local/hdf5 "CFLAGS=-fPIC" "CXXFLAGS=-fPIC"
$ make
$ make install
$ cd ..

@Taka152
Copy link
Contributor

Taka152 commented Jan 6, 2023

Have you added the hdf5 path to $PATH before building?

@FrostML
Copy link
Author

FrostML commented Jan 6, 2023

There might be something wrong with my env. I used docker container and fixed this error. Thanks a lot @Taka152 .

Two more questions, how can I reproduce this speedup of Transformer-Big mentioned in here. What are the batch size, sequence length or beam size you used?
And did you fix the GPU's frequency (Memory and Graphics clocks) when testing?
image

@Taka152
Copy link
Contributor

Taka152 commented Feb 9, 2023

  1. We compared with huggingface model with batch_size [1, 8, 32], sequence length [16, 32, 64], and beam_size=4.
  2. We didn't change the frequency.

@FrostML
Copy link
Author

FrostML commented Mar 29, 2023

Thanks a lot.

@FrostML FrostML closed this as completed Mar 29, 2023
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

2 participants