mace: Check failed: false not implemented
Before you open an issue, please make sure you have tried the following steps:
- Make sure your environment is the same with (https://mace.readthedocs.io/en/latest/installation/env_requirement.html).
- Have you ever read the document for your usage?
- Check if your issue appears in HOW-TO-DEBUG or FAQ.
- The form below must be filled.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
- NDK version(e.g., 15c): 18b
- GCC version(if compiling for host, e.g., 5.4.0): 5.4.0
- MACE version (Use the command: git describe --long --tags): 0.12.0
- Python version(2.7): 3.6
- Bazel version (e.g., 0.13.0): 0.16.0
- CMake version: 3.16.0
Model deploy file (*.yml)
# The name of library
library_name: FD
target_abis: [arm64-v8a]
model_graph_format: file
model_data_format: file
models:
RF: # model tag, which will be used in model loading and must be specific.
platform: caffe
# path to your tensorflow model's pb file. Support local path, http:// and https://
model_file_path: /models/model.prototxt
weight_file_path: /models/model.caffemodel
# sha256_checksum of your model's pb file.
# use this command to get the sha256_checksum --> sha256sum path/to/your/pb/file
model_sha256_checksum: e1fc999628c539a9631806a033b302262fac43ae6855b005d37bfbe4b11b5b43
weight_sha256_checksum: 88815164b0d8f94617f33cdecc036e034c6f1a5a4e4f89b8599cdaec5c86bc34
subgraphs:
- input_tensors:
- data
input_shapes:
- 1,3,112,112
input_data_formats:
- NCHW
output_tensors:
- fc1
output_shapes:
- 1,1,1,512
obfuscate: 0
runtime: cpu
winograd: 0
Describe the problem
Run fails because Check failed: false not implemented.
To Reproduce
Steps to reproduce the problem:
1. cd /path/to/mace
2. python tools/converter.py convert --config_file=/path/to/your/model_deployment_file
2. python tools/converter.py run --config_file=/path/to/your/model_deployment_file
Error information / logs
Please include the full log and/or traceback here.
root@ds017:/mace# python tools/converter.py run --config /models/model/model.yml --validate
CMD> bazel build //mace/proto:mace_py
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
Loading:
Loading: 0 packages loaded
Analyzing: target //mace/proto:mace_py (5 packages loaded)
INFO: Analysed target //mace/proto:mace_py (17 packages loaded).
INFO: Found 1 target...
[1 / 7] [-----] BazelWorkspaceStatusAction stable-status.txt
Target //mace/proto:mace_py up-to-date:
bazel-genfiles/mace/proto/mace_pb2.py
INFO: Elapsed time: 2.836s, Critical Path: 0.06s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
CMD> cp -f bazel-genfiles/mace/proto/mace_pb2.py tools/python/py_proto
CMD> bazel build //third_party/caffe:caffe_py
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
Loading:
Loading: 0 packages loaded
Analyzing: target //third_party/caffe:caffe_py (2 packages loaded)
Analyzing: target //third_party/caffe:caffe_py (7 packages loaded)
INFO: Analysed target //third_party/caffe:caffe_py (17 packages loaded).
INFO: Found 1 target...
[0 / 0] no action
Target //third_party/caffe:caffe_py up-to-date:
bazel-genfiles/third_party/caffe/caffe_pb2.py
INFO: Elapsed time: 4.037s, Critical Path: 0.07s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
CMD> cp -f bazel-genfiles/third_party/caffe/caffe_pb2.py tools/python/py_proto
* Build //mace/tools:mace_run_static with ABI arm64-v8a
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
WARNING: The major revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' is 19. The major revisions supported by Bazel are [10, 11, 12, 13, 14, 15, 16]. Bazel will attempt to treat the NDK as if it was r16. This may cause compilation and linkage problems. Please download a supported NDK version.
INFO: Analysed target //mace/tools:mace_run_static (29 packages loaded).
INFO: Found 1 target...
Target //mace/tools:mace_run_static up-to-date:
bazel-bin/mace/tools/mace_run_static
INFO: Elapsed time: 109.413s, Critical Path: 12.92s
INFO: 121 processes: 121 local.
INFO: Build completed successfully, 122 total actions
('build', '//mace/tools:mace_run_static', '--config', 'android', '--cpu=arm64-v8a', '--define', 'neon=true', '--define', 'openmp=false', '--define', 'opencl=false', '--define', 'quantize=false', '--define', 'hexagon=false', '--define', 'hta=false', '--define', 'apu=false', '--config', 'optimization', '--config', 'symbol_hidden')
Build done!
*********************************************
Run model model on MI9
*********************************************
Generate input file: build/model/_tmp/model/744eef2ab458803da13359fa3ae0f6af/MI9_msmnile/arm64-v8a/model_input_data
Generate input file done.
* Run 'model' with round=1, restart_round=1, tuning=False, out_of_range_check=False, omp_num_threads=(-1,), cpu_affinity_policy=(1,), gpu_perf_hint=(3,), gpu_priority_hint=(3,)
Push build/model/_tmp/model/744eef2ab458803da13359fa3ae0f6af/MI9_msmnile/arm64-v8a/model_input_data to /data/local/tmp/mace_run
Push build/model/model/model.data to /data/local/tmp/mace_run
Push build/model/model/model.pb to /data/local/tmp/mace_run/model.pb
Push build/model/_tmp/arm64-v8a/mace_run_static to /data/local/tmp/mace_run
Push /tmp/cmd_file-model-1582263738.8568137 to /data/local/tmp/mace_run/cmd_file-model-1582263738.8568137
I mace/tools/mace_run.cc:527] model name: model
I mace/tools/mace_run.cc:528] mace version: v0.12.0-0-ga610d50
I mace/tools/mace_run.cc:529] input node: data
I mace/tools/mace_run.cc:530] input shape: 1,3,112,112
I mace/tools/mace_run.cc:531] output node: fc1
I mace/tools/mace_run.cc:532] output shape: 1,1,1,512
I mace/tools/mace_run.cc:533] input_file: /data/local/tmp/mace_run/model_input
I mace/tools/mace_run.cc:534] output_file: /data/local/tmp/mace_run/model_out
I mace/tools/mace_run.cc:535] input dir:
I mace/tools/mace_run.cc:536] output dir:
I mace/tools/mace_run.cc:537] model_data_file: /data/local/tmp/mace_run/model.data
I mace/tools/mace_run.cc:538] model_file: /data/local/tmp/mace_run/model.pb
I mace/tools/mace_run.cc:539] device: CPU
I mace/tools/mace_run.cc:540] round: 1
I mace/tools/mace_run.cc:541] restart_round: 1
I mace/tools/mace_run.cc:542] gpu_perf_hint: 3
I mace/tools/mace_run.cc:543] gpu_priority_hint: 3
I mace/tools/mace_run.cc:544] omp_num_threads: -1
I mace/tools/mace_run.cc:545] cpu_affinity_policy: 1
I mace/tools/mace_run.cc:548] limit_opencl_kernel_time: 0
I mace/tools/mace_run.cc:553] opencl_queue_window_size: 0
I mace/libmace/mace.cc:464] Creating MaceEngine, MACE version: v0.12.0-0-ga610d50
I mace/libmace/mace.cc:503] Initializing MaceEngine
I mace/libmace/mace.cc:636] Destroying MaceEngine
I mace/tools/mace_run.cc:596] restart round 0
I mace/libmace/mace.cc:911] Create MaceEngine from model graph proto and weights data
I mace/libmace/mace.cc:464] Creating MaceEngine, MACE version: v0.12.0-0-ga610d50
I mace/libmace/mace.cc:503] Initializing MaceEngine
I mace/tools/mace_run.cc:269] Create Mace Engine latency: 146.904 ms
I mace/tools/mace_run.cc:276] Total init latency: 147.033 ms
I mace/tools/mace_run.cc:370] Warm up run
F mace/ops/arm/fp32/activation.cc:176] Check failed: false not implemented
F mace/ops/arm/fp32/activation.cc:176] backtrace:
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a993cb8
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a996cec
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a996c7c
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a997050
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a9971d4
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a934bd0
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a934624
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a8c6b2c
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a9604d8
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a8acf1c
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a8884cc
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a88c93c
F mace/ops/arm/fp32/activation.cc:176] pc 0x5d1a88d124
F mace/ops/arm/fp32/activation.cc:176] pc 0x7f57df7bc8 __libc_init
Aborted
ERROR: [Mace Run] /mace/tools/device.py:367: Mace run failed.
Additional context
Model to reproduce the issue can be found here
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (8 by maintainers)
@gasgallo I find there is a bug in MACE when using python3, you can use python2 or apply this patch, and try convert and run again. Finally, Thank you very much for your report.
@gasgallo I checked your model in file mode and found no errors. I am busy today and will research this issue tomorrow.
luxuhui@luxuhui-ThinkPad-E480:~/work/mace$ python tools/converter.py run --config $CONF_FILE --validate CMD> bazel build //mace/proto:mace_py Loading: Loading: 0 packages loaded INFO: Analysed target //mace/proto:mace_py (0 packages loaded). INFO: Found 1 target… [0 / 7] [-----] BazelWorkspaceStatusAction stable-status.txt Target //mace/proto:mace_py up-to-date: bazel-genfiles/mace/proto/mace_pb2.py INFO: Elapsed time: 0.739s, Critical Path: 0.01s INFO: 0 processes. INFO: Build completed successfully, 1 total action
CMD> cp -f bazel-genfiles/mace/proto/mace_pb2.py tools/python/py_proto
CMD> bazel build //third_party/caffe:caffe_py Loading: Loading: 0 packages loaded INFO: Analysed target //third_party/caffe:caffe_py (0 packages loaded). INFO: Found 1 target… [1 / 2] [-----] BazelWorkspaceStatusAction stable-status.txt Target //third_party/caffe:caffe_py up-to-date: bazel-genfiles/third_party/caffe/caffe_pb2.py INFO: Elapsed time: 0.356s, Critical Path: 0.01s INFO: 0 processes. INFO: Build completed successfully, 1 total action
CMD> cp -f bazel-genfiles/third_party/caffe/caffe_pb2.py tools/python/py_proto
Generate input file: build/model/_tmp/arc50/5b6c9159e7cdc537261277c531c6b29d/Andromeda_msmnile/arm64-v8a/model_input_data Generate input file done.
Run ‘arc50’ with round=1, restart_round=1, tuning=False, out_of_range_check=False, omp_num_threads=(-1,), cpu_affinity_policy=(1,), gpu_perf_hint=(3,), gpu_priority_hint=(3,) Push build/model/_tmp/arc50/5b6c9159e7cdc537261277c531c6b29d/Andromeda_msmnile/arm64-v8a/model_input_data to /data/local/tmp/mace_run Push build/model/model/arc50.data to /data/local/tmp/mace_run Push build/model/model/arc50.pb to /data/local/tmp/mace_run/arc50.pb Push build/model/_tmp/arm64-v8a/mace_run_static to /data/local/tmp/mace_run Push /tmp/cmd_file-arc50-1582857370.66 to /data/local/tmp/mace_run/cmd_file-arc50-1582857370.66 I mace/tools/mace_run.cc:527] model name: arc50 I mace/tools/mace_run.cc:528] mace version: v0.12.0-0-ga610d50 I mace/tools/mace_run.cc:529] input node: data I mace/tools/mace_run.cc:530] input shape: 1,3,112,112 I mace/tools/mace_run.cc:531] output node: fc1 I mace/tools/mace_run.cc:532] output shape: 1,1,1,512 I mace/tools/mace_run.cc:533] input_file: /data/local/tmp/mace_run/model_input I mace/tools/mace_run.cc:534] output_file: /data/local/tmp/mace_run/model_out I mace/tools/mace_run.cc:535] input dir: I mace/tools/mace_run.cc:536] output dir: I mace/tools/mace_run.cc:537] model_data_file: /data/local/tmp/mace_run/arc50.data I mace/tools/mace_run.cc:538] model_file: /data/local/tmp/mace_run/arc50.pb I mace/tools/mace_run.cc:539] device: CPU I mace/tools/mace_run.cc:540] round: 1 I mace/tools/mace_run.cc:541] restart_round: 1 I mace/tools/mace_run.cc:542] gpu_perf_hint: 3 I mace/tools/mace_run.cc:543] gpu_priority_hint: 3 I mace/tools/mace_run.cc:544] omp_num_threads: -1 I mace/tools/mace_run.cc:545] cpu_affinity_policy: 1 I mace/tools/mace_run.cc:548] limit_opencl_kernel_time: 1 I mace/tools/mace_run.cc:553] opencl_queue_window_size: 0 I mace/libmace/mace.cc:464] Creating MaceEngine, MACE version: v0.12.0-0-ga610d50 I mace/libmace/mace.cc:503] Initializing MaceEngine I mace/libmace/mace.cc:636] Destroying MaceEngine I mace/tools/mace_run.cc:596] restart round 0 I mace/libmace/mace.cc:911] Create MaceEngine from model graph proto and weights data I mace/libmace/mace.cc:464] Creating MaceEngine, MACE version: v0.12.0-0-ga610d50 I mace/libmace/mace.cc:503] Initializing MaceEngine I mace/tools/mace_run.cc:269] Create Mace Engine latency: 163.819 ms I mace/tools/mace_run.cc:276] Total init latency: 163.931 ms I mace/tools/mace_run.cc:370] Warm up run I mace/tools/mace_run.cc:406] 1st warm up run latency: 427.421 ms I mace/tools/mace_run.cc:414] Run model I mace/tools/mace_run.cc:476] Average latency: 135.251 ms I mace/tools/mace_run.cc:491] Write output file /data/local/tmp/mace_run/model_out_fc1 with size 2048 done. ======================================================== capability(CPU) init warmup run_avg ======================================================== time 19.128 163.931 427.421 135.251 I mace/libmace/mace.cc:636] Destroying MaceEngine Running finished!
Validate with caffe Pull /data/local/tmp/mace_run/model_out_fc1 to build/model/_tmp/arc50/5b6c9159e7cdc537261277c531c6b29d/Andromeda_msmnile/arm64-v8a fc1 MACE VS CAFFE similarity: 0.9999994216131167 , sqnr: 520861.74961214117 , pixel_accuracy: 1.0
Validation done!
@gasgallo aha? OK, I am busy during the day, will check it tonight for you.