Skip to content

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)

// 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