This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d06063  [BUGFIX][CRT] Fix Compilation Error in CRT (#5713)
3d06063 is described below

commit 3d0606313f2cb7625eeec5308fe33354dc94fc90
Author: Liangfu Chen <liangfu.c...@icloud.com>
AuthorDate: Wed Jun 3 00:22:14 2020 +0800

    [BUGFIX][CRT] Fix Compilation Error in CRT (#5713)
---
 src/runtime/crt/crt_backend_api.c | 2 ++
 src/runtime/crt/ndarray.c         | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/runtime/crt/crt_backend_api.c 
b/src/runtime/crt/crt_backend_api.c
index fe71439..7589ce4 100644
--- a/src/runtime/crt/crt_backend_api.c
+++ b/src/runtime/crt/crt_backend_api.c
@@ -24,6 +24,8 @@
 #include <tvm/runtime/c_backend_api.h>
 #include <tvm/runtime/crt/memory.h>
 
+#include "packed_func.h"
+
 void* TVMBackendAllocWorkspace(int device_type, int device_id, uint64_t 
nbytes, int dtype_code_hint,
                                int dtype_bits_hint) {
   void* ptr = 0;
diff --git a/src/runtime/crt/ndarray.c b/src/runtime/crt/ndarray.c
index 02c37bf..17e2107 100644
--- a/src/runtime/crt/ndarray.c
+++ b/src/runtime/crt/ndarray.c
@@ -100,9 +100,9 @@ int TVMNDArray_Load(TVMNDArray* ret, const char** strm) {
   *strm += sizeof(data_byte_size);
   if (!(data_byte_size == num_elems * elem_bytes)) {
     fprintf(stderr,
-            "invalid DLTensor file format: data_byte_size=%jd, "
-            "while num_elems*elem_bytes=%jd\n",
-            data_byte_size, (num_elems * elem_bytes));
+            "invalid DLTensor file format: data_byte_size=%d, "
+            "while num_elems*elem_bytes=%d\n",
+            (int)data_byte_size, (int)(num_elems * elem_bytes));  // NOLINT(*)
     status = -1;
   }
   memcpy(ret->dl_tensor.data, *strm, data_byte_size);

Reply via email to