Skip to content

Commit

Permalink
[BUGFIX][CRT] Fix Compilation Error in CRT (#5713)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfu authored Jun 2, 2020
1 parent 13277a5 commit 3d06063
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/runtime/crt/crt_backend_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/crt/ndarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3d06063

Please sign in to comment.