Skip to content
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

Bazel downstream failure: Tensorflow visibility issue #58825

Closed
SalmaSamy opened this issue Dec 8, 2022 · 15 comments
Closed

Bazel downstream failure: Tensorflow visibility issue #58825

SalmaSamy opened this issue Dec 8, 2022 · 15 comments
Assignees
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:bazel Bazel related Build_Installation issues type:bug Bug type:build/install Build and install issues

Comments

@SalmaSamy
Copy link

Tensorflow is failing in Bazel downstream with this error:

image

After checking the runtime repository, I found that :support target is visible to a package group which ONLY includes targets in the same project, while it is used as a dependency in Tensorflow repository:

image

Please update this target to be visible from needed projects

@SalmaSamy
Copy link
Author

/cc @ezhulenev

@sushreebarsa sushreebarsa added the subtype:bazel Bazel related Build_Installation issues label Dec 9, 2022
@meteorcloudy
Copy link
Member

@meteorcloudy
Copy link
Member

meteorcloudy commented Dec 9, 2022

Related change in Bazel@HEAD: bazelbuild/bazel@e899d85

Incompatible changes: bazelbuild/bazel#16391, bazelbuild/bazel#16355, bazelbuild/bazel#16323

/cc @brandjon

@meteorcloudy
Copy link
Member

@brandjon Maybe we should cherry pick bazelbuild/bazel@1473988 back to 5.x to make it easier for Bazel projects to adapt the new syntax?

copybara-service bot pushed a commit to openxla/xla that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for tensorflow/tensorflow#58825)

PiperOrigin-RevId: 494329005
copybara-service bot pushed a commit to tensorflow/runtime that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for tensorflow/tensorflow#58825)

PiperOrigin-RevId: 494329005
copybara-service bot pushed a commit that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for #58825)

PiperOrigin-RevId: 494329005
copybara-service bot pushed a commit to openxla/xla that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for tensorflow/tensorflow#58825)

PiperOrigin-RevId: 494337456
copybara-service bot pushed a commit to tensorflow/runtime that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for tensorflow/tensorflow#58825)

PiperOrigin-RevId: 494337456
copybara-service bot pushed a commit that referenced this issue Dec 10, 2022
1. Add a dependency on TSL to TFRT
2. Remove tfrt/concurrency library
3. Export tsl/concurrency types as tfrt::AsyncValue, tfrt::AsyncValueRef, etc...
4. Removes dependency on tfrt/support library from PjRt Future (fix for #58825)

PiperOrigin-RevId: 494337456
@mohantym mohantym assigned mohantym and unassigned sushreebarsa Dec 12, 2022
@mohantym mohantym added type:build/install Build and install issues type:bug Bug labels Dec 12, 2022
@mohantym
Copy link
Contributor

mohantym commented Dec 12, 2022

Hi @SalmaSamy !
Thanks for sharing those observation on Bazel downstream failure.
Would it be possible to share the commands to investigate this issue on our side.

Thank you!

@meteorcloudy
Copy link
Member

Yes, you can reproduce this issue with

export USE_BAZEL_VERSION=last_green
bazelisk build //tensorflow/tools/pip_package:build_pip_package

@brandjon
Copy link

This appears to be caused by the same package_group as issue #58168, the @tf_runtime//:friends target. As in that issue, the possible workarounds include:

  1. Replace //... with public, which only works in Bazel >= 6.0
  2. Update the visibility of the affected targets to be //visibility:public in place of the friends package group
  3. Opt out of the incompatible change in Bazel 6.0 by setting --incompatible_fix_package_group_reporoot_syntax=false

I suggest that (2) is the simplest option, inconvenient though it may be. Of course, it can be factored back into the friends package group once compatibility with < 6.0 is no longer needed.

As for Yun's suggestion above to backport public to 5.x, I think that should be possible. I wonder how costly the above options are for users though.

@mohantym mohantym assigned sachinprasadhs and unassigned mohantym Dec 13, 2022
@sachinprasadhs
Copy link
Contributor

@brandjon , Thanks for the detailed explanation, do you think there is any action item from Tensorflow repo.

@brandjon
Copy link

@sachinprasadhs, I'd like to know if it's a burden for you to migrate away from @tf_runtime//:friends and replace it with visibility = ["//visibility:public"], or if that's a trivial change for you. Same for any other package groups using //....

I'd also like to know if you need long term support for 5.x or if it's just needed for migration.

@sachinprasadhs
Copy link
Contributor

@learning-to-play , @nitins17 , Could you please comment on the above request. Thanks!

@sachinprasadhs sachinprasadhs added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Dec 13, 2022
@learning-to-play learning-to-play removed their assignment Dec 14, 2022
@brandjon
Copy link

It looks like 5.4 will go ahead without adding support for public. As best as we can tell, it also seems like TF is the only significant case where this has impacted migration. So at the moment we're not planning on backporting this, given that there is the workaround of using //visibility:public in place of a package group.

@SalmaSamy
Copy link
Author

SalmaSamy commented Jan 27, 2023

Hi @sachinprasadhs, any updates on using one of the solution for this?

@anishlukk123
Copy link

any updates on this?

@meteorcloudy
Copy link
Member

I believe this is already fixed at TF HEAD

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:bazel Bazel related Build_Installation issues type:bug Bug type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

9 participants