-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Buckify Cadence HiFi4 Operators. (#5154)
Summary: Pull Request resolved: #5154 Add c++ code under cadence/hifi to buck build targets. Reviewed By: zonglinpeng Differential Revision: D62317545 fbshipit-source-id: e91cf9167fd6a701cd2e2ed52ea2cc6d07517cf4
- Loading branch information
1 parent
861a7bf
commit 444480b
Showing
10 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
load("targets.bzl", "define_common_targets") | ||
|
||
oncall("odai_jarvis") | ||
|
||
define_common_targets() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
load("@fbsource//tools/build_defs:platform_defs.bzl", "CXX") | ||
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | ||
|
||
def define_common_targets(): | ||
runtime.cxx_library( | ||
name = "kernels", | ||
srcs = ["kernels.cpp"], | ||
exported_headers = [ | ||
"kernels.h", | ||
], | ||
visibility = [ | ||
"//executorch/backends/cadence/...", | ||
], | ||
exported_deps = [ | ||
"fbsource//third-party/nnlib-hifi4/xa_nnlib:libxa_nnlib_common", | ||
], | ||
platforms = CXX, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
load("targets.bzl", "define_common_targets") | ||
|
||
oncall("odai_jarvis") | ||
|
||
define_common_targets() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
load("@fbsource//tools/build_defs:platform_defs.bzl", "CXX") | ||
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | ||
|
||
def define_common_targets(): | ||
"""Defines targets that should be shared between fbcode and xplat. | ||
The directory containing this targets.bzl file should also contain both | ||
TARGETS and BUCK files that call this function. | ||
""" | ||
|
||
# Define build targets for all operators registered in the tables above. | ||
|
||
runtime.cxx_library( | ||
name = "cadence_hifi_ops", | ||
srcs = glob([ | ||
"*.cpp", | ||
]), | ||
platforms = CXX, | ||
deps = [ | ||
"//executorch/kernels/portable/cpu/util:broadcast_util", | ||
"//executorch/runtime/kernel:kernel_includes", | ||
"//executorch/kernels/portable/cpu:scalar_utils", | ||
"fbsource//third-party/nnlib-hifi4/xa_nnlib:libxa_nnlib", | ||
"fbsource//third-party/nnlib-hifi4/xa_nnlib:libxa_nnlib_common", | ||
"//executorch/backends/cadence/hifi/kernels:kernels", | ||
], | ||
visibility = [ | ||
"//executorch/backends/cadence/...", | ||
], | ||
) |