Skip to content

Fix build on Ubuntu 20.04#568

Merged
kevinch-nv merged 1 commit intoonnx:masterfrom
deadeyegoodwin:davidg-u20.04
Jan 5, 2021
Merged

Fix build on Ubuntu 20.04#568
kevinch-nv merged 1 commit intoonnx:masterfrom
deadeyegoodwin:davidg-u20.04

Conversation

@deadeyegoodwin
Copy link
Copy Markdown

Remove std::move in return to resolve this build failure:

[ 66%] Building CXX object CMakeFiles/onnxruntime_providers.dir/workspace/onnxruntime/onnxruntime/core/providers/cpu/activation/activations.cc.o
/workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vector<nvinfer1::PluginField> onnx2trt::{anonymous}::loadFields(string_map<std::vector<unsigned char> >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:
/workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
 3737 |     return std::move(fields);
      |            ~~~~~~~~~^~~~~~~~
/workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: note: remove ‘std::move’ call

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 13, 2020

CLA assistant check
All committers have signed the CLA.

@kevinch-nv
Copy link
Copy Markdown
Collaborator

@deadeyegoodwin can you sign off this commit and we can then merge

    Remove std::move in return to resolve this build failure:

    [ 66%] Building CXX object CMakeFiles/onnxruntime_providers.dir/workspace/onnxruntime/onnxruntime/core/providers/cpu/activation/activations.cc.o
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vector<nvinfer1::PluginField> onnx2trt::{anonymous}::loadFields(string_map<std::vector<unsigned char> >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
     3737 |     return std::move(fields);
          |            ~~~~~~~~~^~~~~~~~
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: note: remove ‘std::move’ call

Signed-off-by: David Goodwin <davidg@nvidia.com>
@deadeyegoodwin
Copy link
Copy Markdown
Author

@kevinch-nv signed

@kevinch-nv kevinch-nv merged commit fa742b7 into onnx:master Jan 5, 2021
kevinch-nv pushed a commit to kevinch-nv/onnx-tensorrt that referenced this pull request Jul 2, 2021
Remove std::move in return to resolve this build failure:

    [ 66%] Building CXX object CMakeFiles/onnxruntime_providers.dir/workspace/onnxruntime/onnxruntime/core/providers/cpu/activation/activations.cc.o
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vector<nvinfer1::PluginField> onnx2trt::{anonymous}::loadFields(string_map<std::vector<unsigned char> >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
     3737 |     return std::move(fields);
          |            ~~~~~~~~~^~~~~~~~
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: note: remove ‘std::move’ call

Signed-off-by: David Goodwin <davidg@nvidia.com>
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
kevinch-nv pushed a commit that referenced this pull request Jul 2, 2021
Remove std::move in return to resolve this build failure:

    [ 66%] Building CXX object CMakeFiles/onnxruntime_providers.dir/workspace/onnxruntime/onnxruntime/core/providers/cpu/activation/activations.cc.o
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vector<nvinfer1::PluginField> onnx2trt::{anonymous}::loadFields(string_map<std::vector<unsigned char> >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
     3737 |     return std::move(fields);
          |            ~~~~~~~~~^~~~~~~~
    /workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: note: remove ‘std::move’ call

Signed-off-by: David Goodwin <davidg@nvidia.com>
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants