aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/hvx
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-03-27 12:55:34 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-27 14:06:15 -0700
commitb32a1b7294b9d8b4fe07d3b4ecde1a83a68d2ace (patch)
tree5c1442379613a6628d7178f200af7ef7cf7beb8e /tensorflow/contrib/hvx
parent4c46436cb52a536db258352b0384392a06e56a6d (diff)
Update hexagon supported op list and fix hexagon execution sample tests
Change: 151366249
Diffstat (limited to 'tensorflow/contrib/hvx')
-rw-r--r--tensorflow/contrib/hvx/hexagon_controller/src_impl/graph_functions_wrapper.c1
-rw-r--r--tensorflow/contrib/hvx/hexagon_controller/src_impl/hexagon_controller.c14
-rw-r--r--tensorflow/contrib/hvx/hexagon_controller/src_impl/include/hexagon_controller.h2
3 files changed, 16 insertions, 1 deletions
diff --git a/tensorflow/contrib/hvx/hexagon_controller/src_impl/graph_functions_wrapper.c b/tensorflow/contrib/hvx/hexagon_controller/src_impl/graph_functions_wrapper.c
index 3b3ce2cdc9..7c82158522 100644
--- a/tensorflow/contrib/hvx/hexagon_controller/src_impl/graph_functions_wrapper.c
+++ b/tensorflow/contrib/hvx/hexagon_controller/src_impl/graph_functions_wrapper.c
@@ -167,6 +167,7 @@ bool hexagon_controller_ConstructGraph(uint32_t nn_id) {
int err;
if ((err = hexagon_nn_prepare(nn_id)) != 0) {
TFMLOGE("Prepare failed! returned 0x%x\n", err);
+ hexagon_controller_PrintLog(nn_id);
return false;
} else {
TFMLOGD("Prepare success!\n");
diff --git a/tensorflow/contrib/hvx/hexagon_controller/src_impl/hexagon_controller.c b/tensorflow/contrib/hvx/hexagon_controller/src_impl/hexagon_controller.c
index e3d72d5bb0..31caebf872 100644
--- a/tensorflow/contrib/hvx/hexagon_controller/src_impl/hexagon_controller.c
+++ b/tensorflow/contrib/hvx/hexagon_controller/src_impl/hexagon_controller.c
@@ -36,12 +36,14 @@ static const bool DBG_SHOW_ID = false;
static const uint32_t OUTPUT_PARAM_MAX_LINE_SIZE = 1000;
+static const uint32_t PRINT_BUFSIZE = 2 * 1024 * 1024;
+
// extern pre-generated inception dummy data
extern uint8_t inception_dummy_int_data_224x224[];
extern uint8_t inception_dummy_int_data_299x299[];
extern float inception_dummy_float_data_299x299[];
-#define HEXAGON_CONTROLLER_VERSION 91
+#define HEXAGON_CONTROLLER_VERSION 92
// allocate print bufsize in advance @MB
#define PRINT_BUFSIZE (2 * 1024 * 1024)
@@ -373,3 +375,13 @@ void hexagon_controller_EnableDbgUseInceptionDummyData(bool enable) {
bool hexagon_controller_IsDbgUseInceptionDummyDataEnabled() {
return s_dbg_use_inception_dummy_data;
}
+
+void hexagon_controller_PrintLog(uint32_t nn_id) {
+ unsigned char *buf;
+ if ((buf = malloc(PRINT_BUFSIZE)) == NULL) {
+ return;
+ }
+ hexagon_nn_getlog(nn_id, buf, PRINT_BUFSIZE);
+ TFMLOGE("DUMP HEXAGON LOG: %s", buf);
+ free(buf);
+}
diff --git a/tensorflow/contrib/hvx/hexagon_controller/src_impl/include/hexagon_controller.h b/tensorflow/contrib/hvx/hexagon_controller/src_impl/include/hexagon_controller.h
index eaf4a58751..ab8c80c0f3 100644
--- a/tensorflow/contrib/hvx/hexagon_controller/src_impl/include/hexagon_controller.h
+++ b/tensorflow/contrib/hvx/hexagon_controller/src_impl/include/hexagon_controller.h
@@ -117,6 +117,8 @@ void hexagon_controller_EnableDbgUseInceptionDummyData(bool enable);
bool hexagon_controller_IsDbgUseInceptionDummyDataEnabled();
+void hexagon_controller_PrintLog(uint32_t nn_id);
+
#ifdef __cplusplus
}
#endif // __cplusplus