diff options
author | Jared Duke <jdduke@google.com> | 2018-08-01 17:03:14 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-01 17:08:41 -0700 |
commit | 6e9c1b57087e15ea850b20bace7881fe95a86854 (patch) | |
tree | e816941b970b037cb59d076acd49a49d4736f321 /tensorflow/contrib/lite/model.cc | |
parent | 7dda474c941c8ec5a341dd0d82bfd5ce7c720b21 (diff) |
Support TFLite framework compilation on Windows
PiperOrigin-RevId: 207020196
Diffstat (limited to 'tensorflow/contrib/lite/model.cc')
-rw-r--r-- | tensorflow/contrib/lite/model.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/model.cc b/tensorflow/contrib/lite/model.cc index 5814cddc5b..08d3264d70 100644 --- a/tensorflow/contrib/lite/model.cc +++ b/tensorflow/contrib/lite/model.cc @@ -16,7 +16,6 @@ limitations under the License. #include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> @@ -80,8 +79,8 @@ std::unique_ptr<Allocation> GetAllocationFromFile(const char* filename, ErrorReporter* error_reporter, bool use_nnapi) { std::unique_ptr<Allocation> allocation; - if (mmap_file) { - if (use_nnapi && NNAPIExists()) + if (mmap_file && MMAPAllocation::IsSupported()) { + if (use_nnapi && NNAPIDelegate::IsSupported()) allocation.reset(new NNAPIAllocation(filename, error_reporter)); else allocation.reset(new MMAPAllocation(filename, error_reporter)); |