Skip to content
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

Fix build on Ubuntu 20.04 #568

Merged
merged 1 commit into from
Jan 5, 2021
Merged

Fix build on Ubuntu 20.04 #568

merged 1 commit into from
Jan 5, 2021

Conversation

deadeyegoodwin
Copy link

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

CLAassistant commented Nov 13, 2020

CLA assistant check
All committers have signed the CLA.

@kevinch-nv
Copy link
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
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