NVIDIA / FasterTransformer

Transformer related optimization, including BERT, GPT
Apache License 2.0
5.88k stars 893 forks source link

Error when I used pytorch to run #176

Closed michelleqyhqyh closed 2 years ago

michelleqyhqyh commented 2 years ago

python pytorch/decoder_sample.py 8 6 32 8 64 --time image

byshiue commented 2 years ago

Please describe the hardward, environment, docker, branch and building scripts you use, thanks.

michelleqyhqyh commented 2 years ago

Please describe the hardward, environment, docker, branch and building scripts you use, thanks.

I compile it in my local sever. So I didn't use docker. My system is CENTOS7. My GPU is V100.

  1. I downloaded the git, cd FasterTransformer mkdir -p build cd build
  2. cmake -DSM=70 -DCMAKE_BUILD_TYPE=Release -DBUILD_PYT=ON ..
  3. make
  4. pip install transformers==2.5.1
  5. ./bin/encoder_gemm 32 32 12 64 0 0
  6. python pytorch/encoder_sample.py 32 12 32 12 64 --time

And the error is from step 6.

byshiue commented 2 years ago

It seems that there are some issues for the fused mha initialization. Please try to use the v5.0_beta branch.

michelleqyhqyh commented 2 years ago

It seems that there are some issues for the fused mha initialization. Please try to use the v5.0_beta bran

I compiled dev_v5.0_beta, there is no the docment pytorch/ and file ./bin/encoder_gemm to generate. How can I use with the dev_v5.0_beta branch?

michelleqyhqyh commented 2 years ago

Besides, what does 'sm' mean? image

byshiue commented 2 years ago

SM is the compute capacity of GPU. The SM of V100 is 70. You can find the SM of other GPUs on NVIDIA official website.

JeremyZhao1998 commented 2 years ago

@michelleqyhqyh @byshiue Hi, I'm also running this file without using docker. I'm facing another error: 1646993799(1) It seems like error occurred in loading op. Have you met such error?

byshiue commented 2 years ago

This bug is fixed in latest release. It is caused by CUDA_API version.

byshiue commented 2 years ago

Close this bug because it is inactivated. Feel free to re-open this issue if you still have any problem.