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

small changes to workspace to fix building #153

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protobuf_deps()
git_repository(
name = "com_google_absl",
remote = "https://github.com/abseil/abseil-cpp.git",
tag = "20211102.0",
tag = "20220623.1",
# Remove after https://github.com/abseil/abseil-cpp/issues/326 is solved.
patches = [
"@//patches:com_google_absl_f863b622fe13612433fdf43f76547d5edda0c93001.diff"
Expand Down Expand Up @@ -67,14 +67,20 @@ new_git_repository(
# Audio DSP
git_repository(
name = "com_google_audio_dsp",
# TODO(b/231448719) use main google repo after merging PR for TF eigen compatibility.
remote = "https://github.com/mchinen/multichannel-audio-tools.git",

remote = "https://github.com/google/multichannel-audio-tools.git",
# There are no tags for this repo, we are synced to bleeding edge.
commit = "14a45c5a7c965e5ef01fe537bd816ce10a247813",
commit = "80892ee5252829701db4e57c9ecc3a825fa1e87c",
repo_mapping = {
"@com_github_glog_glog" : "@com_google_glog",
"@eigen3": "@eigen_archive"
}
},
patches = [
"@//patches:multichannel-audio-tols_fix.patch"
],
patch_args = [
"-p1",
]
)

# Transitive dependencies of Audio DSP.
Expand All @@ -97,7 +103,7 @@ git_repository(
)
# Dependency for glog
git_repository(
name = "com_github_gflags_gflags",
name = "gflags",
remote = "https://github.com/mchinen/gflags.git",
branch = "android_linking_fix"
)
Expand Down Expand Up @@ -170,7 +176,13 @@ git_repository(
remote = "https://github.com/tensorflow/tensorflow.git",
# Below is reproducible and equivalent to `tag = "v2.11.0"`
commit = "d5b57ca93e506df258271ea00fc29cf98383a374",
shallow_since = "1668561432 -0800"
shallow_since = "1668561432 -0800",
patches = [
"@//patches:tensorflow_fix.patch"
],
patch_args = [
"-p1",
]
)

# Check bazel version requirement, which is stricter than TensorFlow's.
Expand Down
37 changes: 37 additions & 0 deletions patches/multichannel-audio-tols_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From dc03c9744e98951737f4efb794a416a9f3295b4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20de=20Pedraza?= <[email protected]>
Date: Mon, 7 Oct 2024 09:16:01 +0200
Subject: [PATCH] use eigen3 as tensorflow

add cstdint header
---
audio/dsp/porting.h | 1 +
third_party/eigen3/BUILD | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/audio/dsp/porting.h b/audio/dsp/porting.h
index 56e45d2..e3296be 100644
--- a/audio/dsp/porting.h
+++ b/audio/dsp/porting.h
@@ -20,6 +20,7 @@
#include <iostream>
#include <cmath>
#include <string>
+#include <cstdint>

using std::string;

diff --git a/third_party/eigen3/BUILD b/third_party/eigen3/BUILD
index 497c1f0..de1c7f4 100644
--- a/third_party/eigen3/BUILD
+++ b/third_party/eigen3/BUILD
@@ -23,6 +23,6 @@ cc_library(
],
visibility = ["//visibility:public"],
deps = [
- "@eigen_archive//:eigen",
+ "@eigen_archive//:eigen3",
],
)
--
2.43.0
21 changes: 21 additions & 0 deletions patches/tensorflow_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From df9cf01f69c74ba650796903a2128f1e01c0e572 Mon Sep 17 00:00:00 2001
From: Tom Bannink <[email protected]>
Date: Fri, 5 May 2023 09:22:21 +0200
Subject: [PATCH] Add missing `stdint.h` include

---
tensorflow/lite/kernels/internal/spectrogram.cc | 1 +
1 file changed, 1 insertion(+)

diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc
index a832962a38df1b..919eebeb3e703c 100644
--- a/tensorflow/lite/kernels/internal/spectrogram.cc
+++ b/tensorflow/lite/kernels/internal/spectrogram.cc
@@ -17,6 +17,7 @@ limitations under the License.

#include <assert.h>
#include <math.h>
+#include <stdint.h>

#include "third_party/fft2d/fft.h"