Currently our template for custom-ops is designed for linux builds. We'll need to adapt our build setup to build for all operating systems.
https://github.com/tensorflow/custom-op
@yifeif @karmel When time allows after the summit, could we discuss the steps needed.
in Windows in tf.sysconfig.get_link_flags() return empty
and truncate if my username have space at line 38
I think we should check compile flags by build_ext
@yifeif bumping for your feedback, now that the summit is over and GPU op is in place on the custom-op repo. I noticed there is a crosstool build for nvcc on windows so I figured there's been some thought on this.
Without having dug too deeply on tensorflow/tensorflow BUILD, my first question is how does it work to lookup .so files? Shouldn't it be dependent on OS (i.e. dll/dylib/so)
Doesn't autconf or ./configure figure out the dll/dylib/so dependencies ?
pip install tf-nightly-2.0-preview fails on mac with the following error:
Could not find a version that satisfies the requirement tf-nightly-2.0-preview (from versions: )
No matching distribution found for tf-nightly-2.0-preview
Had some time to look at the tensorflow build wrappers. Seems like we'll need to do something along these lines for the multi OS build
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tensorflow.bzl#L599
Doesn't autconf or ./configure figure out the dll/dylib/so dependencies ?
Good point. Yeah the readlink or whatever we build with should discover the libtensorflow_framework, but the C++ ops we compile ourselves are currently hardcoded as .so files.
Tried installing from source on my Mac, as instructed on the home page, but it failed, first because the .so names are hardcoded. I renamed them to dylib. But then I ran into another issue:
In file included from tensorflow_addons/custom_ops/image/cc/kernels/euclidean_distance_transform_op.cc:22:
./tensorflow_addons/custom_ops/image/cc/kernels/euclidean_distance_transform_op.h:55:11: error: no viable conversion from 'Eigen::half' to 'float'
float minDistance = std::numeric_limits<T>::max();
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So I guess there's no way to install TensorFlow Addons on Mac or Windows for now, it's Linux only.
Side note for @armando-fandango: perhaps you are using Python 3.7? tf-nightly-2.0-preview and tf-nightly-2.0-gpu-preview are not available for Python 3.7, but they are available for Python 3.6. For some reason, TF 2.0 alpha0 _is_ available for both Python 3.6 and 3.7.
@ageron thanks and Yes, I realized it sometime back and switched all of my dev venvs to to 3.6.8 for now.
@ageron Thank you for reporting this and sorry for the trouble. I'll be working on a macos build and release this week and hopefully we'll have published whls ~within a week.
Issues have now been resolved. Expect a macos whl with the 0.3 release
MacOS whls are now available on pypi