Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion paddle/fluid/inference/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class EngineBase {
virtual void Execute(int batch_size) = 0;

virtual ~EngineBase() {}

}; // class EngineBase

} // namespace inference
Expand Down
6 changes: 4 additions & 2 deletions paddle/fluid/inference/tensorrt/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ limitations under the License. */

#include <NvInfer.h>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "paddle/fluid/inference/engine.h"
#include "paddle/fluid/inference/tensorrt/helper.h"

Expand Down Expand Up @@ -56,9 +58,9 @@ class TensorRTEngine : public EngineBase {
virtual ~TensorRTEngine();

// TODO(Superjomn) implement it later when graph segmentation is supported.
virtual void Build(const DescType& paddle_model) override;
void Build(const DescType& paddle_model) override;

virtual void Execute(int batch_size) override;
void Execute(int batch_size) override;

// Initialize the inference network, so that TensorRT layers can add to this
// network.
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/inference/tensorrt/test_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/fluid/inference/tensorrt/engine.h"

#include <cuda.h>
#include <cuda_runtime_api.h>
#include <glog/logging.h>
#include <gtest/gtest.h>

#include "paddle/fluid/inference/tensorrt/engine.h"
#include "paddle/fluid/platform/enforce.h"

namespace paddle {
Expand Down Expand Up @@ -65,7 +64,8 @@ TEST_F(TensorRTEngineTest, add_layer) {

// fill in real data
float x_v = 1234;
engine_->SetInputFromCPU("x", (void*)&x_v, 1 * sizeof(float));
engine_->SetInputFromCPU("x", reinterpret_cast<void*>(&x_v),
1 * sizeof(float));
LOG(INFO) << "to execute";
engine_->Execute(1);

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/concurrency/channel_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include "channel_util.h"
#include "paddle/fluid/operators/concurrency/channel_util.h"
#include "paddle/fluid/framework/var_type.h"

namespace poc = paddle::operators::concurrency;
Expand Down
2 changes: 2 additions & 0 deletions paddle/fluid/operators/math/context_project.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ limitations under the License. */

#pragma once

#include <algorithm>
#include <vector>
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/operators/math/im2col.h"
#include "paddle/fluid/operators/math/math_function.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/im2col.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/fluid/operators/math/im2col.h"
#include <vector>

namespace paddle {
namespace operators {
Expand Down
2 changes: 2 additions & 0 deletions paddle/fluid/operators/math/im2col.cu
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <algorithm>
#include <vector>
#include "paddle/fluid/operators/math/im2col.h"
#include "paddle/fluid/platform/cuda_helper.h"

Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/im2col.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License. */

#pragma once

#include <vector>
#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/framework/tensor_util.h"
#include "paddle/fluid/platform/device_context.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/math_function_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#pragma once
#include <vector>
#include "paddle/fluid/framework/data_type.h"
#include "paddle/fluid/operators/math/math_function.h"

Expand Down
3 changes: 2 additions & 1 deletion paddle/fluid/operators/math/sequence_padding_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License. */

#include "paddle/fluid/operators/math/sequence_padding.h"
#include <gtest/gtest.h>
#include <vector>

template <typename DeviceContext, typename Place, typename T>
void TestSequencePadding(const paddle::framework::LoD& lod,
Expand Down Expand Up @@ -75,7 +76,7 @@ void TestSequencePadding(const paddle::framework::LoD& lod,

delete place;
delete context;
};
}

TEST(Seq2BatchPadding, CPU) {
paddle::framework::LoD lod1;
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/sequence_pooling.cu
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <string>
#include "paddle/fluid/operators/math/math_function.h"
#include "paddle/fluid/operators/math/sequence_pooling.h"
#include "paddle/fluid/platform/cuda_helper.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/sequence_pooling.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#pragma once
#include <string>
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/platform/device_context.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/math/vol2col.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License. */

#pragma once

#include <vector>
#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/framework/tensor_util.h"
#include "paddle/fluid/platform/device_context.h"
Expand Down
2 changes: 2 additions & 0 deletions paddle/fluid/operators/reader/reader_op_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#pragma once

#include <string>
#include <vector>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/reader.h"

Expand Down