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

[Bug]: tensorflow does not compile with lts_2023_08_02 and Visual Studio 2022 #1808

Open
johnnkp opened this issue Jan 18, 2025 · 0 comments

Comments

@johnnkp
Copy link

johnnkp commented Jan 18, 2025

Describe the issue

When compiling tensorflow nightly with CUDA Toolkit 12.5.1, Visual Studio 2022 (17.12.4) and C++17 compilation fails with:

external/com_google_absl\absl/functional/internal/any_invocable.h(521): error: enum "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::TargetType [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" has no member "kPointer"
              absl::enable_if_t<target_type == TargetType::kPointer, int> = 0>
                                                           ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

external/com_google_absl\absl/functional/internal/any_invocable.h(547): error: enum "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::TargetType [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" has no member "kCompatibleAnyInvocable"
                  target_type == TargetType::kCompatibleAnyInvocable, int> = 0>
                                             ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

external/com_google_absl\absl/functional/internal/any_invocable.h(548): error: invalid redeclaration of member function template "void absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::Initialize<target_type,QualDecayedTRef,F,<unnamed>>(F &&) [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" (declared at line 522)
    void Initialize(F&& f) {
         ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

external/com_google_absl\absl/functional/internal/any_invocable.h(560): error: enum "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::TargetType [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" has no member "kIncompatibleAnyInvocable"
                  target_type == TargetType::kIncompatibleAnyInvocable, int> = 0>
                                             ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

external/com_google_absl\absl/functional/internal/any_invocable.h(561): error: invalid redeclaration of member function template "void absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::Initialize<target_type,QualDecayedTRef,F,<unnamed>>(F &&) [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" (declared at line 522)
    void Initialize(F&& f) {
         ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

external/com_google_absl\absl/functional/internal/any_invocable.h(571): error: enum "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...>::TargetType [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" has no member "kOther"
              typename = absl::enable_if_t<target_type == TargetType::kOther>>
                                                                      ^
          detected during instantiation of class "absl::lts_20230802::internal_any_invocable::CoreImpl<SigIsNoexcept, ReturnType, P...> [with SigIsNoexcept=false, ReturnType=ReturnType, P=<P...>]" at line 868

Steps to reproduce the problem

  1. Install CUDA Toolkit 12.5.1, Visual Studio 2022, and other required build tools for tensorflow windows CUDA build
  2. Download https://github.com/johnnkp/tensorflow-wgpu-test/archive/64711033fff920e048c2e9661e28b89429465e1d.zip and extract
  3. Run python configure.py to configure Windows CUDA build
  4. Run bazel build --config=win_clang --config=cuda_wheel --config=opt --define=no_tensorflow_py_deps=true --repo_env=TF_PYTHON_VERSION=3.12 --repo_env=TF_CUDA_COMPUTE_CAPABILITIES=6.1 @local_xla//xla/stream_executor/cuda:delay_kernel_cuda --repo_env=WHEEL_NAME=tensorflow-gpu

What version of Abseil are you using?

lts_2023_08_02

What operating system and version are you using?

Windows 11 24H2

What compiler and version are you using?

Visual Studio 2022 (17.12.4)

What build system are you using?

Bazel 6.5.0

Additional context

Reverting 73789eb#diff-f583487853daa619cc01664b1cd0007c23d858467a727fa06f00a5043f1ade72R834 doesn't fix.

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

No branches or pull requests

1 participant