refine EngineIOConverter, and use io_convert in test_trt_activation_op#10495
Merged
luotao1 merged 7 commits intoPaddlePaddle:developfrom May 15, 2018
luotao1:refine_relu_test
Merged
refine EngineIOConverter, and use io_convert in test_trt_activation_op#10495luotao1 merged 7 commits intoPaddlePaddle:developfrom luotao1:refine_relu_test
luotao1 merged 7 commits intoPaddlePaddle:developfrom
luotao1:refine_relu_test
Conversation
Superjomn
reviewed
May 9, 2018
| cudaMemcpyHostToHost, *stream_)); | ||
|
|
||
| PADDLE_ENFORCE_EQ(0, cudaMemcpyAsync(out, in.data<float>(), size, | ||
| cudaMemcpyHostToHost, *stream_)); |
| * so in the default case just need to copy the data. | ||
| */ | ||
| class EngineInputConverter { | ||
| class EngineIOConverter { |
Contributor
There was a problem hiding this comment.
Add comments about how to register a convter from fluid to TRT or from TRT to fluid.
For example, a converter for a special Op called x that from fluid to TRT will register as Fluid(x)->TRT.
Or a special Layer in TRT called y that convert output from TRT to fluid will register as TRT(y)->Fluid.
Contributor
Author
There was a problem hiding this comment.
add some comments at first.
Superjomn
approved these changes
May 15, 2018
| namespace tensorrt { | ||
|
|
||
| void Compare(float input, float expect) { | ||
| void Compare(const std::string op_type, float input, float expect) { |
Contributor
Author
There was a problem hiding this comment.
I will correct in next PR.
Closed
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.
EngineInputConvertertoEngineIOConverter, which has two function:ConvertInput(LoDTensor->ITensor) andConvertOutput(ITensor -> LoDTensor)test_io_converter.ccEngineIOConverterin unit-testtest_activation_op.cccudaMemcpyAsyncinSetInputFromCPU