-
Notifications
You must be signed in to change notification settings - Fork 74.4k
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 #61269
Comments
Hi @misterBart, thanks for reporting the issue. git & cmake are not available natively on windows command prompt so I have a couple of questions in order to reproduce your issue. Are you using powershell or command prompt? Are you using WSL? Are you using MinGW? Are you using git for windows? If you have trouble understanding these questions, a good first pass is to ask bard: https://bard.google.com/. Ex: "How to tell if I'm using _______?" Usually the more information you provide, the faster I am able to assist you. Thanks! |
I'm using Windows Command Prompt. By the way, you can also solve the two mentioned compile errors if your replace |
Hi @misterBart, our internal tests/tools show it compiles correctly with clang, Is there a way to adjust your cmake installation to use clang? (I'm currently guessing it is using gcc but I'm not sure). |
I am using cmake with Visual Studio (also see title and opening post), so I'm using Microsoft Visual C++ (MSVC) compiler. As for your follow-up email: "Hi @misterBart, let us know if you have tried multiple models to help us look into the problem further." To make things clear, I never asked for help. I reported an issue and posted a solution in my opening post and a second solution in my previous comment. I posted these solutions so that one of them could be applied to the TfLite code, so that other people using Visual Studio will not experience this error. Hopefully things are clear now. |
Hi @misterBart, there are complications/restrictions which make applying those solutions not that simple, but we'll take a deeper look, in the mean time, can you use bazel to unblock yourself? Generally the bazel workflow is better supported for windows/macos and the cmake workflow is better supported for *nix systems. |
Hi @terryheo, can you please take a look? Thanks |
@terryheo Have you been able to look at the matter yet? |
Hi, @misterBart Thanks for raising this issue. Are you aware of the migration to LiteRT? This transition is aimed at enhancing our project's capabilities and providing improved support and focus for our users. As we believe this issue is still relevant to LiteRT we are moving your issue there. Please follow progress here: google-ai-edge/LiteRT#165 Let us know if you have any questions. Thanks. |
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:
The cmake build command yields two errors:
To fix this, add
#include <any>
totensorflow\lite\delegates\gpu\common\selectors\operation_selector.cc
andtensorflow\lite\delegates\gpu\common\selectors\operation_selector.cc
Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: