PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Question]: 中文摘要模型export加速build出错

Open FightingEveryDay0 opened this issue 2 years ago • 12 comments

中文摘要unimo模型导出静态图模式报错:

[2022-10-20` 15:15:01,602] [ INFO] - Already cached C:\Users\wangyiting.paddlenlp\models\unimo-text-1.0-summary\unimo-text-1.0-summary.pdparams W1020 15:15:01.602730 63484 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.2 W1020 15:15:01.607863 63484 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4. Namespace(decoding_strategy='beam_search', diversity_rate=0.0, inference_model_dir='./inference_model', max_out_len=64, min_out_len=1, model_name_or_path='unimo-text-1.0-summary', num_beams=4, num_return_sequence=1, num_return_sequences=1, temperature=1.0, topk=4, topp=1.0, use_fp16_decoding=False) [2022-10-20 15:15:04,724] [ INFO] - Already cached C:\Users\wangyiting.paddlenlp\models\unimo-text-1.0-summary\unimo-text-1.0-vocab.txt [2022-10-20 15:15:04,746] [ INFO] - tokenizer config file saved in C:\Users\wangyiting.paddlenlp\models\unimo-text-1.0-summary\tokenizer_config.json [2022-10-20 15:15:04,747] [ INFO] - Special tokens file saved in C:\Users\wangyiting.paddlenlp\models\unimo-text-1.0-summary\special_tokens_map.json 2022-10-20 15:15:04,813 - INFO - Using Python interpreter: C:\Users\wangyiting\Anaconda3\envs\paddlenlp\python.exe, version: Python 3.7.13 2022-10-20 15:15:04,813 - INFO - execute command: cd /d C:\Users\wangyiting.paddlenlp\extensions\c60d8357021ebfe66404f37228b38a6c\FasterTransformer && C:\Users\wangyiting\Anaconda3\envs\paddlenlp\python.exe FasterTransformer_setup.py build Compiling user custom op, it will cost a few seconds..... running build running build_ext [2022-10-20 15:15:07,275] [ WARNING] - FasterTransformer is not available due to build errors. Traceback (most recent call last): File "FasterTransformer_setup.py", line 11, in output_dir=r'C:\Users\wangyiting.paddlenlp\extensions\c60d8357021ebfe66404f37228b38a6c\FasterTransformer') File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_init_.py", line 87, in setup return distutils.core.setup(**attrs) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\core.py", line 185, in setup return run_commands(dist) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands dist.run_commands() File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\dist.py", line 973, in run_commands self.run_command(cmd) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\dist.py", line 992, in run_command cmd_obj.run() File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools\command\build.py", line 24, in run super().run() File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\command\build.py", line 132, in run self.run_command(cmd_name) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\cmd.py", line 319, in run_command self.distribution.run_command(command) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\dist.py", line 992, in run_command cmd_obj.run() File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools\command\build_ext.py", line 79, in run _build_ext.run(self) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\setuptools_distutils\command\build_ext.py", line 346, in run self.build_extensions() File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\ext_utils.py", line 193, in build_extensions ext.build_with_command(self) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\ext_utils.py", line 171, in build_with_command raise e File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\ext_utils.py", line 158, in build_with_command self).build_with_command(ext_builder) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\ext_utils.py", line 75, in build_with_command raise NotImplementedError NotImplementedError Traceback (most recent call last): File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py", line 1148, in run_cmd command, shell=True, stderr=subprocess.STDOUT) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'cd /d C:\Users\wangyiting.paddlenlp\extensions\c60d8357021ebfe66404f37228b38a6c\FasterTransformer && C:\Users\wangyiting\Anaconda3\envs\paddlenlp\python.exe FasterTransformer_setup.py build' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:/Users/wangyiting/Documents/研二/code/ernie/PaddleNLP/applications/text_summarization/export_model.py", line 142, in do_predict(args) File "C:/Users/wangyiting/Documents/研二/code/ernie/PaddleNLP/applications/text_summarization/export_model.py", line 99, in do_predict trans_out=True) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\transformers\utils.py", line 159, in impl init_func(self, *args, **kwargs) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\faster_transformer\transformer\faster_transformer.py", line 1142, in init hidden_act=self._hidden_act) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\faster_transformer\transformer\decoding.py", line 1913, in init need_parallel=not get_ft_para_conf().no_para) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\utils\file_lock.py", line 113, in _impl func(*args, **kwargs) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddlenlp\ops\ext_utils.py", line 310, in load _jit_compile(file_path, verbose) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py", line 1112, in _jit_compile run_cmd(compile_cmd, verbose) File "C:\Users\wangyiting\Anaconda3\envs\paddlenlp\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py", line 1154, in run_cmd compile, error)) RuntimeError: Failed to run command: , errors: Command 'cd /d C:\Users\wangyiting.paddlenlp\extensions\c60d8357021ebfe66404f37228b38a6c\FasterTransformer && C:\Users\wangyiting\Anaconda3\envs\paddlenlp\python.exe FasterTransformer_setup.py build' returned non-zero exit status 1.

Process finished with exit code 1

FightingEveryDay0 avatar Oct 20 '22 07:10 FightingEveryDay0

请问您那边是Windows环境是吗

guoshengCS avatar Oct 20 '22 07:10 guoshengCS

你好,windows暂时不支持,目前支持的环境为Linux+CUDA

gongel avatar Oct 20 '22 07:10 gongel

对windows环境,好的换成服务器了,在linux环境下执行报错,请问可以帮忙看下是哪里的问题吗,谢谢

Scanning dependencies of target cuda_kernels [ 2%] Building CUDA object fastertransformer/cuda/CMakeFiles/cuda_kernels.dir/cuda_kernels.cu.o nvcc warning : The -std=c++14 flag is not supported with the configured host compiler. Flag will be ignored. In file included from /usr/include/c++/4.8.2/array:35:0, from /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/topk_kernels.cuh:18, from /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/cuda_kernels.h:21, from /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/cuda_kernels.cu:18: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the
^ gmake[5]: *** [fastertransformer/cuda/CMakeFiles/cuda_kernels.dir/cuda_kernels.cu.o] Error 1 gmake[4]: *** [fastertransformer/cuda/CMakeFiles/cuda_kernels.dir/all] Error 2 gmake[3]: *** [all] Error 2 gmake[2]: *** [third-party/src/extern_fastertransformer-stamp/extern_fastertransformer-build] Error 2 gmake[1]: *** [CMakeFiles/extern_fastertransformer.dir/all] Error 2 gmake: *** [all] Error 2 [2022-10-20 17:25:01,230] [ WARNING] - FasterTransformer is not available due to build errors. Traceback (most recent call last): File "FasterTransformer_setup.py", line 11, in output_dir=r'/data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer') File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands self.run_command(cmd) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/command/build.py", line 24, in run super().run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 193, in build_extensions ext.build_with_command(self) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 171, in build_with_command raise e File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 158, in build_with_command self).build_with_command(ext_builder) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 104, in build_with_command stderr=stdout) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2. Traceback (most recent call last): File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddle/utils/cpp_extension/extension_utils.py", line 1148, in run_cmd command, shell=True, stderr=subprocess.STDOUT) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'cd /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer && /data/users/wangyiting/anaconda3/envs/python37/bin/python FasterTransformer_setup.py build' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "export_model.py", line 142, in do_predict(args) File "export_model.py", line 99, in do_predict trans_out=True) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/transformers/utils.py", line 159, in impl init_func(self, *args, **kwargs) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/faster_transformer/transformer/faster_transformer.py", line 1142, in init hidden_act=self._hidden_act) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/faster_transformer/transformer/decoding.py", line 1913, in init need_parallel=not get_ft_para_conf().no_para) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/utils/file_lock.py", line 113, in _impl func(*args, **kwargs) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 310, in load _jit_compile(file_path, verbose) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddle/utils/cpp_extension/extension_utils.py", line 1112, in _jit_compile run_cmd(compile_cmd, verbose) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddle/utils/cpp_extension/extension_utils.py", line 1154, in run_cmd compile, error)) RuntimeError: Failed to run command: , errors: Command 'cd /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer && /data/users/wangyiting/anaconda3/envs/python37/bin/python FasterTransformer_setup.py build' returned non-zero exit status 1.

FightingEveryDay0 avatar Oct 20 '22 09:10 FightingEveryDay0

/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 可能是这里,请问是指什么版本不对吗

FightingEveryDay0 avatar Oct 20 '22 09:10 FightingEveryDay0

可能是gcc/g++版本低了,设置的-std=c++14不支持没生效,但是要求的-std=c++11 这个没设置,可以换个高版本的gcc/g++试下呢,或者可以试下Paddle官方的docker镜像 https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/docker/linux-docker.html

guoshengCS avatar Oct 21 '22 05:10 guoshengCS

请问gcc版本要求多少呢?版本太多了不太好配谢谢

FightingEveryDay0 avatar Oct 25 '22 13:10 FightingEveryDay0

安装gcc5.1.0,又报了新的错误:

[ 64%] Building CUDA object fastertransformer/cuda/CMakeFiles/decoder.dir/open_decoder.cu.o /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/open_decoder.cu(303): warning: specified alignment (2) is different from alignment (4) specified on a previous declaration detected during: instantiation of "void fastertransformer::masked_attention_kernel(T *, T *, T *, const T *, T *, const T *, T *, const T *, T *, const __nv_bool *, int, int, int, int, T) [with T=half]" (445): here instantiation of "void fastertransformer::masked_attention_dispatch(T *, T *, T *, const T *, T *, const T *, T *, const T *, T *, const __nv_bool *, int, int, int, int, int, int, cudaStream_t) [with T=half]" (503): here

/data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/open_decoder.cu(1420): warning: specified alignment (2) is different from alignment (4) specified on a previous declaration detected during: instantiation of "void fastertransformer::cross_attention_kernel(T *, const T *, T *, const T *, T *, const T *, const int *, T *, const __nv_bool *, int, int, int, int, int, T) [with T=half]" (1555): here instantiation of "void fastertransformer::cross_attention_dispatch(T *, const T *, T *, const T *, T *, const T *, const int *, T *, const __nv_bool *, int, int, int, int, int, cudaStream_t) [with T=half]" (1576): here

[ 66%] Building CUDA object fastertransformer/cuda/CMakeFiles/decoder.dir/masked_multihead_attention.cu.o /data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer/build/temp.linux-x86_64-cpython-37/third-party/source/fastertransformer/fastertransformer/cuda/masked_multihead_attention.cu(1113): error: expected a comma (the one-argument version of static_assert is not enabled in this mode) detected during: instantiation of "void mmha_launch_kernel<T,Dh,Dh_MAX>(const Masked_multihead_attention_params<T> &, const cudaStream_t &) [with T=float, Dh=32, Dh_MAX=32]" (1458): here instantiation of "void masked_multihead_attention_(const Masked_multihead_attention_params<T> &, const cudaStream_t &) [with T=float]" (1493): here

1 error detected in the compilation of "/tmp/tmpxft_00015974_00000000-6_masked_multihead_attention.cpp1.ii". gmake[5]: *** [fastertransformer/cuda/CMakeFiles/decoder.dir/masked_multihead_attention.cu.o] Error 1 gmake[4]: *** [fastertransformer/cuda/CMakeFiles/decoder.dir/all] Error 2 gmake[3]: *** [all] Error 2 gmake[2]: *** [third-party/src/extern_fastertransformer-stamp/extern_fastertransformer-build] Error 2 gmake[1]: *** [CMakeFiles/extern_fastertransformer.dir/all] Error 2 gmake: *** [all] Error 2 [2022-10-25 20:58:20,649] [ WARNING] - FasterTransformer is not available due to build errors. Traceback (most recent call last): File "FasterTransformer_setup.py", line 11, in output_dir=r'/data/users/wangyiting/.paddlenlp/extensions/ab3fb0c16468d26c231f6e4b0d565ac0/FasterTransformer') File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands self.run_command(cmd) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/command/build.py", line 24, in run super().run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 193, in build_extensions ext.build_with_command(self) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 171, in build_with_command raise e File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 158, in build_with_command self).build_with_command(ext_builder) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/site-packages/paddlenlp/ops/ext_utils.py", line 104, in build_with_command stderr=stdout) File "/data/users/wangyiting/anaconda3/envs/python37/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2. 主要是服务器没有root权限无法运行nvidia-docker

FightingEveryDay0 avatar Oct 25 '22 13:10 FightingEveryDay0

或者可以提供加速后的模型文件供下载吗 感谢

FightingEveryDay0 avatar Oct 25 '22 13:10 FightingEveryDay0

你好,gcc可以升级到8.2。最好是本机编译通过,机器环境不同,编译出来效果有差别。

gongel avatar Oct 27 '22 02:10 gongel

我也是这个unimo中文模型,请问下能否不用fastertransformer的方式部署呢(https://github.com/PaddlePaddle/PaddleNLP/tree/develop/applications/text_summarization/unimo-text/deploy/paddle_inference) , 环境是windows+CUDA11.6+cudnn8.4,直接用train里的预测速度太慢了

Heimdall-Nss avatar Nov 02 '22 14:11 Heimdall-Nss

换成官方镜像了 cuda11.6 cuDNN8.4 cmake3.16 使用fastertransformer部署时报错: [ 6%] Performing build step for 'extern_fastertransformer' Scanning dependencies of target topk [ 2%] Building CUDA object fastertransformer/cuda/CMakeFiles/topk.dir/topk_kernels.cu.o In file included from /usr/local/cuda/include/thrust/system/cuda/config.h:33, from /usr/local/cuda/include/thrust/system/cuda/detail/execution_policy.h:35, from /usr/local/cuda/include/thrust/iterator/detail/device_system_tag.h:23, from /usr/local/cuda/include/thrust/iterator/detail/iterator_facade_category.h:22, from /usr/local/cuda/include/thrust/iterator/iterator_facade.h:37, from /root/.paddlenlp/extensions/f7f6547e0d59428b8b3e61c4a9fd3a01/FasterTransformer/build/temp.linux-x86_64-3.7/third-party/source/fastertransformer/fastertransformer/cuda/cub/device/../iterator/arg_index_input_iterator.cuh:48, from /root/.paddlenlp/extensions/f7f6547e0d59428b8b3e61c4a9fd3a01/FasterTransformer/build/temp.linux-x86_64-3.7/third-party/source/fastertransformer/fastertransformer/cuda/cub/device/device_reduce.cuh:41, from /root/.paddlenlp/extensions/f7f6547e0d59428b8b3e61c4a9fd3a01/FasterTransformer/build/temp.linux-x86_64-3.7/third-party/source/fastertransformer/fastertransformer/cuda/cub/cub.cuh:53, from /root/.paddlenlp/extensions/f7f6547e0d59428b8b3e61c4a9fd3a01/FasterTransformer/build/temp.linux-x86_64-3.7/third-party/source/fastertransformer/fastertransformer/cuda/topk_kernels.cu:19: /usr/local/cuda/include/cub/util_namespace.cuh:46:2: error: #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined. #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined. ^~~~~ fastertransformer/cuda/CMakeFiles/topk.dir/build.make:62: recipe for target 'fastertransformer/cuda/CMakeFiles/topk.dir/topk_kernels.cu.o' failed make[5]: *** [fastertransformer/cuda/CMakeFiles/topk.dir/topk_kernels.cu.o] Error 1 CMakeFiles/Makefile2:125: recipe for target 'fastertransformer/cuda/CMakeFiles/topk.dir/all' failed make[4]: *** [fastertransformer/cuda/CMakeFiles/topk.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make[3]: *** [all] Error 2 CMakeFiles/extern_fastertransformer.dir/build.make:110: recipe for target 'third-party/src/extern_fastertransformer-stamp/extern_fastertransformer-build' failed make[2]: *** [third-party/src/extern_fastertransformer-stamp/extern_fastertransformer-build] Error 2 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/extern_fastertransformer.dir/all' failed make[1]: *** [CMakeFiles/extern_fastertransformer.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 [2022-11-04 08:19:04,335] [ WARNING] - FasterTransformer is not available due to build errors. 想问下测试的版本对应是怎样的呢,这个CUB的问题查了一下,参考https://github.com/dmlc/xgboost/pull/7379 似乎要添加参数 image 但是不知道怎么操作

Heimdall-Nss avatar Nov 04 '22 09:11 Heimdall-Nss

感觉确实是版本问题不好改 我去aistudio看了眼环境是 cuda11.2 cmake3.24.2 重装下环境试试吧

Heimdall-Nss avatar Nov 04 '22 10:11 Heimdall-Nss

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Jan 04 '23 00:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Jan 18 '23 00:01 github-actions[bot]