Skip to content

Commit

Permalink
Fix builds for TensorFlow Lite
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Oct 28, 2024
1 parent caa0a37 commit 598659f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tensorflow-lite/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ case $PLATFORM in
sedinplace 's/__PRETTY_FUNCTION__/__func__/g' ../tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/kernels/internal/optimized/depthwiseconv*.h ../tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/kernels/internal/optimized/integer_ops/depthwise_conv.h
export CC="cl.exe -D_USE_MATH_DEFINES -DTFLITE_MMAP_DISABLED"
export CXX="cl.exe -D_USE_MATH_DEFINES -DTFLITE_MMAP_DISABLED"
export CMAKE_FLAGS="-G Ninja -DXNNPACK_ENABLE_AVXVNNI=OFF $CMAKE_FLAGS"
export CMAKE_FLAGS="-G Ninja -DXNNPACK_ENABLE_AVXVNNIINT8=OFF $CMAKE_FLAGS"
# create a dummy m.lib to satisfy some dependencies somewhere
touch m.c
cl.exe //c m.c
Expand All @@ -107,6 +107,7 @@ esac
find -L $(pwd) -iname '*.obj' -o -iname '*.o' -not -path "$(pwd)/CMakeFiles/*" > objs
# remove files with main() functions as well as duplicate or unresolved symbols in them
sedinplace '/main.o/d' objs
sedinplace '/flatbuffers-flatc/d' objs
sedinplace '/CMakeCCompilerId.o/d' objs
sedinplace '/CMakeCXXCompilerId.o/d' objs
sedinplace '/tensorflowlite_c.dir/d' objs
Expand Down

0 comments on commit 598659f

Please sign in to comment.