Tensorrt: These compile errors came out from 'BERT' demo

Created on 18 Jul 2019  路  8Comments  路  Source: NVIDIA/TensorRT

Hi, thank you for your contribution.
I'm trying to execute 'BERT' demo.

I just followed the guideline to set up my environment.
(CentOS/RedHat 7 with cuda-10.0)
But these errors came out when I tried to compile it.
I will be glad to your help.

                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:1749:26: error: 'uint32_t' has not been declared
     virtual void setAxes(uint32_t axes) = 0;
                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:1756:13: error: 'uint32_t' does not name a type
     virtual uint32_t getAxes() const = 0;
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2563:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNGateType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2563:26: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNGateType : int
                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2592:13: error: 'int32_t' does not name a type
     virtual int32_t getLayerCount() const = 0;   //< Get the layer count of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2593:13: error: 'int32_t' does not name a type
     virtual int32_t getHiddenSize() const = 0;   //< Get the hidden size of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2594:13: error: 'int32_t' does not name a type
     virtual int32_t getMaxSeqLength() const = 0; //< Get the maximum sequence length of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2595:13: error: 'int32_t' does not name a type
     virtual int32_t getDataLength() const = 0;   //< Get the maximum data length of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFormat : uint8_t
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:1: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:12: error: use of enum 'PluginFormat' without previous declaration
 enum class PluginFormat : uint8_t
            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:25: error: expected unqualified-id before ':' token
 enum class PluginFormat : uint8_t
                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2804:20: error: 'PluginFormat' was not declared in this scope
 inline int EnumMax<PluginFormat>()
                    ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2804:12: error: template-id 'EnumMax<<expression error> >' for 'int nvinfer1::EnumMax()' does not match any template declaration
 inline int EnumMax<PluginFormat>()
            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2001:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ElementWiseOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2001:35: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ElementWiseOperation : int
                                   ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2943:48: error: 'PluginFormat' has not been declared
     virtual bool supportsFormat(DataType type, PluginFormat format) const = 0;
                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2961:129: error: 'PluginFormat' has not been declared
     virtual void configureWithFormat(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) = 0;
                                                                                                                                 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3038:48: error: 'PluginFormat' has not been declared
     virtual bool supportsFormat(DataType type, PluginFormat format) const = 0;
                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3056:129: error: 'PluginFormat' has not been declared
     virtual void configureWithFormat(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) = 0;
                                                                                                                                 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2160:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2160:27: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNOperation : int
                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2181:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNDirection : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2181:27: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNDirection : int
                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3210:95: error: 'PluginFormat' has not been declared
                                  const bool* inputIsBroadcast, const bool* outputIsBroadcast, PluginFormat floatFormat, int maxBatchSize)
                                                                                               ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2208:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNInputMode : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2208:27: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNInputMode : int
                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3259:68: error: 'PluginFormat' has not been declared
                              int /*nbOutputs*/, DataType /*type*/, PluginFormat /*format*/, int /*maxBatchSize*/) _TENSORRT_OVERRIDE _TENSORRT_FINAL {}
                                                                    ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2563:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNGateType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3313:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFieldType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2563:26: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class RNNGateType : int
                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3313:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFieldType : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2592:13: error: 'int32_t' does not name a type
     virtual int32_t getLayerCount() const = 0;   //< Get the layer count of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:37: error: 'nullptr' was not declared in this scope
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2593:13: error: 'int32_t' does not name a type
     virtual int32_t getHiddenSize() const = 0;   //< Get the hidden size of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:66: error: 'nullptr' was not declared in this scope
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                                                  ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2594:13: error: 'int32_t' does not name a type
     virtual int32_t getMaxSeqLength() const = 0; //< Get the maximum sequence length of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:105: error: 'PluginFieldType' is not a class or namespace
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                                                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2595:13: error: 'int32_t' does not name a type
     virtual int32_t getDataLength() const = 0;   //< Get the maximum data length of the RNN
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3473:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class UnaryOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3473:29: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class UnaryOperation : int
                             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFormat : uint8_t
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3535:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ReduceOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:1: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3535:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ReduceOperation : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:12: error: use of enum 'PluginFormat' without previous declaration
 enum class PluginFormat : uint8_t
            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2789:25: error: expected unqualified-id before ':' token
 enum class PluginFormat : uint8_t
                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2804:20: error: 'PluginFormat' was not declared in this scope
 inline int EnumMax<PluginFormat>()
                    ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3579:32: error: 'uint32_t' has not been declared
     virtual void setReduceAxes(uint32_t reduceAxes) = 0;
                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2804:12: error: template-id 'EnumMax<<expression error> >' for 'int nvinfer1::EnumMax()' does not match any template declaration
 inline int EnumMax<PluginFormat>()
            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3586:13: error: 'uint32_t' does not name a type
     virtual uint32_t getReduceAxes() const = 0;
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2943:48: error: 'PluginFormat' has not been declared
     virtual bool supportsFormat(DataType type, PluginFormat format) const = 0;
                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:2961:129: error: 'PluginFormat' has not been declared
     virtual void configureWithFormat(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) = 0;
                                                                                                                                 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3816:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class TopKOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3816:28: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class TopKOperation : int
                            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3038:48: error: 'PluginFormat' has not been declared
     virtual bool supportsFormat(DataType type, PluginFormat format) const = 0;
                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3056:129: error: 'PluginFormat' has not been declared
     virtual void configureWithFormat(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) = 0;
                                                                                                                                 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3873:32: error: 'uint32_t' has not been declared
     virtual void setReduceAxes(uint32_t reduceAxes) = 0;
                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3880:13: error: 'uint32_t' does not name a type
     virtual uint32_t getReduceAxes() const = 0;
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3892:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class MatrixOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3892:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class MatrixOperation : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3210:95: error: 'PluginFormat' has not been declared
                                  const bool* inputIsBroadcast, const bool* outputIsBroadcast, PluginFormat floatFormat, int maxBatchSize)
                                                                                               ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3259:68: error: 'PluginFormat' has not been declared
                              int /*nbOutputs*/, DataType /*type*/, PluginFormat /*format*/, int /*maxBatchSize*/) _TENSORRT_OVERRIDE _TENSORRT_FINAL {}
                                                                    ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4509:80: error: 'uint32_t' has not been declared
     virtual IReduceLayer* addReduce(ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) = 0;
                                                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4539:74: error: 'uint32_t' has not been declared
     virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int k, uint32_t reduceAxes) = 0;
                                                                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3313:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFieldType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3313:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class PluginFieldType : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:51: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                   ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:71: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                                       ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:91: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                                                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:37: error: 'nullptr' was not declared in this scope
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:66: error: 'nullptr' was not declared in this scope
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                                                  ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3353:105: error: 'PluginFieldType' is not a class or namespace
     PluginField(const char* name_ = nullptr, const void* data_ = nullptr, const PluginFieldType type_ = PluginFieldType::kUNKNOWN, int length_ = 0)
                                                                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5057:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class CalibrationAlgoType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3473:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class UnaryOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5057:34: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class CalibrationAlgoType : int
                                  ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3473:29: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class UnaryOperation : int
                             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8EntropyCalibrator::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5149:57: error: 'CalibrationAlgoType' is not a class or namespace
     virtual CalibrationAlgoType getAlgorithm() { return CalibrationAlgoType::kENTROPY_CALIBRATION; }
                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3535:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ReduceOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3535:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class ReduceOperation : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: At global scope:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5163:38: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
     CalibrationAlgoType getAlgorithm() override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
                                      ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8EntropyCalibrator2::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5163:58: error: 'CalibrationAlgoType' is not a class or namespace
     CalibrationAlgoType getAlgorithm() override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
                                                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3579:32: error: 'uint32_t' has not been declared
     virtual void setReduceAxes(uint32_t reduceAxes) = 0;
                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3586:13: error: 'uint32_t' does not name a type
     virtual uint32_t getReduceAxes() const = 0;
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8LegacyCalibrator::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5178:57: error: 'CalibrationAlgoType' is not a class or namespace
     virtual CalibrationAlgoType getAlgorithm() { return CalibrationAlgoType::kLEGACY_CALIBRATION; }
                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: At global scope:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5228:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class EngineCapability
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:28: error: 'allocate' declared as a 'virtual' field
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:19: error: expected ';' at end of member declaration
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                   ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:37: error: expected ')' before 'size'
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                                     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5621:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class WeightsRole : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5621:26: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class WeightsRole : int
                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3816:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class TopKOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3816:28: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class TopKOperation : int
                            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3873:32: error: 'uint32_t' has not been declared
     virtual void setReduceAxes(uint32_t reduceAxes) = 0;
                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5806:5: warning: scoped enums only available with -std=c++11 or -std=gnu++11
     enum class Severity
     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3880:13: error: 'uint32_t' does not name a type
     virtual uint32_t getReduceAxes() const = 0;
             ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3892:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class MatrixOperation : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:3892:30: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class MatrixOperation : int
                              ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
     T instance{};
                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:15: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
     T instance{};
               ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:16: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
     T instance{};
                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4509:80: error: 'uint32_t' has not been declared
     virtual IReduceLayer* addReduce(ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) = 0;
                                                                                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4539:74: error: 'uint32_t' has not been declared
     virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int k, uint32_t reduceAxes) = 0;
                                                                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:51: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                   ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:71: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                                       ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:4670:91: error: 'int32_t' has not been declared
     virtual IRNNv2Layer* addRNNv2(ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) = 0;
                                                                                           ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5057:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class CalibrationAlgoType : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5057:34: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class CalibrationAlgoType : int
                                  ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8EntropyCalibrator::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5149:57: error: 'CalibrationAlgoType' is not a class or namespace
     virtual CalibrationAlgoType getAlgorithm() { return CalibrationAlgoType::kENTROPY_CALIBRATION; }
                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: At global scope:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5163:38: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
     CalibrationAlgoType getAlgorithm() override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
                                      ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8EntropyCalibrator2::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5163:58: error: 'CalibrationAlgoType' is not a class or namespace
     CalibrationAlgoType getAlgorithm() override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
                                                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: In member function 'virtual nvinfer1::CalibrationAlgoType nvinfer1::IInt8LegacyCalibrator::getAlgorithm()':
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5178:57: error: 'CalibrationAlgoType' is not a class or namespace
     virtual CalibrationAlgoType getAlgorithm() { return CalibrationAlgoType::kLEGACY_CALIBRATION; }
                                                         ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h: At global scope:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5228:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class EngineCapability
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:28: error: 'allocate' declared as a 'virtual' field
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                            ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:19: error: expected ';' at end of member declaration
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                   ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5263:37: error: expected ')' before 'size'
     virtual void* allocate(uint64_t size, uint64_t alignment, uint32_t flags) = 0;
                                     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5621:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class WeightsRole : int
 ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5621:26: warning: scoped enums only available with -std=c++11 or -std=gnu++11
 enum class WeightsRole : int
                          ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5806:5: warning: scoped enums only available with -std=c++11 or -std=gnu++11
     enum class Severity
     ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
     T instance{};
                ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:15: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
     T instance{};
               ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:5902:16: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
     T instance{};
                ^
In file included from /usr/include/c++/5/cstdint:35:0,
                 from /workspace/TensorRT/demo/BERT/../../include/NvInfer.h:21,
                 from /workspace/TensorRT/demo/BERT/plugins/emb_layer_norm_plugin.cu:17:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5/cstdint:35:0,
                 from /workspace/TensorRT/demo/BERT/../../include/NvInfer.h:21,
                 from /workspace/TensorRT/demo/BERT/plugins/skip_layer_norm_plugin.cu:17:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5/cstdint:35:0,
                 from /workspace/TensorRT/demo/BERT/../../include/NvInfer.h:21,
                 from /workspace/TensorRT/demo/BERT/plugins/qkv2context_plugin.cu:17:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5/cstdint:35:0,
                 from /workspace/TensorRT/demo/BERT/../../include/NvInfer.h:21,
                 from /workspace/TensorRT/demo/BERT/plugins/gelu_plugin.cu:17:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /workspace/TensorRT/demo/BERT/util/data_utils.cpp:17:0:
/workspace/TensorRT/demo/BERT/util/data_utils.hpp:41:50: error: '>>' should be '> >' within a nested template argument list
     const std::map<std::string, std::vector<float>>& dict, int verbose);
                                                  ^
/workspace/TensorRT/demo/BERT/util/data_utils.hpp:47:44: error: '>>' should be '> >' within a nested template argument list
     std::map<std::string, std::vector<float>>& dict, cudaStream_t stream);
                                            ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:27:7: error: expected nested-name-specifier before 'Severity'
 using Severity = nvinfer1::ILogger::Severity;
       ^
/workspace/TensorRT/samples/common/logging.h:39:52: error: expected ',' or '...' before '&&' token
     LogStreamConsumerBuffer(LogStreamConsumerBuffer&& other)
                                                    ^
/workspace/TensorRT/samples/common/logging.h:39:60: error: invalid constructor; you probably meant 'LogStreamConsumerBuffer (const LogStreamConsumerBuffer&)'
     LogStreamConsumerBuffer(LogStreamConsumerBuffer&& other)
                                                            ^
/workspace/TensorRT/samples/common/logging.h:120:32: error: expected ')' before 'reportableSeverity'
     LogStreamConsumer(Severity reportableSeverity, Severity severity)
                                ^
/workspace/TensorRT/samples/common/logging.h:128:40: error: expected ',' or '...' before '&&' token
     LogStreamConsumer(LogStreamConsumer&& other)
                                        ^
/workspace/TensorRT/samples/common/logging.h:128:48: error: invalid constructor; you probably meant 'LogStreamConsumer (const LogStreamConsumer&)'
     LogStreamConsumer(LogStreamConsumer&& other)
                                                ^
/workspace/TensorRT/samples/common/logging.h:136:32: error: 'Severity' has not been declared
     void setReportableSeverity(Severity reportableSeverity)
                                ^
/workspace/TensorRT/samples/common/logging.h:143:26: error: expected ';' at end of member declaration
     static std::ostream& severityOstream(Severity severity)
                          ^
/workspace/TensorRT/samples/common/logging.h:143:51: error: expected ')' before 'severity'
     static std::ostream& severityOstream(Severity severity)
                                                   ^
/workspace/TensorRT/samples/common/logging.h:148:39: error: 'Severity' has not been declared
     static std::string severityPrefix(Severity severity)
                                       ^
/workspace/TensorRT/samples/common/logging.h:162:5: error: 'Severity' does not name a type
     Severity mSeverity;
     ^
/workspace/TensorRT/samples/common/logging.h: In member function 'void LogStreamConsumer::setReportableSeverity(int)':
/workspace/TensorRT/samples/common/logging.h:138:22: error: 'mSeverity' was not declared in this scope
         mShouldLog = mSeverity <= reportableSeverity;
                      ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static std::__cxx11::string LogStreamConsumer::severityPrefix(int)':
/workspace/TensorRT/samples/common/logging.h:152:14: error: 'Severity' has not been declared
         case Severity::kINTERNAL_ERROR: return "[F] ";
              ^
/workspace/TensorRT/samples/common/logging.h:153:14: error: 'Severity' has not been declared
         case Severity::kERROR: return "[E] ";
              ^
/workspace/TensorRT/samples/common/logging.h:154:14: error: 'Severity' has not been declared
         case Severity::kWARNING: return "[W] ";
              ^
/workspace/TensorRT/samples/common/logging.h:155:14: error: 'Severity' has not been declared
         case Severity::kINFO: return "[I] ";
              ^
/workspace/TensorRT/samples/common/logging.h:156:14: error: 'Severity' has not been declared
         case Severity::kVERBOSE: return "[V] ";
              ^
/workspace/TensorRT/samples/common/logging.h: At global scope:
/workspace/TensorRT/samples/common/logging.h:201:5: warning: scoped enums only available with -std=c++11 or -std=gnu++11
     enum class TestResult
     ^
/workspace/TensorRT/samples/common/logging.h:227:48: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
     void log(Severity severity, const char* msg) override
                                                ^
/workspace/TensorRT/samples/common/logging.h:252:26: error: expected ',' or '...' before '&&' token
         TestAtom(TestAtom&&) = default;
                          ^
/workspace/TensorRT/samples/common/logging.h:252:32: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
         TestAtom(TestAtom&&) = default;
                                ^
/workspace/TensorRT/samples/common/logging.h:252:32: error: invalid constructor; you probably meant 'Logger::TestAtom (const Logger::TestAtom&)'
/workspace/TensorRT/samples/common/logging.h:192:32: error: 'Severity' is not a class or namespace
     Logger(Severity severity = Severity::kWARNING)
                                ^
/workspace/TensorRT/samples/common/logging.h: In member function 'virtual void Logger::log(nvinfer1::ILogger::Severity, const char*)':
/workspace/TensorRT/samples/common/logging.h:229:56: error: no matching function for call to 'LogStreamConsumer::LogStreamConsumer(nvinfer1::ILogger::Severity&, nvinfer1::ILogger::Severity&)'
         LogStreamConsumer(mReportableSeverity, severity) << "[TRT] " << std::string(msg) << std::endl;
                                                        ^
/workspace/TensorRT/samples/common/logging.h:115:7: note: candidate: LogStreamConsumer::LogStreamConsumer()
 class LogStreamConsumer : protected LogStreamConsumerBase, public std::ostream
       ^
/workspace/TensorRT/samples/common/logging.h:115:7: note:   candidate expects 0 arguments, 2 provided
/workspace/TensorRT/samples/common/logging.h:115:7: note: candidate: LogStreamConsumer::LogStreamConsumer(const LogStreamConsumer&)
/workspace/TensorRT/samples/common/logging.h:115:7: note:   candidate expects 1 argument, 2 provided
/workspace/TensorRT/samples/common/logging.h: In static member function 'static Logger::TestAtom Logger::defineTest(const string&, int, const char* const*)':
/workspace/TensorRT/samples/common/logging.h:296:14: error: 'cmdline' does not name a type
         auto cmdline = genCmdlineString(argc, argv);
              ^
/workspace/TensorRT/samples/common/logging.h:297:33: error: 'cmdline' was not declared in this scope
         return defineTest(name, cmdline);
                                 ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static void Logger::reportTestStart(Logger::TestAtom&)':
/workspace/TensorRT/samples/common/logging.h:309:36: error: 'TestResult' is not a class or namespace
         reportTestResult(testAtom, TestResult::kRUNNING);
                                    ^
In file included from /usr/include/c++/5/cassert:43:0,
                 from /workspace/TensorRT/samples/common/logging.h:21,
                 from /workspace/TensorRT/samples/common/logger.h:20,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h: In static member function 'static void Logger::reportTestEnd(const Logger::TestAtom&, Logger::TestResult)':
/workspace/TensorRT/samples/common/logging.h:325:26: error: 'TestResult' is not a class or namespace
         assert(result != TestResult::kRUNNING);
                          ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h: In static member function 'static int Logger::reportPass(const Logger::TestAtom&)':
/workspace/TensorRT/samples/common/logging.h:332:33: error: 'TestResult' is not a class or namespace
         reportTestEnd(testAtom, TestResult::kPASSED);
                                 ^
/workspace/TensorRT/samples/common/logging.h:333:16: error: 'EXIT_SUCCESS' was not declared in this scope
         return EXIT_SUCCESS;
                ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static int Logger::reportFail(const Logger::TestAtom&)':
/workspace/TensorRT/samples/common/logging.h:338:33: error: 'TestResult' is not a class or namespace
         reportTestEnd(testAtom, TestResult::kFAILED);
                                 ^
/workspace/TensorRT/samples/common/logging.h:339:16: error: 'EXIT_FAILURE' was not declared in this scope
         return EXIT_FAILURE;
                ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static int Logger::reportWaive(const Logger::TestAtom&)':
/workspace/TensorRT/samples/common/logging.h:344:33: error: 'TestResult' is not a class or namespace
         reportTestEnd(testAtom, TestResult::kWAIVED);
                                 ^
/workspace/TensorRT/samples/common/logging.h:345:16: error: 'EXIT_SUCCESS' was not declared in this scope
         return EXIT_SUCCESS;
                ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static const char* Logger::severityPrefix(nvinfer1::ILogger::Severity)':
/workspace/TensorRT/samples/common/logging.h:366:14: error: 'Severity' is not a class or namespace
         case Severity::kINTERNAL_ERROR: return "[F] ";
              ^
/workspace/TensorRT/samples/common/logging.h:367:14: error: 'Severity' is not a class or namespace
         case Severity::kERROR: return "[E] ";
              ^
/workspace/TensorRT/samples/common/logging.h:368:14: error: 'Severity' is not a class or namespace
         case Severity::kWARNING: return "[W] ";
              ^
/workspace/TensorRT/samples/common/logging.h:369:14: error: 'Severity' is not a class or namespace
         case Severity::kINFO: return "[I] ";
              ^
/workspace/TensorRT/samples/common/logging.h:370:14: error: 'Severity' is not a class or namespace
         case Severity::kVERBOSE: return "[V] ";
              ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static const char* Logger::testResultString(Logger::TestResult)':
/workspace/TensorRT/samples/common/logging.h:382:14: error: 'TestResult' is not a class or namespace
         case TestResult::kRUNNING: return "RUNNING";
              ^
/workspace/TensorRT/samples/common/logging.h:383:14: error: 'TestResult' is not a class or namespace
         case TestResult::kPASSED: return "PASSED";
              ^
/workspace/TensorRT/samples/common/logging.h:384:14: error: 'TestResult' is not a class or namespace
         case TestResult::kFAILED: return "FAILED";
              ^
/workspace/TensorRT/samples/common/logging.h:385:14: error: 'TestResult' is not a class or namespace
         case TestResult::kWAIVED: return "WAIVED";
              ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static std::ostream& Logger::severityOstream(nvinfer1::ILogger::Severity)':
/workspace/TensorRT/samples/common/logging.h:395:28: error: 'Severity' is not a class or namespace
         return severity >= Severity::kINFO ? std::cout : std::cerr;
                            ^
/workspace/TensorRT/samples/common/logging.h: In static member function 'static void Logger::reportTestResult(const Logger::TestAtom&, Logger::TestResult)':
/workspace/TensorRT/samples/common/logging.h:403:25: error: 'Severity' is not a class or namespace
         severityOstream(Severity::kINFO) << "&&&& " << testResultString(result) << " " << testAtom.mName << " # "
                         ^
/workspace/TensorRT/samples/common/logging.h: In function 'LogStreamConsumer {anonymous}::LOG_VERBOSE(const Logger&)':
/workspace/TensorRT/samples/common/logging.h:437:62: error: 'Severity' was not declared in this scope
     return LogStreamConsumer(logger.getReportableSeverity(), Severity::kVERBOSE);
                                                              ^
/workspace/TensorRT/samples/common/logging.h: In function 'LogStreamConsumer {anonymous}::LOG_INFO(const Logger&)':
/workspace/TensorRT/samples/common/logging.h:449:62: error: 'Severity' was not declared in this scope
     return LogStreamConsumer(logger.getReportableSeverity(), Severity::kINFO);
                                                              ^
/workspace/TensorRT/samples/common/logging.h: In function 'LogStreamConsumer {anonymous}::LOG_WARN(const Logger&)':
/workspace/TensorRT/samples/common/logging.h:461:62: error: 'Severity' was not declared in this scope
     return LogStreamConsumer(logger.getReportableSeverity(), Severity::kWARNING);
                                                              ^
/workspace/TensorRT/samples/common/logging.h: In function 'LogStreamConsumer {anonymous}::LOG_ERROR(const Logger&)':
/workspace/TensorRT/samples/common/logging.h:473:62: error: 'Severity' was not declared in this scope
     return LogStreamConsumer(logger.getReportableSeverity(), Severity::kERROR);
                                                              ^
/workspace/TensorRT/samples/common/logging.h: In function 'LogStreamConsumer {anonymous}::LOG_FATAL(const Logger&)':
/workspace/TensorRT/samples/common/logging.h:486:62: error: 'Severity' was not declared in this scope
     return LogStreamConsumer(logger.getReportableSeverity(), Severity::kINTERNAL_ERROR);
                                                              ^
/workspace/TensorRT/samples/common/logger.cpp: At global scope:
/workspace/TensorRT/samples/common/logger.cpp:20:15: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 Logger gLogger{Logger::Severity::kINFO};
               ^
/workspace/TensorRT/samples/common/logger.cpp:20:24: error: 'Logger::Severity' is not a class or namespace
 Logger gLogger{Logger::Severity::kINFO};
                        ^
/workspace/TensorRT/samples/common/logger.cpp:20:39: error: in C++98 'gLogger' must be initialized by constructor, not by '{...}'
 Logger gLogger{Logger::Severity::kINFO};
                                       ^
/workspace/TensorRT/samples/common/logger.cpp:20:39: error: no matching function for call to 'Logger::Logger(<brace-enclosed initializer list>)'
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:192:5: note: candidate: Logger::Logger(nvinfer1::ILogger::Severity)
     Logger(Severity severity = Severity::kWARNING)
     ^
/workspace/TensorRT/samples/common/logging.h:192:5: note:   conversion of argument 1 would be ill-formed:
/workspace/TensorRT/samples/common/logging.h:189:7: note: candidate: Logger::Logger(const Logger&)
 class Logger : public nvinfer1::ILogger
       ^
/workspace/TensorRT/samples/common/logging.h:189:7: note:   conversion of argument 1 would be ill-formed:
/workspace/TensorRT/samples/common/logger.cpp:21:30: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 LogStreamConsumer gLogVerbose{LOG_VERBOSE(gLogger)};
                              ^
/workspace/TensorRT/samples/common/logger.cpp:21:51: error: in C++98 'gLogVerbose' must be initialized by constructor, not by '{...}'
 LogStreamConsumer gLogVerbose{LOG_VERBOSE(gLogger)};
                                                   ^
In file included from /usr/include/c++/5/ios:42:0,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from /workspace/TensorRT/samples/common/logging.h:22,
                 from /workspace/TensorRT/samples/common/logger.h:20,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/usr/include/c++/5/bits/ios_base.h: In copy constructor 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)':
/usr/include/c++/5/bits/ios_base.h:855:5: error: 'std::ios_base::ios_base(const std::ios_base&)' is private
     ios_base(const ios_base&);
     ^
In file included from /usr/include/c++/5/ios:44:0,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from /workspace/TensorRT/samples/common/logging.h:22,
                 from /workspace/TensorRT/samples/common/logger.h:20,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/usr/include/c++/5/bits/basic_ios.h:67:11: error: within this context
     class basic_ios : public ios_base
           ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h: In copy constructor 'LogStreamConsumer::LogStreamConsumer(const LogStreamConsumer&)':
/workspace/TensorRT/samples/common/logging.h:115:7: note: synthesized method 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)' first required here
 class LogStreamConsumer : protected LogStreamConsumerBase, public std::ostream
       ^
In file included from /usr/include/c++/5/ios:43:0,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from /workspace/TensorRT/samples/common/logging.h:22,
                 from /workspace/TensorRT/samples/common/logger.h:20,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/usr/include/c++/5/streambuf: In copy constructor 'std::__cxx11::basic_stringbuf<char>::basic_stringbuf(const std::__cxx11::basic_stringbuf<char>&)':
/usr/include/c++/5/streambuf:804:7: error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private
       basic_streambuf(const basic_streambuf&);
       ^
In file included from /workspace/TensorRT/samples/common/logging.h:24:0,
                 from /workspace/TensorRT/samples/common/logger.h:20,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/usr/include/c++/5/sstream:65:11: error: within this context
     class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h: In copy constructor 'LogStreamConsumerBuffer::LogStreamConsumerBuffer(const LogStreamConsumerBuffer&)':
/workspace/TensorRT/samples/common/logging.h:29:7: note: synthesized method 'std::__cxx11::basic_stringbuf<char>::basic_stringbuf(const std::__cxx11::basic_stringbuf<char>&)' first required here
 class LogStreamConsumerBuffer : public std::stringbuf
       ^
/workspace/TensorRT/samples/common/logging.h: In copy constructor 'LogStreamConsumerBase::LogStreamConsumerBase(const LogStreamConsumerBase&)':
/workspace/TensorRT/samples/common/logging.h:94:7: note: synthesized method 'LogStreamConsumerBuffer::LogStreamConsumerBuffer(const LogStreamConsumerBuffer&)' first required here
 class LogStreamConsumerBase
       ^
/workspace/TensorRT/samples/common/logging.h: In copy constructor 'LogStreamConsumer::LogStreamConsumer(const LogStreamConsumer&)':
/workspace/TensorRT/samples/common/logging.h:115:7: note: synthesized method 'LogStreamConsumerBase::LogStreamConsumerBase(const LogStreamConsumerBase&)' first required here
 class LogStreamConsumer : protected LogStreamConsumerBase, public std::ostream
       ^
/workspace/TensorRT/samples/common/logger.cpp: At global scope:
/workspace/TensorRT/samples/common/logger.cpp:21:51: note: synthesized method 'LogStreamConsumer::LogStreamConsumer(const LogStreamConsumer&)' first required here
 LogStreamConsumer gLogVerbose{LOG_VERBOSE(gLogger)};
                                                   ^
/workspace/TensorRT/samples/common/logger.cpp:22:27: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 LogStreamConsumer gLogInfo{LOG_INFO(gLogger)};
                           ^
/workspace/TensorRT/samples/common/logger.cpp:22:45: error: in C++98 'gLogInfo' must be initialized by constructor, not by '{...}'
 LogStreamConsumer gLogInfo{LOG_INFO(gLogger)};
                                             ^
/workspace/TensorRT/samples/common/logger.cpp:23:30: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 LogStreamConsumer gLogWarning{LOG_WARN(gLogger)};
                              ^
/workspace/TensorRT/samples/common/logger.cpp:23:48: error: in C++98 'gLogWarning' must be initialized by constructor, not by '{...}'
 LogStreamConsumer gLogWarning{LOG_WARN(gLogger)};
                                                ^
/workspace/TensorRT/samples/common/logger.cpp:24:28: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 LogStreamConsumer gLogError{LOG_ERROR(gLogger)};
                            ^
/workspace/TensorRT/samples/common/logger.cpp:24:47: error: in C++98 'gLogError' must be initialized by constructor, not by '{...}'
 LogStreamConsumer gLogError{LOG_ERROR(gLogger)};
                                               ^
/workspace/TensorRT/samples/common/logger.cpp:25:28: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 LogStreamConsumer gLogFatal{LOG_FATAL(gLogger)};
                            ^
/workspace/TensorRT/samples/common/logger.cpp:25:47: error: in C++98 'gLogFatal' must be initialized by constructor, not by '{...}'
 LogStreamConsumer gLogFatal{LOG_FATAL(gLogger)};
                                               ^
/workspace/TensorRT/samples/common/logger.cpp: In function 'void setReportableSeverity(nvinfer1::ILogger::Severity)':
/workspace/TensorRT/samples/common/logger.cpp:30:47: error: no matching function for call to 'LogStreamConsumer::setReportableSeverity(nvinfer1::ILogger::Severity&)'
     gLogVerbose.setReportableSeverity(severity);
                                               ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:136:10: note: candidate: void LogStreamConsumer::setReportableSeverity(int)
     void setReportableSeverity(Severity reportableSeverity)
          ^
/workspace/TensorRT/samples/common/logging.h:136:10: note:   no known conversion for argument 1 from 'nvinfer1::ILogger::Severity' to 'int'
/workspace/TensorRT/samples/common/logger.cpp:31:44: error: no matching function for call to 'LogStreamConsumer::setReportableSeverity(nvinfer1::ILogger::Severity&)'
     gLogInfo.setReportableSeverity(severity);
                                            ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:136:10: note: candidate: void LogStreamConsumer::setReportableSeverity(int)
     void setReportableSeverity(Severity reportableSeverity)
          ^
/workspace/TensorRT/samples/common/logging.h:136:10: note:   no known conversion for argument 1 from 'nvinfer1::ILogger::Severity' to 'int'
/workspace/TensorRT/samples/common/logger.cpp:32:47: error: no matching function for call to 'LogStreamConsumer::setReportableSeverity(nvinfer1::ILogger::Severity&)'
     gLogWarning.setReportableSeverity(severity);
                                               ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:136:10: note: candidate: void LogStreamConsumer::setReportableSeverity(int)
     void setReportableSeverity(Severity reportableSeverity)
          ^
/workspace/TensorRT/samples/common/logging.h:136:10: note:   no known conversion for argument 1 from 'nvinfer1::ILogger::Severity' to 'int'
/workspace/TensorRT/samples/common/logger.cpp:33:45: error: no matching function for call to 'LogStreamConsumer::setReportableSeverity(nvinfer1::ILogger::Severity&)'
     gLogError.setReportableSeverity(severity);
                                             ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:136:10: note: candidate: void LogStreamConsumer::setReportableSeverity(int)
     void setReportableSeverity(Severity reportableSeverity)
          ^
/workspace/TensorRT/samples/common/logging.h:136:10: note:   no known conversion for argument 1 from 'nvinfer1::ILogger::Severity' to 'int'
/workspace/TensorRT/samples/common/logger.cpp:34:45: error: no matching function for call to 'LogStreamConsumer::setReportableSeverity(nvinfer1::ILogger::Severity&)'
     gLogFatal.setReportableSeverity(severity);
                                             ^
In file included from /workspace/TensorRT/samples/common/logger.h:20:0,
                 from /workspace/TensorRT/samples/common/logger.cpp:17:
/workspace/TensorRT/samples/common/logging.h:136:10: note: candidate: void LogStreamConsumer::setReportableSeverity(int)
     void setReportableSeverity(Severity reportableSeverity)
          ^
/workspace/TensorRT/samples/common/logging.h:136:10: note:   no known conversion for argument 1 from 'nvinfer1::ILogger::Severity' to 'int'
CMakeFiles/common.dir/build.make:62: recipe for target 'CMakeFiles/common.dir/workspace/TensorRT/samples/common/logger.cpp.o' failed
make[2]: *** [CMakeFiles/common.dir/workspace/TensorRT/samples/common/logger.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'int bert::type2bytes(nvinfer1::DataType)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:67:15: error: 'DataType' is not a class or namespace
     if (dt == DataType::kINT8)
               ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:69:15: error: 'DataType' is not a class or namespace
     if (dt == DataType::kHALF)
               ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: At global scope:
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:86:37: error: 'DataType' is not a class or namespace
 const DataType T2DT<float>::value = DataType::kFLOAT;
                                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:87:35: error: 'DataType' is not a class or namespace
 const DataType T2DT<int>::value = DataType::kINT32;
                                   ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::load_row(std::__cxx11::string&, T*&, int&, nvinfer1::Dims&, std::ifstream&)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:92:5: error: 'int32_t' was not declared in this scope
     int32_t type, n_dims, dim;
     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:93:34: error: 'type' was not declared in this scope
     input >> name >> std::dec >> type >> n_dims;
                                  ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:93:42: error: 'n_dims' was not declared in this scope
     input >> name >> std::dec >> type >> n_dims;
                                          ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::load_weights(const string&, std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>&)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:113:56: error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(const string&, const openmode&)'
     std::ifstream input(wts_path, std::ios_base::binary);
                                                        ^
In file included from /workspace/TensorRT/demo/BERT/util/data_utils.cpp:21:0:
/usr/include/c++/5/fstream:495:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/5/fstream:495:7: note:   no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'const char*'
/usr/include/c++/5/fstream:481:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char; _Traits = std::char_traits<char>]
       basic_ifstream() : __istream_type(), _M_filebuf()
       ^
/usr/include/c++/5/fstream:481:7: note:   candidate expects 0 arguments, 2 provided
/usr/include/c++/5/fstream:455:11: note: candidate: std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/include/c++/5/fstream:455:11: note:   candidate expects 1 argument, 2 provided
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:114:5: error: 'int32_t' was not declared in this scope
     int32_t count;
     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:115:14: error: 'count' was not declared in this scope
     input >> count;
              ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:122:23: error: 'nullptr' was not declared in this scope
         float* data = nullptr;
                       ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:137:20: error: 'DataType' is not a class or namespace
         tmp.type = DataType::kFLOAT;
                    ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:139:13: error: 'class nvinfer1::Weights' has no member named 'count'
         tmp.count = param_size;
             ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:146:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : weight_dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:146:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : weight_dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:149:22: error: request for member 'first' in 'kv', which is of non-class type 'int'
         int pos = kv.first.find(BQ); // starting pos of BQ
                      ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:152:34: error: request for member 'second' in 'kv', which is of non-class type 'int'
             int hidden_size = kv.second.count;
                                  ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:153:37: error: request for member 'first' in 'kv', which is of non-class type 'int'
             std::string prefix = kv.first.substr(0, pos);
                                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:155:37: error: request for member 'second' in 'kv', which is of non-class type 'int'
             const Weights& Bq_ = kv.second;
                                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:164:69: error: 'malloc' was not declared in this scope
             float* Wall_ptr = (float*) malloc(wcount * sizeof(float));
                                                                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:177:43: error: 'DataType' is not a class or namespace
             weight_dict[prefix + WQKV] = {DataType::kFLOAT, Wall_ptr, wcount};
                                           ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:177:77: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
             weight_dict[prefix + WQKV] = {DataType::kFLOAT, Wall_ptr, wcount};
                                                                             ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:177:40: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
             weight_dict[prefix + WQKV] = {DataType::kFLOAT, Wall_ptr, wcount};
                                        ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:177:40: error: no match for 'operator=' (operand types are 'std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>::mapped_type {aka nvinfer1::Weights}' and '<brace-enclosed initializer list>')
In file included from /workspace/TensorRT/demo/BERT/util/data_utils.hpp:19:0,
                 from /workspace/TensorRT/demo/BERT/util/data_utils.cpp:17:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:483:7: note: candidate: nvinfer1::Weights& nvinfer1::Weights::operator=(const nvinfer1::Weights&)
 class Weights
       ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:483:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const nvinfer1::Weights&'
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:178:43: error: 'DataType' is not a class or namespace
             weight_dict[prefix + BQKV] = {DataType::kFLOAT, Ball_ptr, bcount};
                                           ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:178:77: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
             weight_dict[prefix + BQKV] = {DataType::kFLOAT, Ball_ptr, bcount};
                                                                             ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:178:40: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
             weight_dict[prefix + BQKV] = {DataType::kFLOAT, Ball_ptr, bcount};
                                        ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:178:40: error: no match for 'operator=' (operand types are 'std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>::mapped_type {aka nvinfer1::Weights}' and '<brace-enclosed initializer list>')
In file included from /workspace/TensorRT/demo/BERT/util/data_utils.hpp:19:0,
                 from /workspace/TensorRT/demo/BERT/util/data_utils.cpp:17:
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:483:7: note: candidate: nvinfer1::Weights& nvinfer1::Weights::operator=(const nvinfer1::Weights&)
 class Weights
       ^
/workspace/TensorRT/demo/BERT/../../include/NvInfer.h:483:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const nvinfer1::Weights&'
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::load_inputs(const string&, int&, int&, std::vector<nvinfer1::Weights>&, std::vector<nvinfer1::Weights>&, std::vector<nvinfer1::Weights>&, std::vector<nvinfer1::Dims>&)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:187:56: error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(const string&, const openmode&)'
     std::ifstream input(wts_path, std::ios_base::binary);
                                                        ^
In file included from /workspace/TensorRT/demo/BERT/util/data_utils.cpp:21:0:
/usr/include/c++/5/fstream:495:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/5/fstream:495:7: note:   no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'const char*'
/usr/include/c++/5/fstream:481:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char; _Traits = std::char_traits<char>]
       basic_ifstream() : __istream_type(), _M_filebuf()
       ^
/usr/include/c++/5/fstream:481:7: note:   candidate expects 0 arguments, 2 provided
/usr/include/c++/5/fstream:455:11: note: candidate: std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/include/c++/5/fstream:455:11: note:   candidate expects 1 argument, 2 provided
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:188:5: error: 'int32_t' was not declared in this scope
     int32_t count;
     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:189:14: error: 'count' was not declared in this scope
     input >> count;
              ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:199:21: error: 'nullptr' was not declared in this scope
         int* data = nullptr;
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:214:20: error: 'DataType' is not a class or namespace
         tmp.type = DataType::kINT32;
                    ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:216:13: error: 'class nvinfer1::Weights' has no member named 'count'
         tmp.count = param_size;
             ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::infer_network_sizes(const std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>&, int&, int&, int&)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:243:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : init_dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:243:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : init_dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:245:16: error: request for member 'first' in 'kv', which is of non-class type 'int'
         if (kv.first.find("beta") != std::string::npos)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:247:30: error: request for member 'second' in 'kv', which is of non-class type 'int'
             hidden_size = kv.second.count;
                              ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:251:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : init_dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:251:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : init_dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:253:16: error: request for member 'first' in 'kv', which is of non-class type 'int'
         if (kv.first.find("intermediate_dense_bias") != std::string::npos)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:255:36: error: request for member 'second' in 'kv', which is of non-class type 'int'
             intermediate_size = kv.second.count;
                                    ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:260:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : init_dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:260:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : init_dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:262:16: error: request for member 'first' in 'kv', which is of non-class type 'int'
         if (kv.first[0] == 'l')
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:264:34: error: request for member 'first' in 'kv', which is of non-class type 'int'
             std::string tok = kv.first.substr(1, kv.first.find("_") - 1);
                                  ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:264:53: error: request for member 'first' in 'kv', which is of non-class type 'int'
             std::string tok = kv.first.substr(1, kv.first.find("_") - 1);
                                                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:265:25: error: 'stoi' is not a member of 'std'
             int layer = std::stoi(tok);
                         ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:267:29: error: request for member 'first' in 'kv', which is of non-class type 'int'
             std::cout << kv.first << " " << tok << " " << layer << std::endl;
                             ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::alloc_bindings(const nvinfer1::ICudaEngine&, std::vector<void*>&, int, const std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>&, int)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:279:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : dict)
                ^
CMakeFiles/bert_plugins.dir/build.make:101: recipe for target 'CMakeFiles/bert_plugins.dir/plugins/emb_layer_norm_plugin.cu.o' failed
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:279:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : dict)
                     ^
make[2]: *** [CMakeFiles/bert_plugins.dir/plugins/emb_layer_norm_plugin.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:281:9: error: 'tie' is not a member of 'std'
         std::tie(name, W) = kv;
         ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:287:24: error: 'class nvinfer1::Weights' has no member named 'count'
         int outlen = W.count * type2bytes(W.type);
                        ^
CMakeFiles/bert_plugins.dir/build.make:75: recipe for target 'CMakeFiles/bert_plugins.dir/plugins/skip_layer_norm_plugin.cu.o' failed
make[2]: *** [CMakeFiles/bert_plugins.dir/plugins/skip_layer_norm_plugin.cu.o] Error 1
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: At global scope:
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:295:50: error: '>>' should be '> >' within a nested template argument list
     const std::map<std::string, std::vector<float>>& dict, int verbose)
                                                  ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::alloc_bindings(const nvinfer1::ICudaEngine&, std::vector<void*>&, int, const std::map<std::__cxx11::basic_string<char>, std::vector<float> >&, int)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:298:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:298:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:300:51: error: request for member 'first' in 'kv', which is of non-class type 'int'
         const int idx = engine.getBindingIndex(kv.first.c_str());
                                                   ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:302:49: error: request for member 'first' in 'kv', which is of non-class type 'int'
             printf(" idx %d name %s\n", idx, kv.first.c_str());
                                                 ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:305:41: error: request for member 'second' in 'kv', which is of non-class type 'int'
         int outlen = sizeof(float) * kv.second.size();
                                         ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::upload(const nvinfer1::ICudaEngine&, std::vector<void*>&, int, const std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>&, cudaStream_t)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:319:15: error: 'kv' does not name a type
     for (auto kv : dict)
               ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected ';' before '}' token
 }
 ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected primary-expression before '}' token
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected ';' before '}' token
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected primary-expression before '}' token
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected ')' before '}' token
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:326:1: error: expected primary-expression before '}' token
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: At global scope:
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:329:44: error: '>>' should be '> >' within a nested template argument list
     std::map<std::string, std::vector<float>>& dict, cudaStream_t stream)
                                            ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp: In function 'void bert::download(const nvinfer1::ICudaEngine&, std::vector<void*>&, int, std::map<std::__cxx11::basic_string<char>, std::vector<float> >&, cudaStream_t)':
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:331:16: error: ISO C++ forbids declaration of 'kv' with no type [-fpermissive]
     for (auto& kv : dict)
                ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:331:21: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
     for (auto& kv : dict)
                     ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:333:51: error: request for member 'first' in 'kv', which is of non-class type 'int'
         const int idx = engine.getBindingIndex(kv.first.c_str());
                                                   ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:334:22: error: request for member 'second' in 'kv', which is of non-class type 'int'
         int len = kv.second.size() * sizeof(float);
                      ^
/workspace/TensorRT/demo/BERT/util/data_utils.cpp:335:29: error: request for member 'second' in 'kv', which is of non-class type 'int'
         cudaMemcpyAsync(&kv.second[0], buffers[idx], batchSize * len, cudaMemcpyDeviceToHost, stream);
                             ^
CMakeFiles/bert_plugins.dir/build.make:88: recipe for target 'CMakeFiles/bert_plugins.dir/plugins/qkv2context_plugin.cu.o' failed
make[2]: *** [CMakeFiles/bert_plugins.dir/plugins/qkv2context_plugin.cu.o] Error 1
CMakeFiles/bert_plugins.dir/build.make:62: recipe for target 'CMakeFiles/bert_plugins.dir/plugins/gelu_plugin.cu.o' failed
make[2]: *** [CMakeFiles/bert_plugins.dir/plugins/gelu_plugin.cu.o] Error 1
CMakeFiles/Makefile2:147: recipe for target 'CMakeFiles/bert_plugins.dir/all' failed
make[1]: *** [CMakeFiles/bert_plugins.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/common.dir/build.make:75: recipe for target 'CMakeFiles/common.dir/util/data_utils.cpp.o' failed
make[2]: *** [CMakeFiles/common.dir/util/data_utils.cpp.o] Error 1
CMakeFiles/Makefile2:110: recipe for target 'CMakeFiles/common.dir/all' failed
make[1]: *** [CMakeFiles/common.dir/all] Error 2

Most helpful comment

I fixed the original problem by adding c++11 flags in demo/BERT/CMakeLists.txt

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(cmake_and_cuda LANGUAGES CXX CUDA)

add_compile_options(-std=c++11)

...

All 8 comments

Could you share the procedure to see this output?

I could build this with the following steps. (ubuntu)
$ git clone -b release/5.1 https://github.com/nvidia/TensorRT TensorRT
$ cd TensorRT
$ git submodule update --init --recursive
$ export TRT_SOURCE=pwd
$ docker build -f docker/ubuntu-18.04.Dockerfile --build-arg CUDA_VERSION=10.1 --tag=tensorrt .
$ docker run --rm -ti --runtime=nvidia tensorrt
(docker)# git clone -b release/5.1 https://github.com/nvidia/TensorRT TensorRT
(docker)# cd TensorRT
(docker)# git submodule update --init --recursive
(docker)# export TRT_SOURCE=pwd
(docker)# mkdir -p TensorRT/demo/BERT/build
(docker)# cd TensorRT/demo/BERT/build
(docker)# cmake ..
(docker)# make -j

@haanjack Thank you. However, there are some problems.

  1. The same error came out when I changed the docker build option to ubuntu-16.04 + Cuda 10.0 or centos-7. + Cuda 10.0

  2. That error came out when I installed CUDA 10.1 and changed build option to ubuntu 18.04 and CUDA 10.1

/usr/bin/ld: cannot find -lnvinfer
collect2: error: ld returned 1 exit status
CMakeFiles/sample_bert.dir/build.make:85: recipe for target 'sample_bert' failed
make[2]: *** [sample_bert] Error 1
CMakeFiles/Makefile2:73: recipe for target 'CMakeFiles/sample_bert.dir/all' failed
make[1]: *** [CMakeFiles/sample_bert.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

You can install TensorRT and set LD_LIBRARY_PATH.
https://blog.csdn.net/zong596568821xp/article/details/86077553

@sboschang I've already installed TensorRT but to install OSS component makes some error

@ginn24
sudo ln -s TensorRT-5.1.5.0/lib/libnvinfer.so /usr/lib/libnvinfer.so

The original error seems to be missing c++11 flags? I have the same error.

I fixed the original problem by adding c++11 flags in demo/BERT/CMakeLists.txt

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(cmake_and_cuda LANGUAGES CXX CUDA)

add_compile_options(-std=c++11)

...

Warnings and errors look like missing C++11 flag, @Meteorix's solution looks right to me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbbug picture sbbug  路  5Comments

anmol039w picture anmol039w  路  5Comments

AlphaJia picture AlphaJia  路  3Comments

prathik-naidu picture prathik-naidu  路  3Comments

Xianqi-Zhang picture Xianqi-Zhang  路  5Comments