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

Windows: build TensorFlow Lite with Bazel on Windows #4148

Open
laszlocsomor opened this Issue Nov 22, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@laszlocsomor
Copy link
Contributor

laszlocsomor commented Nov 22, 2017

This is a tracking bug for building TF Lite on Windows with Bazel.

  • remove -Wno-implicit-fallthrough from @tensorflow//third_party/flatbuffers/flatbuffers.BUILD
  • remove single quotes from repro command's --cxxflags
  • update README.md: use drive root as --output_user_root (long paths)
  • update README.md: build with "-c opt" (long paths)
  • edit WindowsJniLoader to load from bazel_tools, not from <reponame>/external/bazel_tools (must test on Android BusyBox)
  • create src/main/native/windows/BUILD.tools
  • add src/main/native/windows/*.{cc,h} to //src/main/native/windows:embedded_tools
  • Java SingleJar doesn't support --nocompress_suffixes, and some build rule requires that --> migrate to C++ SingleJar on Windows (#2241)

@laszlocsomor laszlocsomor self-assigned this Nov 22, 2017

laszlocsomor added a commit to laszlocsomor/tensorflow that referenced this issue Nov 22, 2017

TFLite: some fixes to build with Bazel on Windows
In this commit:
- make the -Wno-implicit-fallthrough compiler flag
  in flatbuffers' BUILD file be conditional to
  non-Windows builds, because MSVC doesn't know
  this flag
- fix the Bazel build command in README.md by
  removing single quotes around --cxxflags,
  because it's not needed on Bash and is harmful
  on Windows (because cmd.exe doesn't remove the
  single quotes)
- fix non-ASCII quotes and apostrophes, as well as
  some formatting issues in README.md

See bazelbuild/bazel#4148

laszlocsomor added a commit to laszlocsomor/tensorflow that referenced this issue Nov 22, 2017

TFLite: get closer to build with Bazel on Windows
Bazel cannot yet build TensorFlow Lite on Windows,
but this commit gets us closer.

In this commit:
- make the -Wno-implicit-fallthrough compiler flag
  in flatbuffers' BUILD file be conditional to
  non-Windows builds, because MSVC doesn't know
  this flag
- fix the Bazel build command in README.md by
  removing single quotes around --cxxflags,
  because it's not needed on Bash and is harmful
  on Windows (because cmd.exe doesn't remove the
  single quotes)
- fix non-ASCII quotes and apostrophes, as well as
  some formatting issues in README.md

See bazelbuild/bazel#4148

laszlocsomor added a commit to laszlocsomor/tensorflow that referenced this issue Nov 23, 2017

TFLite: get closer to build with Bazel on Windows
Bazel cannot yet build TensorFlow Lite on Windows,
but this commit gets us closer.

In this commit:
- make the -Wno-implicit-fallthrough compiler flag
  in flatbuffers' BUILD file be conditional to
  non-Windows builds, because MSVC doesn't know
  this flag
- fix the Bazel build command in README.md by
  removing single quotes around --cxxflags,
  because it's not needed on Bash and is harmful
  on Windows (because cmd.exe doesn't remove the
  single quotes)
- fix non-ASCII quotes and apostrophes, as well as
  some formatting issues in README.md

See bazelbuild/bazel#4148

sb2nov added a commit to tensorflow/tensorflow that referenced this issue Nov 27, 2017

TFLite: get closer to build with Bazel on Windows (#14791)
Bazel cannot yet build TensorFlow Lite on Windows,
but this commit gets us closer.

In this commit:
- make the -Wno-implicit-fallthrough compiler flag
  in flatbuffers' BUILD file be conditional to
  non-Windows builds, because MSVC doesn't know
  this flag
- fix the Bazel build command in README.md by
  removing single quotes around --cxxflags,
  because it's not needed on Bash and is harmful
  on Windows (because cmd.exe doesn't remove the
  single quotes)
- fix non-ASCII quotes and apostrophes, as well as
  some formatting issues in README.md

See bazelbuild/bazel#4148
@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Nov 30, 2017

@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Dec 13, 2017

Raising to P1. I want to do this in Q1-2018.

@laszlocsomor laszlocsomor added P1 windows-q1-2018 and removed P2 labels Dec 13, 2017

nestle1993 added a commit to nestle1993/tensorflow that referenced this issue Mar 6, 2018

TFLite: get closer to build with Bazel on Windows (tensorflow#14791)
Bazel cannot yet build TensorFlow Lite on Windows,
but this commit gets us closer.

In this commit:
- make the -Wno-implicit-fallthrough compiler flag
  in flatbuffers' BUILD file be conditional to
  non-Windows builds, because MSVC doesn't know
  this flag
- fix the Bazel build command in README.md by
  removing single quotes around --cxxflags,
  because it's not needed on Bash and is harmful
  on Windows (because cmd.exe doesn't remove the
  single quotes)
- fix non-ASCII quotes and apostrophes, as well as
  some formatting issues in README.md

See bazelbuild/bazel#4148
@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented May 16, 2018

Update: I'm not actively working on this, unfortunately. I'm focused on #4460, #4292, and #4319. Maybe P1 is appropriate but I cannot seem to deliver that. @meteorcloudy , @dslomov : WDYT about dropping the priority? If you think it's still P1, how do you think we could find time for this?

@meteorcloudy

This comment has been minimized.

Copy link
Member

meteorcloudy commented May 16, 2018

I think we can drop the priority to P2. I talked to people working on TensorFlow lite, they don't seem to need this urgently. We can reconsider the priority after TF completely moves to Bazel on Windows, which is what I'm working on right now.

@meteorcloudy meteorcloudy added P2 and removed P1 labels May 16, 2018

@meteorcloudy meteorcloudy self-assigned this Aug 31, 2018

bazel-io pushed a commit that referenced this issue Sep 3, 2018

Fix ApkActionsBuilder.java on Windows
resource_extractor needs PATH to be set on Windows, otherwise it throws:

Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\lib\site.py", line 570, in <module>
    main()
  File "C:\Program Files\Anaconda3\lib\site.py", line 561, in main
    os.environ["PATH"])
  File "C:\Program Files\Anaconda3\lib\os.py", line 725, in __getitem__
    raise KeyError(key) from None
KeyError: 'PATH'
Target //tensorflow/contrib/lite/examples/android:tflite_demo failed to build

Working towards: #4148

RELNOTES: None.
PiperOrigin-RevId: 211324206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment