Skip to content

Commit 5725d19

Browse files
penpornktensorflower-gardener
authored andcommitted
[xla:cpu] Add new pthreadpool API to XNN thread pool integration
This is to match the recently added API in pthreadpool.h from google/pthreadpool@bd09d5c Otherwise, we would get a linker error when building xnn_threadpool_test: ``` ld: error: undefined symbol: pthreadpool_parallelize_4d_tile_2d_dynamic ``` Command to test: ``` bazel build -c opt --define=pthreadpool_header_only=true \ //xla/backends/cpu/runtime/xnnpack:xnn_threadpool_test ``` PiperOrigin-RevId: 739193929
1 parent e6b02c2 commit 5725d19

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

third_party/xla/xla/backends/cpu/runtime/xnnpack/xnn_threadpool.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ limitations under the License.
4141
//
4242
// At link time `pthreadpool` symbols resolved to our own implementation. This
4343
// is a temporary hack around the fact that it's impossible to customize
44-
// `pthreadpool` implementation at run time. The downsize is that it's
44+
// `pthreadpool` implementation at run time. The downside is that it's
4545
// impossible to have two `pthreadpool` implementations linked into the same
4646
// binary.
4747
//
@@ -525,6 +525,13 @@ extern "C" void pthreadpool_parallelize_4d_tile_2d_with_uarch(
525525
LOG(FATAL) << "Not implemented";
526526
}
527527

528+
extern "C" void pthreadpool_parallelize_4d_tile_2d_dynamic(
529+
pthreadpool_t threadpool, pthreadpool_task_4d_tile_2d_dynamic_t function,
530+
void* context, size_t range_i, size_t range_j, size_t range_k,
531+
size_t range_l, size_t tile_k, size_t tile_l, uint32_t flags) {
532+
LOG(FATAL) << "Not implemented";
533+
}
534+
528535
extern "C" void pthreadpool_parallelize_5d(pthreadpool_t threadpool,
529536
pthreadpool_task_5d_t function,
530537
void* context, size_t range_i,

0 commit comments

Comments
 (0)