Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix proto issues in 2.18 upgrade
  • Loading branch information
karllessard committed Apr 11, 2025
commit 7dec77b77716fd874bd47771f281353b97eb6209
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<!--arg>-Werror</arg--> <!-- Disabled (temporarily?) -->
<arg>-Xlint:all</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
<!-- FIXME: turn me on again! arg>-Xplugin:ErrorProne</arg-->
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>

Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<javacpp.platform.macosx-arm64.extension>macosx-arm64${javacpp.platform.extension}</javacpp.platform.macosx-arm64.extension>
<javacpp.platform.macosx-x86_64.extension>macosx-x86_64${javacpp.platform.extension}</javacpp.platform.macosx-x86_64.extension>
<javacpp.platform.windows-x86_64.extension>windows-x86_64${javacpp.platform.extension}</javacpp.platform.windows-x86_64.extension>
<javacpp.version>1.5.10</javacpp.version>
<javacpp.version>1.5.11</javacpp.version>
</properties>

<profiles>
Expand Down
2 changes: 2 additions & 0 deletions tensorflow-core/tensorflow-core-native/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ java_proto_library(
name = "java_proto_gen_sources",
deps = [
"@org_tensorflow//tensorflow/core:protos_all",
"@local_xla//xla/tsl/protobuf:bfc_memory_map_proto",
"@local_xla//xla/tsl/protobuf:test_log_proto",
"@local_tsl//tsl/protobuf:protos_all"
]
)
4 changes: 2 additions & 2 deletions tensorflow-core/tensorflow-core-native/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ http_archive(
patch_tool = "patch",
patch_args = ["-p1"],
patch_cmds = [
"find tensorflow third_party/xla/third_party/tsl -name \\*.proto | xargs sed -i.bak '/^option java_package/d'",
"find tensorflow third_party/xla/third_party/tsl -name \\*.proto | xargs sed -i.bak 's/^package tensorflow\\([^;]*\\).*$/package tensorflow\\1;\\noption java_package = \"org.tensorflow.proto\\1\";/'",
"find tensorflow third_party/xla/third_party/tsl third_party/xla/xla/tsl -name \\*.proto | xargs sed -i.bak '/^option java_package/d'",
"find tensorflow third_party/xla/third_party/tsl third_party/xla/xla/tsl -name \\*.proto | xargs sed -i.bak 's/^package tensorflow\\([^;]*\\).*$/package tensorflow\\1;\\noption java_package = \"org.tensorflow.proto\\1\";/'",
],
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.18.0.tar.gz",
Expand Down
1 change: 1 addition & 0 deletions tensorflow-core/tensorflow-core-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
<!-- additional include paths in case of a full native build -->
<includePath>${project.basedir}/bazel-${project.artifactId}/external/org_tensorflow/</includePath>
<includePath>${project.basedir}/bazel-${project.artifactId}/external/local_tsl/</includePath>
<includePath>${project.basedir}/bazel-${project.artifactId}/external/local_xla/</includePath>
<includePath>${project.basedir}/bazel-bin/external/org_tensorflow/</includePath>
<includePath>${project.basedir}/bazel-${project.artifactId}/external/com_google_absl/</includePath>
<includePath>${project.basedir}/bazel-${project.artifactId}/external/eigen_archive/</includePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cp -f $TENSORFLOW_SRCS/core/ops/ops.pbtxt $GEN_RESOURCE_DIR/org/tensorflow
cp -rf $TENSORFLOW_SRCS/core/api_def/base_api $GEN_RESOURCE_DIR/org/tensorflow/

# Copy generated Java protos from source jars
echo "Extracting TF/TSL proto Java sources"
echo "Extracting TF/TSL/XLA proto Java sources"
cd $GEN_SRCS_DIR
find $TENSORFLOW_BIN $BAZEL_BIN/external/local_tsl/tsl -name \*-speed-src.jar -exec jar xf {} \;
find $TENSORFLOW_BIN $BAZEL_BIN/external/local_tsl/tsl $BAZEL_BIN/external/local_xla/xla -name \*-speed-src.jar -exec jar xf {} \;
rm -rf META-INF
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// The lower part is still the same, so multiple roots are set in the pom file.
"tsl/platform/ctstring_internal.h",
"tsl/platform/ctstring.h",
"tsl/platform/status.h",
"xla/tsl/c/tsl_status.h",
"tensorflow/c/c_api_macros.h",
"tensorflow/c/tf_datatype.h",
"tensorflow/c/tf_status.h",
Expand Down