Skip to content

Commit 592ac12

Browse files
mcremon-metafacebook-github-bot
authored andcommitted
Move xtensa custom kernels to third-party and add license file (#789)
Summary: Pull Request resolved: #789 As titled Reviewed By: dbort Differential Revision: D50135341 fbshipit-source-id: ee4de044ea7b18b259ac86a5a6b3d483f026dd45
1 parent b3a5961 commit 592ac12

File tree

5 files changed

+141
-1
lines changed

5 files changed

+141
-1
lines changed

examples/xtensa/kernels/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
add_library(xtensa_kernels kernels.cpp matmul_asym8uxasym8u_asym8u.cpp)
7+
# lint_cmake: -linelength
8+
add_library(xtensa_kernels kernels.cpp ${EXECUTORCH_ROOT}/examples/xtensa/third-party/nnlib-hifi4/matmul_asym8uxasym8u_asym8u.cpp)
89

910
target_include_directories(
1011
xtensa_kernels
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
The components of this software package from Cadence Design Systems, Inc.
2+
are subject to the licenses below. By using the software package, you
3+
agree to the legal terms of each license.
4+
5+
6+
1. API header files, testbench files, library (binary) and source code to build the library
7+
/*******************************************************************************
8+
* Copyright (c) 2018-2023 Cadence Design Systems, Inc.
9+
*
10+
* Permission is hereby granted, free of charge, to any person obtaining
11+
* a copy of this software and associated documentation files (the
12+
* "Software"), to use this Software with Cadence processor cores only and
13+
* not with any other processors and platforms, subject to
14+
* the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included
17+
* in all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26+
27+
******************************************************************************/
28+
29+
2. Makefiles
30+
#
31+
# Copyright (c) 2018-2023 Cadence Design Systems, Inc.
32+
#
33+
# Permission is hereby granted, free of charge, to any person obtaining
34+
# a copy of this software and associated documentation files (the
35+
# "Software"), to use this Software with Cadence processor cores only and
36+
# not with any other processors and platforms, subject to
37+
# the following conditions:
38+
#
39+
# The above copyright notice and this permission notice shall be included
40+
# in all copies or substantial portions of the Software.
41+
#
42+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
43+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49+
#

examples/xtensa/kernels/matmul_asym8uxasym8u_asym8u.cpp renamed to examples/xtensa/third-party/nnlib-hifi4/matmul_asym8uxasym8u_asym8u.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/*******************************************************************************
10+
* Copyright (c) 2018-2023 Cadence Design Systems, Inc.
11+
*
12+
* Permission is hereby granted, free of charge, to any person obtaining
13+
* a copy of this software and associated documentation files (the
14+
* "Software"), to use this Software with Cadence processor cores only and
15+
* not with any other processors and platforms, subject to
16+
* the following conditions:
17+
*
18+
* The above copyright notice and this permission notice shall be included
19+
* in all copies or substantial portions of the Software.
20+
*
21+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
29+
******************************************************************************/
30+
131
#include "xa_nnlib_common.h"
232
#include "xa_type_def.h"
333

examples/xtensa/kernels/matmul_asym8uxasym8u_asym8u_macros.h renamed to examples/xtensa/third-party/nnlib-hifi4/matmul_asym8uxasym8u_asym8u_macros.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/*******************************************************************************
10+
* Copyright (c) 2018-2023 Cadence Design Systems, Inc.
11+
*
12+
* Permission is hereby granted, free of charge, to any person obtaining
13+
* a copy of this software and associated documentation files (the
14+
* "Software"), to use this Software with Cadence processor cores only and
15+
* not with any other processors and platforms, subject to
16+
* the following conditions:
17+
*
18+
* The above copyright notice and this permission notice shall be included
19+
* in all copies or substantial portions of the Software.
20+
*
21+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
29+
******************************************************************************/
30+
131
#pragma once
232

333
/*

examples/xtensa/kernels/xa_nnlib_matmul_unroll_macros.h renamed to examples/xtensa/third-party/nnlib-hifi4/xa_nnlib_matmul_unroll_macros.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/*******************************************************************************
10+
* Copyright (c) 2018-2023 Cadence Design Systems, Inc.
11+
*
12+
* Permission is hereby granted, free of charge, to any person obtaining
13+
* a copy of this software and associated documentation files (the
14+
* "Software"), to use this Software with Cadence processor cores only and
15+
* not with any other processors and platforms, subject to
16+
* the following conditions:
17+
*
18+
* The above copyright notice and this permission notice shall be included
19+
* in all copies or substantial portions of the Software.
20+
*
21+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
29+
******************************************************************************/
30+
131
#pragma once
232

333
/*

0 commit comments

Comments
 (0)