diff options
author | 2018-02-13 15:57:24 -0800 | |
---|---|---|
committer | 2018-02-13 15:57:24 -0800 | |
commit | cc9f81395ac86862768cfd3ccbc320bf8cd625d1 (patch) | |
tree | 69a8a10ce0c11516a84e35eba54edf1b894ab29d /tensorflow/contrib/tensorrt/resources | |
parent | 0b8492b612eef6057440c4d1fe5dca41cacf5d6d (diff) | |
parent | f66e9f92820804b7c2b4698147d07d5d2277c62f (diff) |
Merging with master
Diffstat (limited to 'tensorflow/contrib/tensorrt/resources')
4 files changed, 9 insertions, 9 deletions
diff --git a/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.cc b/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.cc index e1ab243b07..f5dc4886af 100644 --- a/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.cc +++ b/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.cc @@ -17,7 +17,7 @@ namespace trt { int TRTInt8Calibrator::getBatchSize() const { return batch_size_; } TRTInt8Calibrator::TRTInt8Calibrator(const std::unordered_map< - std::string, std::pair<void*, size_t>>& dev_buffers, + string, std::pair<void*, size_t>>& dev_buffers, int batch_size) : batch_size_(batch_size), done_(false), @@ -38,7 +38,7 @@ TRTInt8Calibrator::TRTInt8Calibrator(const std::unordered_map< } bool TRTInt8Calibrator::setBatch( - const std::unordered_map<std::string, void*>& data) { + const std::unordered_map<string, void*>& data) { VLOG(1)<<"SAMI SAMI Waiting to set new batch"; if(done_)return false; while (calib_running_.load( diff --git a/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.h b/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.h index 71f187187f..b8bf55f56e 100644 --- a/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.h +++ b/tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.h @@ -5,7 +5,7 @@ #ifndef TENSORFLOW_CONTRIB_TENSORRT_RESOURCES_TRTINT8CALIBRATOR_H_ #define TENSORFLOW_CONTRIB_TENSORRT_RESOURCES_TRTINT8CALIBRATOR_H_ -#include <NvInfer.h> +#include "tensorrt/include/NvInfer.h" #include <atomic> #include <string> #include <unordered_map> @@ -17,11 +17,11 @@ namespace trt { struct TRTInt8Calibrator : public nvinfer1::IInt8EntropyCalibrator { public: TRTInt8Calibrator(const std::unordered_map< - std::string, std::pair<void*, size_t>>& dev_buffers, + string, std::pair<void*, size_t>>& dev_buffers, int batch_size); int getBatchSize() const; bool getBatch(void* bindings[], const char* names[], int nbBindings) override; - bool setBatch(const std::unordered_map<std::string, void*> &data); + bool setBatch(const std::unordered_map<string, void*> &data); void setDone(){done_=true;} const void *readCalibrationCache(std::size_t &length) override; void writeCalibrationCache(const void *ptr, std::size_t length) override; @@ -31,7 +31,7 @@ struct TRTInt8Calibrator : public nvinfer1::IInt8EntropyCalibrator { tensorflow::mutex cond_mtx_; tensorflow::condition_variable cond_; bool done_; - const std::unordered_map<std::string, std::pair<void*, size_t>> dev_buffers_; + const std::unordered_map<string, std::pair<void*, size_t>> dev_buffers_; std::atomic_bool calib_running_; }; } // namespace trt diff --git a/tensorflow/contrib/tensorrt/resources/TRTResourceManager.h b/tensorflow/contrib/tensorrt/resources/TRTResourceManager.h index 5ec66ab582..e3b50093e7 100644 --- a/tensorflow/contrib/tensorrt/resources/TRTResourceManager.h +++ b/tensorflow/contrib/tensorrt/resources/TRTResourceManager.h @@ -25,10 +25,10 @@ class TRTResourceManager { } // returns a manager for given op, if it doesn't exists it creates one std::shared_ptr<tensorflow::ResourceMgr> getManager( - const std::string& op_name); + const string& op_name); private: - std::unordered_map<std::string, std::shared_ptr<tensorflow::ResourceMgr>> + std::unordered_map<string, std::shared_ptr<tensorflow::ResourceMgr>> managers_; tensorflow::mutex map_mutex_; }; diff --git a/tensorflow/contrib/tensorrt/resources/TRTResources.h b/tensorflow/contrib/tensorrt/resources/TRTResources.h index 653f30ee8a..cd23100af8 100644 --- a/tensorflow/contrib/tensorrt/resources/TRTResources.h +++ b/tensorflow/contrib/tensorrt/resources/TRTResources.h @@ -8,7 +8,7 @@ #include <string> #include <sstream> -#include <NvInfer.h> +#include "tensorrt/include/NvInfer.h" #include <thread> #include "tensorflow/contrib/tensorrt/log/trt_logger.h" #include "tensorflow/contrib/tensorrt/resources/TRTInt8Calibrator.h" |