uTensor: Build failed

I am compiling using the command:

mbed compile -t GCC_ARM -m K64F --profile=./uTensor/build_profile/release.json

Which gives these errors:

Compile [ 99.5%]: simple_mnist.cpp
[Warning] uTensor_util.hpp@53,30: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=]
[Error] simple_mnist.cpp@274,18: 'QuantizedAddOp' does not name a type; did you mean 'QuantizeV2Op'?
[Error] simple_mnist.cpp@274,40: expected primary-expression before ',' token
[Error] simple_mnist.cpp@274,49: expected primary-expression before ',' token
[Error] simple_mnist.cpp@274,51: expected primary-expression before 'int'
[Error] simple_mnist.cpp@335,18: 'QuantizedAddOp' does not name a type; did you mean 'QuantizeV2Op'?
[Error] simple_mnist.cpp@335,40: expected primary-expression before ',' token
[Error] simple_mnist.cpp@335,49: expected primary-expression before ',' token
[Error] simple_mnist.cpp@335,51: expected primary-expression before 'int'
[Error] simple_mnist.cpp@445,18: 'QuantizedAddOp' does not name a type; did you mean 'QuantizeV2Op'?
[Error] simple_mnist.cpp@445,40: expected primary-expression before ',' token
[Error] simple_mnist.cpp@445,49: expected primary-expression before ',' token
[Error] simple_mnist.cpp@445,51: expected primary-expression before 'int'
[Warning] ArrayOps.hpp@28,23: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] ArrayOps.hpp@137,23: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ERROR] In file included from ./uTensor/uTensor/core/tensor.hpp:10:0,
                 from ./uTensor/uTensor/util/quantization_utils.hpp:6,
                 from ./uTensor/uTensor/ops/MatrixOps.hpp:7,
                 from ./models/simple_mnist.cpp:3:

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 30 (18 by maintainers)

Most upvoted comments

@metanav You just find a bug in my code generator reference counting optimizer. If you are using the simple_mnist.pb to generate the code, I think I’m looking at the same cpp code as yours.

The "OuputLayer/logits_eightbit/OuputLayer/Variable_1__port__0/reduction_dims:0" tensor has incorrect reference count so it’s garbage collected by the ctx object.

I’ll fix it this night at Taiwan local time. Thanks for your patience.

@neil-tan I think the pb file is the simple_mnist.pb in our demo repo. Should be available to everyone.

@metanav I just fix the reference counting issue for the code generator. The “tensor does not exist” issue should be gone now. You can try this at the develop branch of utensor_cgen.

Let me know if there is any other issue.

@neil-tan I think the SD pin assignment is fine. I have already set the pin assignment in the mbed_app.json.

"target_overrides": {
        "HEXIWEAR": {
            "sd-mosi": "PTE3",
            "sd-miso": "PTE1",
            "sd-clk": "PTE2",
            "sd-cs": "PTE4"
        }
}

Now after little playing with CoolTerm I was able to see the message:

Simple MNIST end-to-end uTensor cli example (device)
[Error] ./uTensor/uTensor/core/context.cpp:96 @push 
  Tensor "OuputLayer/logits_eightbit/OuputLayer/Variable_1__port__0/reduction_dims:0"
  not found