tensorflow / custom-op

Guide for building custom op for TensorFlow
Apache License 2.0
378 stars 115 forks source link

Wheels for Python>3.6 #93

Closed Rocketknight1 closed 3 years ago

Rocketknight1 commented 3 years ago

Hey, I've successfully built my custom op with this repo, but the wheel is only Py3.6 compatible. Is there a way to get wheels compatible with Py3.7 or Py3.8? I tried installing Py3.8 in a conda env in the Docker container, but the wheel I built didn't work outside the container,.

maxhgerlach commented 3 years ago

@Rocketknight1 did you find a way to do that with the Docker container?

(I expected this to be easier as I understood the Docker images to be meant as the go-to solution for building ops compatible to TF packages from PyPI.)

Rocketknight1 commented 3 years ago

I just gave up - I found custom-op was much more difficult to use than forking tensorflow-addons and writing my op in there. If you have a custom op you want to add to TF, I definitely recommend that route instead - my PR's already in!

maxhgerlach commented 3 years ago

That's interesting, thanks for the hint. Currently I'm not working on anything that I would add to tensorflow-addons anytime soon, but that repo looks more actively maintained, so this might still be a good way to go.

Rocketknight1 commented 3 years ago

It definitely is - if you follow the instructions in the README you can build the repo and test new ops very easily, much more easily than in custom-op. You can use my PR as a guide for which files you need to change to add your new op and include it in the build: https://github.com/tensorflow/addons/pull/2352/files

Rocketknight1 commented 3 years ago

Even if you never want to actually submit a PR to addons for your op, this way is easier even just for local development!