feature/trt engine op test#11182
Merged
Superjomn merged 10 commits intoPaddlePaddle:developfrom Jun 6, 2018
Merged
Conversation
luotao1
reviewed
Jun 6, 2018
| #pragma once | ||
|
|
||
| #ifdef PADDLE_WITH_CUDA | ||
| #if PADDLE_WITH_CUDA |
| #include "paddle/fluid/inference/tensorrt/convert/op_converter.h" | ||
| #include "paddle/fluid/inference/tensorrt/convert/ut_helper.h" | ||
|
|
||
| USE_CPU_ONLY_OP(tensorrt_engine); |
Contributor
There was a problem hiding this comment.
请问为什么tensorrt_engine_op是CPU ONLY呢?不应该是GPU ONLY么
Contributor
Author
There was a problem hiding this comment.
tensorrt engine op 的kernel逻辑是在 cpu里跑,会触发 gpu
| const framework::Scope& scope, | ||
| bool test_mode = false) {} | ||
|
|
||
| // Convert a single fluid operaotr and add the corresponding layer to TRT. |
|
|
||
| engine_->DeclareOutput(layer, 0, op_desc.Output("Out")[0]); | ||
| auto output_name = op_desc.Output("Out")[0]; | ||
| engine_->SetITensor(output_name, layer->getOutput(0)); |
Contributor
There was a problem hiding this comment.
- 为什么单侧(test_mode)的时候不知道输出名字是什么呢?这个能否在之后的PR中去掉呢?
- 如果是单侧的时候要用,可以改成unittest_mode? 不然会认为是测试阶段,而TRT只有前向过程,会造成困扰。
…/trt_engine_op_test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BlockDesctotensorrt_engine_opNEXT STEP:
write a tool to execute a larger model and output the benchmark.