This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import nnvm | |
| import tvm | |
| import numpy as np | |
| from mxnet.gluon.model_zoo.vision import get_model | |
| batch_size = 1 | |
| image_shape = (3, 224, 224) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target: opencl -device=mali -model=unknown , opt_level: 3 , data_shape: (1, 3, 224, 224) | |
| Compiling... | |
| Cannot find config for target=opencl -device=mali -model=unknown, workload=('conv2d', (1, 3, 224, 224, 'float32'), (64, 3, 3, 3, 'float32'), (2, 2), (0, 0), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression. | |
| Traceback (most recent call last): | |
| File "./compile-cl.py", line 30, in <module> | |
| graph, lib, params = nnvm.compiler.build(sym, target, shape={"data": data_shape}, params=params) | |
| File "/usr/local/lib/python3.5/dist-packages/nnvm-0.8.0-py3.5.egg/nnvm/compiler/build_module.py", line 281, in build | |
| graph = optimize(graph, shape, dtype, layout) | |
| File "/usr/local/lib/python3.5/dist-packages/nnvm-0.8.0-py3.5.egg/nnvm/compiler/build_module.py", line 176, in optimize | |
| graph = graph.apply(["InferShape", "SimplifyInference"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target: opencl -device=mali -model=unknown , opt_level: 3 , data_shape: (1, 3, 224, 224) | |
| Compiling... | |
| Traceback (most recent call last): | |
| File "./compile-cl.py", line 32, in <module> | |
| graph, lib, params = nnvm.compiler.build(sym, target, shape={"data": data_shape}, params=params) | |
| File "/usr/local/lib/python3.5/dist-packages/nnvm-0.8.0-py3.5.egg/nnvm/compiler/build_module.py", line 281, in build | |
| graph = optimize(graph, shape, dtype, layout) | |
| File "/usr/local/lib/python3.5/dist-packages/nnvm-0.8.0-py3.5.egg/nnvm/compiler/build_module.py", line 176, in optimize | |
| graph = graph.apply(["InferShape", "SimplifyInference"]) | |
| File "/usr/local/lib/python3.5/dist-packages/nnvm-0.8.0-py3.5.egg/nnvm/graph.py", line 234, in apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nnvm | |
| import tvm | |
| import numpy as np | |
| from mxnet.gluon.model_zoo.vision import get_model | |
| batch_size = 1 | |
| image_shape = (3, 224, 224) | |
| data_shape = (batch_size,) + image_shape | |
| model_name = 'resnet18_v1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nnvm | |
| import tvm | |
| import numpy as np | |
| from mxnet.gluon.model_zoo.vision import get_model | |
| batch_size = 1 | |
| image_shape = (3, 224, 224) | |
| data_shape = (batch_size,) + image_shape | |
| model_name = 'resnet18_v1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import nnvm | |
| import nnvm.testing | |
| import tvm | |
| import numpy as np | |
| from mxnet.gluon.model_zoo.vision import get_model | |
| batch_size = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --header "Content-Type: application/json" \ | |
| --request POST \ | |
| --data '{"url":"https://raw.githubusercontent.com/dmlc/mxnet.js/master/data/cat.png"}' \ | |
| https://gebtjgh3xg.execute-api.us-west-2.amazonaws.com/default/resnet50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <immintrin.h> | |
| #include <stdio.h> | |
| #include <stdint.h> /* for uint64 definition */ | |
| #include <time.h> /* for clock_gettime */ | |
| #include <string.h> /* memset */ | |
| #define ARRAY_LENGTH 8 /* __m256 can handle vector of 8 32-bit floating-point values */ | |
| #define BILLION 1e9 | |
| /* Compile: gcc -mavx2 -O3 avx2-test.c -o avx2-test */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import tensorflow as tf | |
| import numpy as np | |
| import time | |
| from imagenet_preprocessing import preprocess_image | |
| from imagenet1000 import imagenet_classes | |
| ms = lambda: int(round(time.time() * 1000)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import tensorflow as tf | |
| import numpy as np | |
| import time | |
| from imagenet_preprocessing import preprocess_image | |
| from imagenet1000 import imagenet_classes | |
| ms = lambda: int(round(time.time() * 1000)) |