Skip to content

Commit

Permalink
Fix demo_static
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Apr 9, 2020
1 parent 0642f13 commit 72e644d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/bundle_deploy/demo_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <assert.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <float.h>

#include "bundle.h"
Expand Down Expand Up @@ -56,7 +57,7 @@ int main(int argc, char **argv) {
DLDataType dtype = {kDLFloat, 32, 1};
input.dtype = dtype;
int64_t shape [4] = {1, 3, 224, 224};
input.shape = &shape;
input.shape = shape;
input.strides = NULL;
input.byte_offset = 0;

Expand All @@ -74,8 +75,8 @@ int main(int argc, char **argv) {
output.ndim = 2;
DLDataType out_dtype = {kDLFloat, 32, 1};
output.dtype = out_dtype;
int64_t out_shape [2] = {1, OUTPUT_LEN};
output.shape = &out_shape;
int64_t out_shape[2] = {1, OUTPUT_LEN};
output.shape = out_shape;
output.strides = NULL;
output.byte_offset = 0;

Expand Down Expand Up @@ -103,6 +104,6 @@ int main(int argc, char **argv) {
(t3.tv_sec-t2.tv_sec)*1000000 + (t3.tv_usec-t2.tv_usec)/1000.f,
(t4.tv_sec-t3.tv_sec)*1000000 + (t4.tv_usec-t3.tv_usec)/1000.f,
(t5.tv_sec-t4.tv_sec)*1000000 + (t5.tv_usec-t4.tv_usec)/1000.f);

return 0;
}

0 comments on commit 72e644d

Please sign in to comment.