Open BugCrown opened 2 months ago
How do you generate rank0.engine ? What is your cmd ?
How do you generate rank0.engine ? What is your cmd ?
Here is the cmd:
export MODEL_TYPE="Phi-3-mini-4k-instruct"
python ./convert_checkpoint.py --model_type ${MODEL_TYPE} \
--model_dir "microsoft/${MODEL_TYPE}" \
--output_dir ./phi-checkpoint \
--dtype float16
trtllm-build \
--checkpoint_dir ./phi-checkpoint \
--output_dir ./phi-engine \
--max_batch_size 8 \
--max_input_len 1024 \
--max_output_len 1024 \
--tp_size 1 \
--pp_size 1
You can find it in TensorRT-LLM/examples/phi/README.md
[E] [TRT] 3: getPluginCreator could not find plugin: GPTAttentiontensorrt_llm version: 1
plugin name GPTAttentiontensorrt_llm
not match. ref https://github.com/NVIDIA/TensorRT-LLM/blob/main/cpp/tensorrt_llm/plugins/gptAttentionPlugin/gptAttentionPlugin.cpp#L41 plugin name is GPTAttention
I know where gptattention is in trtllm. But how can I add this plugin to the trex library? Obviously .cpp files cannot be added as libraries. And I would like to know . /tensorrt_llm/libs
if the compiled plugin library for trtllm already exists.
But how can I add this plugin to the trex library
LIke your method, --plugins=
I tried. At the beginning of this issue, I added the .so
files to the plugin library. But it didn't work. I want to know whether these .so files really contain gptAttention and other operator plugins. If not, how to compile these plugins into libraries.
nm -D -A -C /app/tensorrt_llm/lib/libnvinfer_plugin_tensorrt_llm.so | grep " T " |grep GPTAttentionPlugin
will see gptAttentionPlugin
is into compile.
Then you can define a onnx include GPTAttention
node, and use
trtexec --onnx=${onnx} --verbose --plugins=/app/tensorrt_llm/lib/libnvinfer_plugin_tensorrt_llm.so
Does it mean that if the object of trex is .engine
, then the plugin cannot be inserted?
Description
I generated Phi-3-mini-4K-instruct
engine
based on./example/phi/README.md
and wanted to analyze it by trt-enging-explorer in trt. However, trex told megetPluginCreator could not find plugin: Gemmtensorrt_llm version: 1
. I tried to add all of the .so files in./tensorrt_llm/libs
to trtexec's plugin library but it still didn't work. The command line is as follows:Equivalent to:
The error is as follows:
How can I add plugins from trtllm to trex?
Environment
TensorRT Version:10.0.1
NVIDIA GPU:RTX 4090
NVIDIA Driver Version: 535.183.01
CUDA Version:12.2
CUDNN Version:V12.4.99
Operating System:Ubuntu 22.04.4 LTS
Python Version (if applicable):3.10.12
Tensorflow Version (if applicable):
PyTorch Version (if applicable):2.3.0a0+40ec155e58.nv24.03
Baremetal or Container (if so, version):