Created attachment 228035 [details] generated diff of new port TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. The TensorFlow C API is typically a requirement of TensorFlow APIs in other languages such as Go and Rust.
Created attachment 229326 [details] generated diff of new port Update to 2.7.0
Suggest calling it math/libtensorflow2 There's work being done on libtensorflow1 as that's still needed by some apps.
Also, maybe science instead of math (just so it's in the same section as the rest of the tensorflow ports)?
Ref science/libtensorflow1: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260694 We should probably both update our ports to add each others ports to CONFLICTS_INSTALL? I've held off on that temporarily until the naming is formalised
(In reply to Paul Armstrong from comment #3) Agree and done
Created attachment 230422 [details] generated diff of new port Rename port to science/libtensorflow2 Add CONFLICTS_INSTALL with science/libtensorflow1 Additional updates: - Add CPE information to port - Support aarch64 (now supported by devel/bazel) - Do not color logs - Increase verbosity of tests - Restrict bazel worker instanced to MAKE_JOBS_NUMBER I expect to make another update to this port in the near future to make port options consistent with those in science/libtensorflow1 (e.g., for AVX/AVX2 options under amd64).
Created attachment 230427 [details] generated diff of new port Add makefile options for CPU vector processing extensions (AVX/AVX2, amd64 only)
(In reply to William Muir from comment #7) Hi, the latest version of patch seems to be corrupted at line 213, could you please regenerate the patch with e.g. `git format-patch HEAD^..HEAD`?
Created attachment 230482 [details] generated diff of new port Replace with re-generated patch
(In reply to Xin LI from comment #8) The same review comment from science/libtensorflow1, re:network calls/downloads during build, will apply here. Bazel's --override_repository flag can be used, it'll just take some work on the port to implement. Hopefully whatever issue you encountered with the previos patch is resolved. I re-generated and was able to successfully apply this new version of the patch.
(In reply to William Muir from comment #10) Thanks! The latest patch worked like a charm. pylint -C did issue a warning (`WARN: Makefile: you may want directory for dependency numpy>=1.16,1<1.21,1 to be math/py-numpy@${PY_FLAVOR}`), but it appears like a bug of pylint so let's ignore it for now. I'll take a look on what we can do. Regarding to the network call/download -- we still want to have that solved (this would enable building official packages, etc.)
I spent a day poking at this to see if I could get it functional. The pain point right now is that it's still trying to download tensorflow/runtime and I've hit a roadblock trying to understand why it's doing so. I thought it might be --deleted_packages, but that doesn't seem to make a difference. "WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/093ed77f7d50f75b376f40a71ea86e08cedb8b80.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found" The repository with my updates is https://github.com/psa/libtensorflow2-freebsd-port Anyone got ideas on where to go from here?
^Triage: appears ready to be reviewed by a ports committer.
Coming into this late (just noticed Mark's email) but would this port replace the present tensorflow ? The tensorflow in ports currently does not compile anyway.