You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ma...@apache.org on 2021/06/11 06:07:48 UTC
[tvm] branch main updated: Fix compile time and runtime errors of
EdgeTPURuntime (#8133)
This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 657af3a Fix compile time and runtime errors of EdgeTPURuntime (#8133)
657af3a is described below
commit 657af3ad8213e0e4d3e4a1505cfc8d05c4e78f82
Author: Akira Maruoka <ak...@gmail.com>
AuthorDate: Fri Jun 11 15:07:34 2021 +0900
Fix compile time and runtime errors of EdgeTPURuntime (#8133)
* Fixed the destruction order tflite::Interpreter and EdgeTPUContext
* Fixed include omission
* Formatted
---
src/runtime/contrib/edgetpu/edgetpu_runtime.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/runtime/contrib/edgetpu/edgetpu_runtime.h b/src/runtime/contrib/edgetpu/edgetpu_runtime.h
index a7a57ff..341062f 100644
--- a/src/runtime/contrib/edgetpu/edgetpu_runtime.h
+++ b/src/runtime/contrib/edgetpu/edgetpu_runtime.h
@@ -31,6 +31,7 @@
#include <string>
#include "../tflite/tflite_runtime.h"
+#include "edgetpu.h"
namespace tvm {
namespace runtime {
@@ -44,6 +45,14 @@ namespace runtime {
class EdgeTPURuntime : public TFLiteRuntime {
public:
/*!
+ * \brief Destructor of EdgeTPURuntime.
+ *
+ * NOTE: tflite::Interpreter member should be destruct before the EdgeTpuContext member
+ * destruction. If the order is reverse, occurs SEGV in the destructor of tflite::Interpreter.
+ */
+ ~EdgeTPURuntime() { interpreter_.reset(); }
+
+ /*!
* \return The type key of the executor.
*/
const char* type_key() const final { return "EdgeTPURuntime"; }