1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 #ifndef TENSORFLOW_LITE_DELEGATES_HEXAGON_HEXAGON_NN_SOC_MODEL_H_ 16 #define TENSORFLOW_LITE_DELEGATES_HEXAGON_HEXAGON_NN_SOC_MODEL_H_ 17 18 #include <dlfcn.h> 19 #include <fcntl.h> 20 #include <stdint.h> 21 #include <sys/stat.h> 22 #include <unistd.h> 23 24 #include <cstdio> 25 26 #include "hexagon/remote.h" 27 #include "hexagon/remote64.h" 28 #include "hexagon/hexnn_soc_defines.h" 29 30 namespace tflite { 31 namespace delegates { 32 #define SOC_ID_BUFFER_LENGTH 5 33 #define URI_BUFFER_LENGTH 100 34 35 // Returns QC SoC ID of the device. 36 int get_soc_id(int* soc_id); 37 38 // Returns structure that has SoC information. 39 SocSkelTable getsoc_model(); 40 } // namespace delegates 41 } // namespace tflite 42 43 #endif // TENSORFLOW_LITE_DELEGATES_HEXAGON_HEXAGON_NN_SOC_MODEL_H_ 44