larq / compute-engine

Highly optimized inference engine for Binarized Neural Networks
https://docs.larq.dev/compute-engine
Apache License 2.0
240 stars 33 forks source link

Remove `weak` attribute for `RegisterSelectedOps` #734

Closed Tombana closed 2 years ago

Tombana commented 2 years ago

What do these changes do?

The bazel build of lce_benchmark_model works fine, but when using the cmake version, none of our ops are registered: RegisterSelectedOps is not called at all. This seems to be caused by the fact that the registration function is marked as 'weak', and then it depends on the order of linking which function wins.

There wasn't supposed to be a weak attribute here at all: the weak version of the symbol is in the TF library, meant to be overridden by binaries such as this one.

How Has This Been Tested?

Both the cmake and bazel builds are now working as expected.