Skip to content

Commit

Permalink
[xla:cpu] Fix build errors from ACL
Browse files Browse the repository at this point in the history
Reported in:
jax-ml/jax#26062

PiperOrigin-RevId: 719326299
  • Loading branch information
penpornk authored and Google-ML-Automation committed Jan 24, 2025
1 parent 894a70e commit 9ceaa6c
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
23 changes: 23 additions & 0 deletions third_party/compute_library/exclude_omp_scheduler.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/src/BUILD.bazel b/src/BUILD.bazel
index bf71e534e2..22377f1a32 100644
--- a/src/BUILD.bazel
+++ b/src/BUILD.bazel
@@ -971,7 +971,6 @@ filegroup(
"runtime/NEON/functions/NETranspose.cpp",
"runtime/NEON/functions/NEUnstack.cpp",
"runtime/NEON/functions/NEWinogradConvolutionLayer.cpp",
- "runtime/OMP/OMPScheduler.cpp",
"runtime/OffsetLifetimeManager.cpp",
"runtime/OffsetMemoryPool.cpp",
"runtime/OperatorTensor.cpp",
@@ -984,6 +983,10 @@ filegroup(
"runtime/Tensor.cpp",
"runtime/TensorAllocator.cpp",
"runtime/Utils.cpp"] +
+ select({
+ "//:openmp_flag": ["runtime/OMP/OMPScheduler.cpp"],
+ "//conditions:default": [],
+ }) +
glob(["**/*.h",
"**/*.hpp",
"**/*.inl"]),
12 changes: 12 additions & 0 deletions third_party/compute_library/include_string.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/arm_compute/core/utils/logging/IPrinter.h b/arm_compute/core/utils/logging/IPrinter.h
index 42dca58ea1..9c8b1598e8 100644
--- a/arm_compute/core/utils/logging/IPrinter.h
+++ b/arm_compute/core/utils/logging/IPrinter.h
@@ -25,6 +25,7 @@
#define ARM_COMPUTE_LOGGING_PRINTER_H

#include "support/Mutex.h"
+#include <string>

namespace arm_compute
{
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/src/BUILD.bazel b/src/BUILD.bazel
index bf71e534e2..22377f1a32 100644
--- a/src/BUILD.bazel
+++ b/src/BUILD.bazel
@@ -971,7 +971,6 @@ filegroup(
"runtime/NEON/functions/NETranspose.cpp",
"runtime/NEON/functions/NEUnstack.cpp",
"runtime/NEON/functions/NEWinogradConvolutionLayer.cpp",
- "runtime/OMP/OMPScheduler.cpp",
"runtime/OffsetLifetimeManager.cpp",
"runtime/OffsetMemoryPool.cpp",
"runtime/OperatorTensor.cpp",
@@ -984,6 +983,10 @@ filegroup(
"runtime/Tensor.cpp",
"runtime/TensorAllocator.cpp",
"runtime/Utils.cpp"] +
+ select({
+ "//:openmp_flag": ["runtime/OMP/OMPScheduler.cpp"],
+ "//conditions:default": [],
+ }) +
glob(["**/*.h",
"**/*.hpp",
"**/*.inl"]),
12 changes: 12 additions & 0 deletions third_party/tsl/third_party/compute_library/include_string.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/arm_compute/core/utils/logging/IPrinter.h b/arm_compute/core/utils/logging/IPrinter.h
index 42dca58ea1..9c8b1598e8 100644
--- a/arm_compute/core/utils/logging/IPrinter.h
+++ b/arm_compute/core/utils/logging/IPrinter.h
@@ -25,6 +25,7 @@
#define ARM_COMPUTE_LOGGING_PRINTER_H

#include "support/Mutex.h"
+#include <string>

namespace arm_compute
{
2 changes: 2 additions & 0 deletions third_party/tsl/workspace2.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def _tf_repositories():
patch_file = [
"//third_party/compute_library:compute_library.patch",
"//third_party/compute_library:acl_thread_local_scheduler.patch",
"//third_party/compute_library:exclude_omp_scheduler.patch",
"//third_party/compute_library:include_string.patch",
],
sha256 = "c4ca329a78da380163b2d86e91ba728349b6f0ee97d66e260a694ef37f0b0d93",
strip_prefix = "ComputeLibrary-23.05.1",
Expand Down

0 comments on commit 9ceaa6c

Please sign in to comment.