Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiled c++ and imported library successfully but ops are not available from python. #8

Open
cooltopics opened this issue Apr 25, 2018 · 1 comment

Comments

@cooltopics
Copy link

Hi! Many thanks for sharing this wonderful implementation.
I am having a particular problem while running your code (and probably while building it).

I am using tensorflow 1.3.1 on windows 64bit. I have seemingly successfully built your external folder structural_losses with changes for compiling with Visual Studio 2015 and Cuda 8.0.

I am also able to load the ops dlls e.g. using approxmatch_module = tf.load_op_library(osp.join(base_dir, '_approxmatch.pyd'))

However, I don't see the operators approxmatch_module.approx_match,approxmatch_module.match_cost, etc. from the c++ getting exposed to the python tensorflow.

I am getting the following error:
AttributeError: 'module' object has no attribute 'approx_match'

When I do the following

from structural_losses import approxmatch
dir(approxmatch.approxmatch_module)

it lists only the following items
['LIB_HANDLE', 'OP_LIST', '_InitOpDefLibrary', '__builtins__', '__doc__', '__name__', '__package__', '_collections', '_common_shapes', '_op_def_lib', '_op_def_library', '_op_def_pb2', '_op_def_registry', '_ops']

where the actual operations from c++ are missing.

From the compiled shared library, using dependency walker, I see that the following there items are exposed through the dll (i.e. pyd):

char const * const tensorflow::DEVICE_CPU
char const * const tensorflow::DEVICE_GPU
char const * const tensorflow::DEVICE_SYCL

Am I missing anything to get it properly compiled?

Thanks.

@ingutbecker
Copy link

I am having the same problem. Did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants