capeprivacy / tf-trusted

tf-trusted allows you to run TensorFlow models in secure enclaves
https://capeprivacy.com/
Apache License 2.0
87 stars 11 forks source link

Failure to run model inside SGX enclave #26

Closed Jumpst3r closed 4 years ago

Jumpst3r commented 4 years ago

I've succeeded in installing all of the required parts but when I try to run a model (either in sim or on an enclave) I get

2020-07-23 15:14:19.438040: F bazel-out/k8-fastbuild/genfiles/external/local_configtf/include/tensorflow/core/lib/core/refcount.h:90] Check failed: ref.load() == 0 (1 vs. 0)

As far as I'm aware this tends to happen when adding new custom ops without the -DNDEBUG flag, as referenced here:

https://github.com/tensorflow/tensorflow/issues/17316

Do you have an idea on how to fix this ? I'm unsure on where to add the flag

Thanks!

justin1121 commented 4 years ago

Hi there, you can try adding to the list here: https://github.com/capeprivacy/tf-trusted/blob/master/tf_trusted_custom_op/BUILD#L31

Jumpst3r commented 4 years ago

This actually did the trick, thanks! Tell me if you want me to submit a PR.

justin1121 commented 4 years ago

Yes please, I believe we've struggled with this issue in the past as well!