Skip to content

Feature/engine refactor #10497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 9, 2018
Merged

Conversation

Superjomn
Copy link
Contributor

Refactor the engine base API for Anakin engine.

// Return the IO buffer that allocated in engine. One can read/write directly
// on the buffer. If the buffer's buffer is nullptr, one can also allocate
// memory and maintain it outside the engine.
virtual Buffer& buffer(const std::string& tensor) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensor->name, 这里参数指的是buffer名字吧

@@ -1,4 +1,5 @@
nv_library(tensorrt_engine SRCS engine.h engine.cc helper.h ../engine.h)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nv_library(tensorrt_engine SRCS engine.cc)

@@ -87,7 +87,9 @@ class TensorRTEngine : public EngineBase {
// these memory directly for acceleration, for example, output the converted
// data directly to the buffer to save data copy overhead.
// NOTE this should be used after calling `FreezeNetwork`.
void*& buffer(const std::string& name);
Buffer& buffer(const std::string& tensor) override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensor->name

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Xreki Xreki added the 预测 原名Inference,包含Capi预测问题等 label May 9, 2018
@luotao1 luotao1 merged commit 8190381 into PaddlePaddle:develop May 9, 2018
@Superjomn Superjomn deleted the feature/engine_refactor branch May 9, 2018 09:05
putcn pushed a commit to putcn/Paddle that referenced this pull request May 10, 2018
* init refactor

* init

* update some comment

* fix build

* fix errorrr

* fix bug

* fix comment

* update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
预测 原名Inference,包含Capi预测问题等
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants