1

I have been trying to compile the prediction API using the amalgamation but when I try to use the library I get the following error:

mxnet/nnvm/src/core/pass.cc:30: Check failed: reg != nullptr Cannot find pass LoadLegacyJSON in the registry

here is the load code which works against the full libmxnet library

retval = MXPredCreate((const char*) symbol,
            (const char* ) params,
            params_fsz,
            1,
            0,
            num_input_nodes,
            (const char**) input_keys,
            input_shape_indptr,
            input_shape_data,
            &dnn
    );

Is there a compiler flag I'm missing?

dabhand
  • 517
  • 3
  • 10

2 Answers2

2

after a lot of heartache and pain the answer was to include

-Wl,--whole-archive -lmxnet_predict -Wl,--no-whole-archive

as a linker flag

gcc was stripping symbols it didn't think it needed

dabhand
  • 517
  • 3
  • 10
0

To add to dabhand's answer: on macOS you would do

-Wl,-force_load,<path to libmxnet.a>