Skip to content

Upgrade for JavaCPP 1.5.7 and TensorFlow 2.8.0 #415

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

Merged
merged 10 commits into from
Mar 9, 2022

Conversation

saudet
Copy link
Contributor

@saudet saudet commented Feb 12, 2022

Everything builds and all tests pass for me, even though I almost didn't have to update anything, but a lot changes in the ops as usual, so that probably needs to be looked into before we can merge this. @karllessard

@Craigacp
Copy link
Collaborator

Did the framework tests pass without my PR from today (#414)? I had assumed it was an overbroad backport that broke the RNG functionality, but if it worked in TF 2.8 then that's even stranger.

@saudet
Copy link
Contributor Author

saudet commented Feb 12, 2022

Yes, all tests pass, including everything from tensorflow-framework as is in this branch, without pull #414. I'm only seeing a "skipped" one from org.tensorflow.framework.optimizers.GradientDescentTest.

@saudet
Copy link
Contributor Author

saudet commented Feb 16, 2022

@karllessard I'm not sure that creating a new "rawops" package with only a couple of ops is better than just leaving everything in "core", but that's what your tool picked up, so I'll leave you deal with this!

@saudet saudet marked this pull request as ready for review February 16, 2022 02:28
@karllessard
Copy link
Collaborator

Thanks for trying @saudet but I think the API import tooling is not working as good as before since the last few versions of TensorFlow. The number of new ops seems relatively small, I'll go through them and update their package manually.

@karllessard karllessard added the CI build Triggers a full native build on a pull request label Feb 23, 2022
@karllessard
Copy link
Collaborator

Ok @saudet , I just pushed the following changes to your branch:

  • Upgrade to Bazel 4.2.1 (since that's what TF 2.8.0 is build with)
  • Update tensorflow.bazelrc with the version found in TF 2.8.0 sources
  • Reclassify the new ops

For the latter, I tried quickly to fix the java_api_import tool but without to much success, they might have change the structure of their golden API that this tool is parsing, so I reclassify them by hand, which wasn't too bad in this case (only 7 ops).

@karllessard
Copy link
Collaborator

karllessard commented Feb 24, 2022

@saudet , any idea what this error is about? https://github.com/tensorflow/java/runs/5311689706?check_suite_focus=true#step:5:1595

Windows build is failing (again...)

@saudet
Copy link
Contributor Author

saudet commented Feb 24, 2022

Auto-Configuration Error: Couldn't find undname.exe under C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC, please check your VC installation and set BAZEL_VC environment variable correctly.

I don't think TF supports Visual Studio 2022, try to revert to 2019. If that doesn't work, try to revert to the previous version of Bazel since that could as well be caused by a regression in there.

@rnett
Copy link
Contributor

rnett commented Feb 24, 2022

I don't think TF supports Visual Studio 2022, try to revert to 2019.

I doubt the bazel version we're using does either, 4.0.0 didn't for me.

@karllessard
Copy link
Collaborator

We’ll see if the native build succeeds but. eventually it will fail after when compiling the Java stuff because while we’ve already migrated to jdk 11 in ndarray, we haven’t done it yet in TF Java

@saudet
Copy link
Contributor Author

saudet commented Feb 25, 2022

 C:\tmp\_bazel_runneradmin\mg3pkz7r\execroot\tensorflow_core_api\external\org_tensorflow\tensorflow\core\common_runtime\isolate_placer_inspection_required_ops_pass.cc : fatal error C1083: Cannot open compiler generated file: '': Invalid argument

That usually means there's a path somewhere that's longer than MAX_PATH. We might need to hack the build by creating a temporary junction for d:\a\java\java\tensorflow-core\tensorflow-core-api\ to a shorter path like d:\tf this way:
https://github.com/bytedeco/javacpp-presets/blob/1.5.7/scipy/cppbuild.sh#L179-L188

@saudet saudet force-pushed the upgrade-tensorflow-280 branch 2 times, most recently from cece798 to 1870d08 Compare February 26, 2022 12:19
@karllessard karllessard force-pushed the upgrade-tensorflow-280 branch from 1870d08 to ddc2a5e Compare March 8, 2022 19:47
@karllessard
Copy link
Collaborator

@saudet , I wanna see how this PR builds after upgrading to JDK11 (#427) so I've rebased your branch on master.

@karllessard karllessard removed the CI build Triggers a full native build on a pull request label Mar 9, 2022
@karllessard karllessard merged commit be73612 into tensorflow:master Mar 9, 2022
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

Successfully merging this pull request may close these issues.

4 participants