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

TfLite 2.13 with -DTFLITE_ENABLE_GPU=ON fails to build with Visual Studio 2019 and 2022 #165

Open
gaikwadrahul8 opened this issue Nov 28, 2024 · 2 comments

Comments

@gaikwadrahul8
Copy link
Contributor

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

tf 2.13

Custom code

No

OS platform and distribution

Windows 10

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

Visual Studio 2019 and 2022

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Building TfLite 2.13 with cmake and -DTFLITE_ENABLE_GPU=ON fails if Visual Studio 2019 or 2022 is used. Tested on two different machines, it fails on both machines.
Steps executed in Windows Command Prompt:

git clone --single-branch --branch r2.13 https://github.com/tensorflow/tensorflow tensorflow_src
mkdir tflite_build_x64
cd tflite_build_x64
cmake -DTFLITE_ENABLE_GPU=ON ..\tensorflow_src\tensorflow\lite
cmake --build . -j 8 --config Release

The cmake build command yields two errors:

C:\Users\bartp\source\TfLite2.13Gpu\tensorflow_src\tensorflow\lite\delegates\gpu\common\selectors\operation_selector.cc(313,20): error C2039: 'any_cast': is not a member of 'std' [C:\Users\bartp\source\TfLite2.13Gpu\tflite_build_x64\tensorflow-lite.vcxproj]
C:\Users\bartp\source\TfLite2.13Gpu\tensorflow_src\tensorflow\lite\delegates\gpu\common\tasks\special\conv_pointwise.cc(129,12): error C2039: 'any_cast': is not a member of 'std' [C:\Users\bartp\source\TfLite2.13Gpu\tflite_build_x64\tensorflow-lite.vcxproj]

To fix this, add #include <any> to tensorflow\lite\delegates\gpu\common\selectors\operation_selector.cc and tensorflow\lite\delegates\gpu\common\selectors\operation_selector.cc

Standalone code to reproduce the issue

To reproduce the issue: see my earlier writing.

Relevant log output

No response

@gaikwadrahul8
Copy link
Contributor Author

This issue originally reported by @misterBart has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.

@pkgoogle
Copy link

pkgoogle commented Dec 2, 2024

Original Issue: tensorflow/tensorflow#61269

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

2 participants